linux 安装nginx

官网 https://nginx.org/en/download.html

 在安装nginx前首先要确认系统中安装了gcc、pcre-devel、zlib-devel、openssl-devel

linux 检查是否安装过某软件包

yum -y install gcc pcre-devel zlib-devel openssl openssl-devel
#下载
wget https://nginx.org/download/nginx-1.19.5.tar.gz

# 解压
tar -zxvf nginx-1.19.5.tar.gz

#进入nginx目录
cd nginx-1.19.5

# 配置
./configure 

# make
make && make install

#测试是否安装成功
cd /usr/local/nginx/

./sbin/nginx –t

#启动nginx
cd /usr/local/nginx/sbin

./nginx 

./configure 显示 

测试成功显示

posted @ 2020-12-04 10:09  天天代码码天天  阅读(4)  评论(0编辑  收藏  举报  来源