本文共 1082 字,大约阅读时间需要 3 分钟。
#!/bin/bash# ------------------install Nginx 1.6.0 :: begin --------------------nginx -vif [ $? -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/nginxfi
转载于:https://blog.51cto.com/baoyc/1911103