标签:res cal process pcr bfc blog alt 技术分享 activity
一、安装环境Nginx下载地址:nginx
zlib下载页面:zlib
pcre下载页面:pcre
二、编译安装:
#useradd nginx -s /sbin/nologin
#yum install gcc-c++ -y
#./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module --user=nginx --group=nginx --with-pcre=/opt/pcre-8.42 --with-zlib=/opt/zlib-1.2.11 --with-http_geoip_module --with-http_gzip_static_module --with-http_flv_module --with-http_mp4_module
#make && make install
三、启动脚本(/lib/systemd/system/nginx.service)
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
四、启动服务:
systemctl enable nginx
systemctl start nginx
systemctl reload nginx
systemctl restart nginx
标签:res cal process pcr bfc blog alt 技术分享 activity
原文地址:http://blog.51cto.com/13777088/2347974