1.为MysqL新建组和用户
useradd -M -s /sbin/nologin www
2.安装需要的库
yum install pcre pcre-devel openssl openssl-devel -y
3.解压
tar zxvf Nginx-1.10.3.tar.gz
cd Nginx-1.10.3
4.编译安装
./configure \
--user=www \
--group=www \
--prefix=/usr/local/Nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-pcre \
--with-http_gzip_static_module
make
make install
5.启动
/usr/local/Nginx/sbin/Nginx
6.设置开机自启动echo '/usr/local/Nginx/sbin/Nginx' >> /etc/rc.local
原文链接:https://www.f2er.com/centos/378681.html