1,软件准备
cd /usr/local/src/
wget -c ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz
tar zxvf pcre-8.33.tar.gz
wget -c https://www.openssl.org/source/openssl-1.0.1h.tar.gz
tar zxvf openssl-1.0.1h.tar.gz
wget -c http://www.canonware.com/download/jemalloc/jemalloc-3.5.0.tar.bz2
tar jxvf jemalloc-3.5.0.tar.bz2
wget -c http://zlib.net/zlib-1.2.8.tar.gz
tar zxvf zlib-1.2.8.tar.gz
wget –c http://tengine.taobao.org/download/tengine-2.0.3.tar.gz
tar zxvf tengine-2.0.3.tar.gz
2,安装lua
wget http://www.lua.org/ftp/lua-5.1.5.tar.gz
yum install readline-devel
tar zxvf lua-5.1.5.tar.gz
cd lua-5.1.5
make linux
make install
echo "/usr/local/lib" >/etc/ld.so.conf.d/usr_local_lib.conf
/sbin/ldconfig
3,安装tengine
cd /usr/local/src/
cd tengine-2.0.3
./configure --prefix=/usr/local/nginx
--with-http_stub_status_module
--with-pcre=/usr/local/src/pcre-8.33
--with-openssl=/usr/local/src/openssl-1.0.1h
--with-zlib=/usr/local/src/zlib-1.2.8
--with-syslog--with-http_lua_module
--with-jemalloc=/usr/local/src/jemalloc-3.5.0
make && make install
4,测试tengine安装是否正常
tengine安装完毕后,检测下80端口是否有在使用:netstat -ano|grep 80
/usr/local/nginx/sbin/nginx(启动tengine)
/usr/local/nginx/sbin/nginx –t (检测conf配置文件是否异常)
/usr/local/nginx/sbin/nginx –s stop(停止tengine)
/usr/local/nginx/sbin/nginx –s reload(加载conf配置文件)
本文出自 “石头” 博客,请务必保留此出处http://410477.blog.51cto.com/400477/1625597
原文:http://410477.blog.51cto.com/400477/1625597