linux安装nginx
2018-05-09 本文已影响128人
dalaoyang
安装环境
yum install gcc
yum install pcre-devel
yum install zlib zlib-devel
yum install openssl openssl-devel
在usr/local目录下新建nginx文件夹
cd /usr/local
mkdir nginx
进入nginx文件夹
cd nginx
下载nginx的tar包
wget http://nginx.org/download/nginx-1.13.7.tar.gz
解压tar
tar -xvf nginx-1.13.7.tar.g
安装nginx
./configure
执行make
make
执行make install
make install
启动nginx
进入sbin
cd sbin
启动
sudo ./nginx
查询nginx.conf是否正确
/usr/local/nginx/sbin/nginx -t