首页 > 其他 > 详细

nginx

时间:2020-11-02 23:22:41      阅读:31      评论:0      收藏:0      [点我收藏+]

nginx

编译安装

# 安装依赖
yum  install  pcre  pcre-devel  openssl  openssl-devel  zlib  zlib-devel  -y

# 创建用户
useradd -s /sbin/nologin nginx -M

# 编译
./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --sbin-path=/usr/local/nginx/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --error-log-path=/usr/local/nginx/logs/error.log --http-log-path=/usr/local/nginx/logs/access.log --pid-path=/usr/local/nginx/nginx.pid --with-pcre --with-http_ssl_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_stub_status_module

make && make install

# 配置systemd
# vi /usr/lib/systemd/system/nginx.service
[Unit]
Description=nginx
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s quit
PrivateTmp=true

[Install]
WantedBy=multi-user.target

nginx

原文:https://www.cnblogs.com/liangchen4/p/13917079.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!