readme.txt 715 B

12345678910111213141516171819202122
  1. nginx源码安装,下载地址:
  2. http://nginx.org/download/nginx-1.14.0.tar.gz
  3. 源码放置路径:
  4. /usr/local/nginx/src
  5. 默认安装模块,指定安装目录
  6. ./configure --prefix=/usr/local/nginx
  7. 依赖PCRE zlib等库
  8. make && make install
  9. 1、nginxServer.sh 启动脚本
  10. sh nginxServer.sh start|stop|restart|reload
  11. 2、nginx开机自启动 (systemd)
  12. 1)、编辑nginx.service, 路径:/lib/systemd/system/nginx.service
  13. 2)、建立软链接,ln -s /lib/systemd/system/nginx.service /etc/systemd/system/multi-user.target.wants/nginx.service
  14. 路径:/etc/systemd/system/multi-user.target.wants/nginx.service
  15. 3)、systemctl daemon-reload
  16. 4)、systemctl enable nginx.service (开机启动)