1.tengine的系统服务启动脚本:
#!/bin/sh
#
# tengine - this script starts and stops the tengine daemon
#
# chkconfig: - 86 19
# description: Tengine is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# scriptname: /etc/init.d/tengine
#
#################################################################
#
# processname: tengine
# attention: this tengine's prefix path installed is "/application/tengine".(/application/tengine is a soft link of /application/nginx)
# config: /application/tengine/conf/tengine.conf
# config: /etc/sysconfig/tengine
# pidfile: /application/tengine/logs/tengine.pid
#################################################################
#
#################################################################
# The method of installing tengine is done below:
#阿里云镜像:
#https://mirrors.aliyun.com 即:https://opsx.alibaba.com/mirror
# CentOS yum源配置方法:
# 1、备份:
# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/:
# CentOS 6:
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
# 或者
# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
# CentOS 7:
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# 或者
# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# 3、之后运行yum makecache生成缓存
# 4、其他:
# 非阿里云ECS用户会出现 Couldn't resolve host 'mirrors.cloud.aliyuncs.com' 信息,不影响使用。用户也可自行修改相关配置: eg:
# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
#
# CentOS epel
# epel 配置方法
# 1、备份(如有配置其他epel源):
# mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
# mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
# 2、下载新repo 到/etc/yum.repos.d/:
# epel(RHEL 7)
# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
# epel(RHEL 6)
# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
# epel(RHEL 5)
# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo
#
#su - root
#yum -y install lrzsz dos2unix nmap nc tree telnet
#mkdir -p /root/tools && cd /root/tools
#wget http://tengine.taobao.org/download/tengine-2.1.2.tar.gz
#mkdir -p /root/source
#tar xzvf tengine-2.1.2.tar.gz -C /root/source/
#cd /root/source/tengine-2.1.2
#mkdir -p /application/nginx
#useradd -s /sbin/nologin -r -M tengine
#yum -y install gcc openssl-devel pcre-devel zlib-devel libxml2-devel libxslt-devel gd-devel lua-devel geoip-devel
#./configure --help
#./configure --prefix=/application/nginx --user=tengine --group=tengine --enable-mods-static=all --enable-mods-shared=all
#make && make install && echo -e "\n\nInstallation is OK"
#
#
#################################################################
#
#importantly,this script is writed and modified according to the starting script of nginx's service(such as /etc/init.d/nginx).
#
#author:freeflybird
#blog:https://blog.csdn.net/CPPCPPCPPCPP
#################################################################
# required to use "root" user.
[