1.Tengine介绍及安装说明

Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。实验环境说明:

[root@localhost /]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 5.1 (Tikanga)

[root@localhost /]#

2.安装步骤

第一步,下载tengine.tar.gz

[root@localhost local]# pwd
/usr/local
[root@localhost local]# ls
bin  etc  games  include  lib  libexec  sbin  share  src  tengine.tar.gz
[root@localhost local]#

第二步,解压并展开归档

[root@localhost local]# tar -xf tengine.tar.gz
[root@localhost local]# ls -l
total 1608
drwxr-xr-x  2 root root    4096 Jul  2 05:06 bin
drwxr-xr-x  2 root root    4096 Oct 10  2006 etc
drwxr-xr-x  2 root root    4096 Oct 10  2006 games
drwxr-xr-x  3 root root    4096 Jul  2 05:06 include
drwxr-xr-x  3 root root    4096 Jul  2 05:06 lib
drwxr-xr-x  2 root root    4096 Oct 10  2006 libexec
drwxr-xr-x  2 root root    4096 Oct 10  2006 sbin
drwxr-xr-x  6 root root    4096 Jul  2 05:06 share
drwxr-xr-x  2 root root    4096 Oct 10  2006 src
drwxrwxr-x 10  511  511    4096 Mar 28 00:57 tengine-2.0.2
-rw-r--r--  1 root root 1552937 Jul 22 05:52 tengine.tar.gz
[root@localhost local]# tree -L 1 tengine-2.0.2/
tengine-2.0.2/
|-- AUTHORS.te
|-- CHANGES
|-- CHANGES.cn
|-- CHANGES.ru
|-- CHANGES.te
|-- LICENSE
|-- README
|-- README.markdown
|-- THANKS.te
|-- auto
|-- conf
|-- configure
|-- contrib
|-- docs
|-- html
|-- man

第三步,查看configure脚本帮助信息,执行configure脚本生成makefile文件

[root@localhost tengine-2.0.2]# ./configure --help--help                             print this message--prefix=PATH                      set installation prefix--sbin-path=PATH                   set nginx binary pathname--conf-path=PATH                   set nginx.conf pathname
[root@localhost tengine-2.0.2]# ./configure --prefix=/usr/local/tengine --conf-path=/etc/tengine/tengine.conf

会发现命令执行后,报错:

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

You can either disable the module by using --without-http_rewrite_module

option, or install the PCRE library into the system, or build the PCRE library

statically from the source with nginx by using --with-pcre=<path> option.

其实,上面的错误,原因在于PCRE依赖,我们可以明确指出不需要REWRITE功能特性,从而不需要编译HTTP_REWRITE_MODULE模块,或者直接安装PCRE,解决依赖冲突。

第四步,解决PCRE依赖

采用光盘YUM源的方式。

在/etc/yum.reps.d/目录下,配置客户端连接YUM的信息:

[root@localhost yum.repos.d]# cat mytest.repo
[my_yumtest1]
name=my yum from dvd.iso
baseurl=file:///var/Server
enabled=1
gpgcheck=0

挂载光盘至/media下,然后复制光盘内容到YUM路径:

[root@localhost repodata]# cp -r /media/Server/  /var/

进入/var/Server目录下,安装createrepo工具:

[root@localhost repodata]# rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm

然后创建YUM仓库:

[root@localhost repodata]# createrepo -g /media/Server/repodata/comps-rhel5-server-core.xml  /var/Server/

至此,我们的本地YUM源已经做好了。直接利用yum install pcre-devel即可。

【其实,我们应该确定,我们本机上已经具备基本的编译开发环境,可以

yum groupinstall "Development Libraries" "Development Tools"】

第五步,执行configure

[root@localhost tengine-2.0.2]# ./configure --prefix=/usr/local/tengine --conf-path=/etc/tengine/tengine.conf

并没有提示错误。

第六步,执行make

第七步,执行make install

[root@localhost local]# cd tengine
[root@localhost tengine]# ls -l
total 40
drwxr-xr-x 2 root root 4096 Jul 22 06:45 html
drwxr-xr-x 2 root root 4096 Jul 22 06:45 include
drwxr-xr-x 2 root root 4096 Jul 22 06:45 logs
drwxr-xr-x 2 root root 4096 Jul 22 06:45 modules
drwxr-xr-x 2 root root 4096 Jul 22 06:45 sbin
[root@localhost tengine]# pwd
/usr/local/tengine
[root@localhost tengine]#

第八步,启动服务

[root@localhost ~]# cd /usr/local
[root@localhost local]# ls -l
total 80
drwxr-xr-x  2 root root 4096 Jul  2 05:06 bin
drwxr-xr-x  2 root root 4096 Oct 10  2006 etc
drwxr-xr-x  2 root root 4096 Oct 10  2006 games
drwxr-xr-x  3 root root 4096 Jul  2 05:06 include
drwxr-xr-x  3 root root 4096 Jul  2 05:06 lib
drwxr-xr-x  2 root root 4096 Oct 10  2006 libexec
drwxr-xr-x  2 root root 4096 Oct 10  2006 sbin
drwxr-xr-x  6 root root 4096 Jul  2 05:06 share
drwxr-xr-x  2 root root 4096 Oct 10  2006 src
drwxr-xr-x 12 root root 4096 Jul 22 06:47 tengine
[root@localhost local]# cd tengine/
[root@localhost tengine]# cd sbin
[root@localhost sbin]# ls
dso_tool  nginx
[root@localhost sbin]# ls -l
total 4720
-rwxr-xr-x 1 root root   17164 Jul 22 06:45 dso_tool
-rwxr-xr-x 1 root root 4792174 Jul 22 06:45 nginx
[root@localhost sbin]#

