Linux nginx 安装 启动
nginx下载地址:https://nginx.org/download/
## 解压 tar -zxvf nginx-1.9.9.tar.gz
##进入nginx目录 cd nginx-1.9.9
## 配置
./configure --prefix=/usr/local/nginx
执行make
# cd到刚才配置的安装目录/usr/loca/nginx/
./sbin/nginx -t
遇到错误一般是由于linux少库 baidu安装一下
yum -y install gcc gcc-c++ autoconf automake make
启动nginx
cd /usr/local/nginx/sbin ./nginx //启动nginx
firewall-cmd --add-port=80/tcp --permanent
#重启防火墙
systemctl restart firewalld
2、配置nginx开机自启动
vim /etc/rc.d/rc.local