首页 > 代码库 > Centos nginx安装

Centos nginx安装

一. gcc 安装yum install gcc-c++二. 解决安装过程可能会碰到的pcre和md5的问题(pcre-devel解决pcre,剩余解决md5)yum -y install pcre-devel openssl openssl-devel三、安装nginxcd /home/liying/devsudo tar -zxvf nginx-1.10.2cd nginx-1.10.2/sudo ./configuresudo makesudo make install6、启动、停止、重载配置、测试配置文件是否正确centos@VM-85-8-centos:~$ cd /usr/local/nginx/sbin## 启动centos@VM-85-8-centos:/usr/local/nginx/sbin$ sudo ./nginx## 停止centos@VM-85-8-centos:/usr/local/nginx/sbin$ sudo ./nginx -s stop ## 检测配置文件是否正确centos@VM-85-8-centos:/usr/local/nginx/sbin$ sudo ./nginx -t#重载配置文件centos@VM-85-8-centos:/usr/local/nginx/sbin$ sudo ./nginx -s reload

 

Centos nginx安装