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

一键安装tengine(nginx)脚本

时间:2016-05-03 20:40:04      阅读:309      评论:0      收藏:0      [点我收藏+]

标签:tengine nginx 一键安装 脚本

#!/bin/bash

#author: jorden

#date 2016-05-03

#version: 1.0



echo #####tengine 一键安装###

####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 you neet to do the next two 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"


本文出自 “jorden博客” 博客,请务必保留此出处http://jin544642965.blog.51cto.com/1389736/1769774

一键安装tengine(nginx)脚本

标签:tengine nginx 一键安装 脚本

原文地址:http://jin544642965.blog.51cto.com/1389736/1769774

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