当前位置:首页 > 服务器技术 > nginx

Nginx1.6.0脚本自动化安装

#!/bin/bash
# ------------------install Nginx 1.6.0 :: begin --------------------
nginx -v
if [ $? -eq 0 ];then
     nginx -v
     echo "nginx is exist..."
 else
     cd /app/service/tools
     tar zxvf nginx-1.6.0.tar.gz
     cd nginx-1.6.0
     ./configure --prefix=/usr/local/nginx      --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/nginx.pid      --user=nginx      --group=nginx      --with-http_ssl_module      --with-http_flv_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
     make && make install
     #创建用户
     groupadd nginx
     useradd -g nginx nginx
     
     mkdir -p /var/tmp/nginx/client
     #启动文件
     /usr/sbin/nginx
     #创建软连接
     ls -n /usr/sbin/nginx  /usr/bin/nginx
fi

本文出自 “xiaobao” 博客,谢绝转载!

原文:http://baoyc.blog.51cto.com/9092507/1911103


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!