标签:运行脚本
#!/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
标签:运行脚本
原文地址:http://dalongge.blog.51cto.com/13121286/1973810