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 \
2.安装nginx
make && make install
3. 运行 或 重新装载配置
nginx
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 files
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/ngin
注意: /var/tmp/nginx 目录没有的话,需手动创建
本文详细介绍了Nginx的安装、运行和卸载步骤。包括编译时的各项参数配置,使用make && make install进行安装,运行和重新装载配置的命令,以及卸载时需删除的相关文件和目录,还提醒手动创建缺失目录。
1017

被折叠的 条评论
为什么被折叠?



