一. gcc 安装 yum install gcc-c++ 二. 解决安装过程可能会碰到的pcre和md5的问题(pcre-devel解决pcre,剩余解决md5) yum -y install pcre-devel openssl openssl-devel 三、安装nginx cd /home/liying/dev sudo tar -zxvf nginx-1.10.2 cd nginx-1.10.2/ sudo ./configure sudo make sudo make install 6、启动、停止、重载配置、测试配置文件是否正确 [email protected]-85-8-centos:~$ cd /usr/local/nginx/sbin ## 启动 [email protected]-85-8-centos:/usr/local/nginx/sbin$ sudo ./nginx ## 停止 [email protected]-85-8-centos:/usr/local/nginx/sbin$ sudo ./nginx -s stop ## 检测配置文件是否正确 [email protected]-85-8-centos:/usr/local/nginx/sbin$ sudo ./nginx -t #重载配置文件 [email protected]-85-8-centos:/usr/local/nginx/sbin$ sudo ./nginx -s reload
操作nginx.conf,记得在/usr/local/nginx/conf目录下操作
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/6487.html