centos7安装nginx

https://nginx.org/download/
nginx-1.12.0.tar.gz为实例

yum -y install gcc gcc-c++ openssl-devel pcre-devel httpd-tools
tar -zxf nginx-1.12.0.tar.gz

cd nginx-1.12.0

useradd nginx

./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_mp4_module --with-http_flv_module


make && make install

ln -s /usr/local/nginx/sbin/nginx /usr/bin
nginx


vi /etc/rc.local

chmod 755 /etc/rc.local
nginx -s quit

 

posted @   cerofang  阅读(138)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示