下载地址:

http://tengine.taobao.org/download_cn.html

$tar -xvzf tengine-2.1.2.tar.gz

$./configure
$ make
$ sudo make install

安装Nginx时报错

./configure:  error: the HTTP rewrite module requires the PCRE library.

安装pcre-devel解决问题
yum -y install pcre-devel

./configure: error: C compiler cc is not found

解决:

yum install gcc

错误提示:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library.   You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl=<path> options.

解决办法:

yum  -y install openssl openssl-devel

总结:

yum -y install pcre-devel openssl openssl-devel

./configure --prefix=/usr/local/nginx

make

make install

一切搞定

[root@webserver1 tengine]#  /usr/local/nginx/sbin/nginx   #启动nginx

[root@webserver1 tengine]# ./sbin/nginx -s stop
[root@webserver1 tengine]# ./sbin/nginx -s reload   #这个很常用哦,平滑更新配置。

chown nobody.nobody -R /usr/local/nginx/html 
chmod 700 -R /usr/local/nginx/html

四、设置Tengine开机启动

  vi /etc/rc.d/init.d/nginx  #编辑启动文件添加下面内容

#!/bin/bash
# Tengine Startup script# processname: nginx
# chkconfig: - 85 15
# description: nginx is a World Wide Web server. It is used to serve
# pidfile: /var/run/nginx.pid
# config: /usr/local/nginx/conf/nginx.conf
nginxd=/usr/local/nginx/sbin/nginx
nginx_config=/usr/local/nginx/conf/nginx.conf
nginx_pid=/usr/local/nginx/logs/nginx.pid
RETVAL=0
prog="nginx"
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x $nginxd ] || exit 0
# Start nginx daemons functions.
start() {
if [ -e $nginx_pid ];then
echo "tengine already running...."
exit 1
fi
echo -n $"Starting $prog: "
daemon $nginxd -c ${nginx_config}
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/nginx
return $RETVAL
}
# Stop nginx daemons functions.
stop() {
echo -n $"Stopping $prog: "
killproc $nginxd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/nginx /usr/local/nginx/logs/nginx.pid
}
reload() {
echo -n $"Reloading $prog: "
#kill -HUP `cat ${nginx_pid}`
killproc $nginxd -HUP
RETVAL=$?
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
stop
start
;; status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|restart|reload|status|help}"
exit 1
esac
exit $RETVAL

  保存退出

chmod 775 /etc/rc.d/init.d/nginx   #赋予文件执行权限
chkconfig --level 012345 nginx on #设置开机启动
/etc/rc.d/init.d/nginx restart

  四、配置Tengine
将nginx初始配置文件备份,我们要重新创建配置文件.

mv /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.bak

创建nginx用户www

groupadd www
useradd -g www www

  其余配置详见:

http://www.cnblogs.com/littlehb/archive/2013/04/02/2994686.html

tengine安装的更多相关文章

  1. Tengine 安装配置全过程

    Tengine官网上有个非常简单的教程,中间并未涉及到一些常用的设置,所以仅供参考.一下午为本人的安装步骤及过程. 1.安装必要的编译环境好 由于Tengine安装需要使用源代码自行编译,所以在安装前 ...

  2. Tengine安装(阿里baba的)-Nginx

    在先前的文章中介绍过Tengine,先前只是使用了运维人员配置好的内容,未自己进行过安装配置.周末闲来无事,对于Tengine进行了尝试性的安装.记录下面方便以后再做改进. Tengine官网上有个非 ...

  3. linux下tengine安装

    1.什么是tengine? 说到tengine,首先还是得说下nginx了,大家对于nginx并不陌生,对于基本的需求都能满足,如果是涉及高级性能,那么就必须使用商用版nginx plus了,一谈到商 ...

  4. Centos 上 Tengine安装

    安装步骤: 1.系统环境 1.1 更新系统 [root@centos ~]# yum update -y 1.2 查看环境 [root@centos ~]# cat /etc/redhat-relea ...

  5. centos6.5为tengine安装php 5.6支持

    1.到php官网下载最新的php版本 http://php.net/ 我下载的是php-5.6.28.tar.bz2 2.编译安装 2.1安装依赖 2.1.1 解决libxml2和xml2-confi ...

  6. tengine安装lua

    转子: http://www.cnblogs.com/shengshuai/p/4244851.html 参考: http://www.ttlsa.com/nginx/nginx-lua/ 学习:ht ...

  7. Tengine安装配置

    为了加快网站的大流量访问速度,公司要求把Nginx更换为Tengine,下面记录下整个安装配置过程: #安装必要依赖 yum install -y pcre pcre-devel zlib zlib- ...

  8. 淘宝开源Web服务器Tengine安装教程

    简介Tengine是由淘宝核心系统部基于Nginx开发的Web服务器,它在Nginx的基础上,针对大访问量网站的需求,添加了很多功能和特性.Tengine的性能和稳定性已经在大型的网站如淘宝网,淘宝商 ...

  9. ubuntu tengine 安装

    参考文章:http://wangyan.org/blog/install-openssl-from-source.html http://www1.site90.com/Linux/405.html ...

随机推荐

  1. AmazeUI常用组件

    按钮样式 <span class="am-badge">1</span>  #正方形 <span class="am-badge am-ba ...

  2. Squid Proxy Server 3.1

    Improve the performance of your network using the caching and access control capabilitiess of squid. ...

  3. Mobile phones_二维树状数组

    [题意]给你一个矩阵(初始化为0)和一些操作,1 x y a表示在arr[x][y]加上a,2 l b r t 表示求左上角为(l,b),右下角为(r,t)的矩阵的和. [思路]帮助更好理解树状数组. ...

  4. 《JavaScript模式》第1章 简介

    @by Ruth92(转载请注明出处) 第1章 简介 模式 模式:是指一个通用问题的解决方案. 设计模式 编码模式 反模式:常见的.引发问题比解决的问题更多的一种方法. JavaScript 基本概念 ...

  5. day10_面向对象第五天

    1.包(掌握) 1.概念(掌握)       包就是文件夹,用于区分相同的类名 2.声明格式      package 包名1.包名2-.;      package:是个关键字3.带包的类的编译和运 ...

  6. dedecms 按照栏目指定的id排序

    方法: 1.打开include/taglib/channelartlist.lib.php,找到大约78行,把 代码如下(一定要注意表名一致): $dsql->SetQuery("SE ...

  7. find 和 locate 命令

    一, find 命令 find 命令有三部分构成 1,你要搜索的目录 (. 当前目录, ~家目录, /根目录). 2,你的搜索条件. 3,搜索到后要执行的动作. 常用命令: 1, find . -na ...

  8. 使用jetty-maven-plugin插件进行测试

    为了能够使用maven的jetty插件对项目进行测试,需要进行如下操作: (1)修改maven配置文件 为了能够在命令行中使用jetty命令,需要修改maven的配置文件settings.xml文件, ...

  9. Matlab 的reshape函数(转)

    看Matlab的help文档讲得不是清楚. 先给上一段代码: >> a=[1 2 3;4 5 6;7 8 9;10 11 12]; >> b=reshape(a,2,6); 这 ...

  10. ScrollView和ListView的冲突问题

    在ScrollView添加一个ListView会导致listview控件显示不全,这是因为两个控件的滚动事件冲突导致.所以需要通过listview中的item数量去计算listview的显示高度,从而 ...