nginx-1.16.0 安装教程

本文详细介绍了Nginx的安装、运行和卸载步骤。包括编译时的各项参数配置,使用make && make install进行安装,运行和重新装载配置的命令,以及卸载时需删除的相关文件和目录,还提醒手动创建缺失目录。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 目录没有的话,需手动创建

转载于:https://my.oschina.net/u/2544553/blog/3053349

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值