很显然,nginx脚本就是用于启动服务的,为了以后方便而言,可以再/etc/profile文件中修改PATH环境变量。

PATH=$PATH:/usr/local/tengine/sbin

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

接下来,应该让配置文件生效,可以source /etc/profile或者,我们直接在开一个SSH连接。

[root@localhost ~]# nginx
[root@localhost ~]# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      3769/portmap
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      5523/nginx: master
tcp        0      0 0.0.0.0:1009                0.0.0.0:*                   LISTEN      3795/rpc.statd
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      3041/cupsd
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      4076/sendmail: acce
tcp        0      0 :::22                       :::*                        LISTEN      4050/ssh

d

可以发现,tengine已经在80端口进行监听了。

第九步,访问浏览器进行验证

如果访问没有结果,可能是由于LINUX防火墙的原因,可以利用下面的命令暂时停止防火墙功能:

/etc/init.d/iptables stop

到这里,我们就完成了对Tengine的安装和启动了。

转载于:https://blog.51cto.com/zhangfengzhe/1441637

一次安装tengine的经历相关推荐

  1. centos7离线安装tengine所需依赖

    离线安装tengine所需rpm包

  2. linux下 安装tengine

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

  3. amd平台运行linux,在amd64平台上安装linux的经历

    在amd64平台上安装linux的经历 (2011-08-29 01:36:25) 标签: 杂谈 在amd64平台上安装linux的经历在amd64平台上安装linux的经历 硬件:Althon 64 ...

  4. Linux7安装系统服务,CentOs7 安装Tengine 并设置成系统服务,开机自动启动。

    本文使用Tengine-2.1.2.tar.gz  官方下载地址:http://tengine.taobao.org/download_cn.html. http://tengine.taobao.o ...

  5. 安装tengine及淘宝会话保持模块

    安装tengine及淘宝会话保持模块 下载http://tengine.taobao.org/ 解压tar -zxvf tengine-2.3.0.tar.gz 安装GCC: yum -y insta ...

  6. wamp 远程操作安装的痛苦经历 用teamviewer 旺旺远程连接

    wamp 远程操作安装的痛苦经历 1.用teamviewer 2 用旺旺远程连接 操作wamp  右下角任务管理器..根本不能操作 提手需要对软件授权.(teamviewer),同样不能操作任务管理器 ...

  7. CentOS 7 安装 Tengine

    Tengine介绍 Tengine是由淘宝网发起的Web服务器项目.它在Nginx 的基础上,针对大访问量网站的需求,添加了很多高级功能和特性.Tengine的性能和稳定性已经在大型的网站如淘宝网 , ...

  8. tengine php mysql_安装Tengine php mysql

    安装Tengine php mysql 系统环境: [root@web02 soft]# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-ia ...

  9. 记一次libfreenect2安装配置的经历

    libfreenect2是一个Kinect for Windows v2设备的开源跨平台驱动程序.因为接下来需要通过kinect(微软旗下的一款应用于xbox的体感设备)来获取深度信息,以及物体轮廓框 ...

最新文章

  1. fedora mysql默认密码忘记_Linux fedora 24 忘记密码图形化界面修改root密码的方法
  2. Python A+B问题
  3. python打包成apk界面设计_Stephen的SEM博客
  4. 以色列:新发明大幅提高太阳能发电效率
  5. JMH性能测试,试试你代码的性能如何
  6. x86 服务器常见问题和故障诊断流程
  7. django之get filter
  8. Android完全关闭(退出)应用程序
  9. LINUX下用C遍历一个目录的代码
  10. Spring IOC核心源码学习
  11. php手机网页_使用PHPCMS搭建wap手机网站
  12. 层次分析法(AHP)
  13. TensorFlow Objection Detection API使用教程
  14. 俞优静的“航海”人生-搜狐财经
  15. PVE booting from Hard Disk
  16. 前端面试--什么是防抖和节流
  17. [UNR#2]黎明前的巧克力
  18. android判断是否安装应用程序,android如何判断一个软件是否安装以及打开手机应用商店...
  19. 一枚程序媛的java人生—2018年年终总结
  20. uniapp 微信小程序 获取图形验证码解决方案

热门文章

  1. 移动管理进步显著 企业仍然面临风险
  2. Java:批量插入、修改数据到数据库中的用法
  3. Armchart Js版属性学习与总结
  4. .NET中常见的内存泄露问题——GC、委托事件和弱引用
  5. [每天一个知识点]31-乱七八糟-如何判断预言有效
  6. jsp 中实现点击按钮 实现页面跳转到HTML
  7. apache + subversion + Windows认证
  8. AutoHotKey Script解密
  9. 基于Spark的电影推荐系统(电影网站)
  10. 如何在Java客户端调用RESTful服务