首页 > 其他 > 详细

一键安装tengine(nginx)脚本

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

#!/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)脚本

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!