chensenlai 369d3e3fc0 更新 4 lat temu
..
nginx.service 369d3e3fc0 更新 4 lat temu
nginxServer.sh 32f604580c 闪聘公用代码-项目初始化 5 lat temu
readme.txt 32f604580c 闪聘公用代码-项目初始化 5 lat temu

readme.txt

nginx源码安装,下载地址:
http://nginx.org/download/nginx-1.14.0.tar.gz

源码放置路径:
/usr/local/nginx/src

默认安装模块,指定安装目录
./configure --prefix=/usr/local/nginx

依赖PCRE zlib等库

make && make install

1、nginxServer.sh 启动脚本
sh nginxServer.sh start|stop|restart|reload

2、nginx开机自启动 (systemd)
1)、编辑nginx.service, 路径:/lib/systemd/system/nginx.service
2)、建立软链接,ln -s /lib/systemd/system/nginx.service /etc/systemd/system/multi-user.target.wants/nginx.service
路径:/etc/systemd/system/multi-user.target.wants/nginx.service
3)、systemctl daemon-reload
4)、systemctl enable nginx.service (开机启动)