#!/bin/bash
#author: Jorden
#date 2016-05-03
#version: 1.0
Echo # # # # #tengine One-click installation # # #
# # # #install Dependent package#####
Yum-y install OpenSSL openssl-devel zlib gcc gcc-c++ pcre cmake pcre pcre-devel
echo ""
echo "# # #add user and group######"
v_www= ' Cat/etc/passwd|grep www|wc-l '
if [v_www=0];then
Groupadd www
Useradd www-s/sbin/nologin-m-G www
Else
Echo-e "\033[31m user ' www ' already exists! Noting to do \033[0m "
Fi
echo ""
Echo-e "\033[32m ###### #install tengine to/usr/local/tengine####### \033[0m"
echo "wget tengine to/usr/local/src"
Cd/usr/local/src
wget http://tengine.taobao.org/download/tengine-2.0.3.tar.gz
Tar XF tengine-2.0.3.tar.gz
CD tengine-2.0.3
./configure--prefix=/usr/local/tengine--user=www--group=www--with-select_module--with-poll_module-- With-file-aio--with-http_ssl_module--with-http_realip_module--with-http_gzip_static_module--with-http_stub_ Status_module--with-http_spdy_module--with-http_secure_link_module--with-http_flv_module--with-http_concat_ module=shared--with-http_sysguard_module=shared--with-http_sub_module--with-http_stub_status_module--with-http _ssl_module
Make
Make install
echo ""
echo "Last Neet-do the next" steps "
Echo-e "\033[31m # # # #1. Configure the nginx.conf#### \033[0m"
Echo-e "\033[31m # # # #2. Start tengine use:/usr/local/tengine/sbin/nginx-c/usr/local/tengine/conf/nginx.conf # # # \033 [0m]
This article is from the "Jorden blog" blog, please be sure to keep this source http://jin544642965.blog.51cto.com/1389736/1769774
Install Tengine (nginx) script with one click