下载地址:

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. JS对于Android和IOS平台的点击响应的适配

    IOS点击事件 Click 300毫秒点击延迟 解决办法: 参考:http://cuiqingcai.com/1687.html 可判断设备 if (/(iPhone|iPad|iPod|iOS)/i ...

  2. WPF Step By Step 自定义模板

    WPF Step By Step 自定义模板 回顾 上一篇,我们简单介绍了几个基本的控件,本节我们将讲解每个控件的样式的自定义和数据模板的自定义,我们会结合项目中的具体的要求和场景来分析,给出我们实现 ...

  3. linux 将debug信息重定向到LCD(屏幕)

    /*********************************************************************** * linux 将debug信息重定向到LCD(屏幕) ...

  4. 【Repost】A Practical Intro to Data Science

    Are you a interested in taking a course with us? Learn about our programs or contact us at hello@zip ...

  5. GFF format

    后记: ************************************************************************ 在使用cufflinks和cuffmerge中 ...

  6. lanuchy快捷操作

    down arrow: display history shift+delete: remove the item from the distory

  7. linux安装sqlcmd登录sqlserver

    首先从微软网站下载sqlncli安装文件,link. 因为是在内网安装,首先手工下载unixODBC2.3.0.tar.gz,下载后上传到服务器. 将下载的tar文件文件,放在同build_dm.sh ...

  8. Yii2中自带分页类实现分页

    1.首先写控制器层 先引用pagination类 use yii\data\Pagination; 写自己的方法: function actionFenye(){        $data = Fie ...

  9. sqlserver 索引

    什么是索引 拿汉语字典的目录页(索引)打比方:正如汉语字典中的汉字按页存放一样,SQL Server中的数据记录也是按页存放的,每页容量一般为4K .为了加快查找的速度,汉语字(词)典一般都有按拼音. ...

  10. makefile--统一目标输出目录 (六)

    原创博文,转载请标明出处--周学伟http://www.cnblogs.com/zxouxuewei/ 上一节我们把规则单独提取出来,方便了Makefile的维护,每个模块只需要给出关于自己的一些变量 ...