码迷,mamicode.com
首页 > 其他好文 > 详细

nginx安装部署脚本

时间:2017-10-18 20:04:53      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:运行脚本

#!/bin/bash

##############################################################

# File Name: c.sh

# Version: V1.0

# Author: wanglong

# Organization: www.oldboyedu.com

# Created Time : 2017-08-29 12:01:03

# Description:

##############################################################

[ -d /home/oldboy/tools ]||mkdir -p /home/oldboy/tools

[ -d /application ]||mkdir -p /application

id www

[ $? -eq 0 ]||useradd www -s /sbin/nologin -M

rpm -qa pcre pcre-devel

[ $? -eq 0 ]&&yum install pcre pcre-devel -y

rpm -qa openssl openssl-devel

[ $? -eq 0 ]&&yum install openssl openssl-devel -y

cd /home/oldboy/tools/&&wget http://nginx.org/download/nginx-1.10.3.tar.gz

[ $? -eq 0 ]&&\

tar xf nginx-1.10.3.tar.gz

cd nginx-1.10.3

./configure --user=www --group=www --prefix=/application/nginx-1.10.3 --with-http_stub_status_module --with-http_ssl_module

[ $? -eq 0 ]&&\

make&&make install

[ $? -eq 0 ]&&\

ln -s /application/nginx-1.10.3 /application/nginx

cd /application/nginx/conf/&&egrep -v "#|^$" nginx.conf.default >nginx.conf

lsof -i:80

[ $? -eq 0 ]&&echo qidong||/application/nginx/sbin/nginx


本文出自 “勤能补拙” 博客,请务必保留此出处http://dalongge.blog.51cto.com/13121286/1973810

nginx安装部署脚本

标签:运行脚本

原文地址:http://dalongge.blog.51cto.com/13121286/1973810

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!