Linux(CentOS)环境安装Nginx
注:系统为CentOS
安装相关依赖
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
安装nginx
cd /usr/local/
wget http://nginx.org/download/nginx-1.8.0.tar.gz
tar -zxvf nginx-1.8.0.tar.gz
cd nginx-1.8.0
./configure
make && make install
启动nginx
/usr/local/nginx/sbin/nginx
ps -aux | grep 'nginx'
关闭防火墙
systemctl stop firewalld
停止nginx
/usr/local/nginx/sbin/nginx -s stop
查看nginx 的状态,出现master 则启动成功
ps -ef | grep nginx