1.编译
./configure \
--prefix=/usr \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/tmp/nginx/client \
--http-proxy-temp-path=/var/tmp/nginx/proxy \
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi \
--with-http_stub_status_module \
--with-http_sub_module \nginx
2.安装nginx
make && make installui
3. 运行 或 从新装载配置
nginxspa
nginx -s signal
Where signal may be one of the following:
stop — fast shutdown
quit — graceful shutdown
reload — reloading the configuration file
reopen — reopening the log filesip
4. 卸载
rm -rf /usr/sbin/nginx
rm -rf /etc/nginx
rm -rf /var/log/nginx
rm -rf /var/run/nginx.pid
rm -rf /var/tmp/nginssl
注意: /var/tmp/nginx 目录没有的话,需手动建立it