简单几步让Nginx平滑升级(服务器运维必看)
文章目录
前一篇文章中的Markdwon其实是轻量级博客系统Ghost的默认编辑器,而今天介绍的Nginx也是Ghost部署需要的。我当时为了简单,安装的Nginx是预编译版的,今天要在Nginx上发布视频,结果把.conf里的MP4模块打开后重启Nginx没有起来,于是用nginx -V
查看发现预编译版本竟然没有MP4模块。只好自己手动升级一下Nginx了,作为一名合格的运维人员,升级服务当然要保证服务的正常运行啊,那就是今天所说的平滑升级了,下面写一下Nginx的平滑升级步骤:
./configure –prefix=/usr/share/nginx –conf-path=/etc/nginx/nginx.conf –http-log-path=/var/log/nginx/access.log –error-log-path=/var/log/nginx/error.log –lock-path=/var/lock/nginx.lock –pid-path=/run/nginx.pid –http-client-body-temp-path=/var/lib/nginx/body –http-fastcgi-temp-path=/var/lib/nginx/fastcgi –http-proxy-temp-path=/var/lib/nginx/proxy –http-scgi-temp-path=/var/lib/nginx/scgi –http-uwsgi-temp-path=/var/lib/nginx/uwsgi –with-debug –with-pcre-jit –with-ipv6 –with-http_ssl_module –with-http_stub_status_module –with-http_gzip_static_module –with-http_image_filter_module –with-http_spdy_module –with-http_sub_module –with-http_xslt_module –with-http_mp4_module`
`nginx path prefix: "/usr/share/nginx"
nginx binary file: "/usr/share/nginx/sbin/nginx"
nginx configuration prefix: "/etc/nginx"
nginx configuration file: "/etc/nginx/nginx.conf"
nginx pid file: "/run/nginx.pid"
nginx error log file: "/var/log/nginx/error.log"
nginx http access log file: "/var/log/nginx/access.log"
nginx http client request body temporary files: "/var/lib/nginx/body"
nginx http proxy temporary files: "/var/lib/nginx/proxy"
nginx http fastcgi temporary files: "/var/lib/nginx/fastcgi"
nginx http uwsgi temporary files: "/var/lib/nginx/uwsgi"
nginx http scgi temporary files: "/var/lib/nginx/scgi"`
文章作者 古道
上次更新 2015-04-05