nginx及tengine配置


nginx及tengine配置
 
最近工作需要,需要配置淘宝开发的tengine,查了一些资料。大致步骤如下:
  www.2cto.com  
1.首先安装tengine依赖的library pcre.jar
 
1.cd /usr/local/src #到指定的目录下
 
2.tar zxvf pcre-8.12.tar.gz
 
3.mkdir /usr/local/pcre   #创建安装目录hotspot-cd74fab0a5e3
 
4.cd pcre-8.12
 
5. ./configure --prefix=/usr/local/pcre   #配置
 
6.make
 
7.make install
2.安装tengine依赖的library openssl.jar
 
1.cd /usr/local/src #到指定的目录下
 
2.tar zxvf openssl-1.0.1c.tar.gz
 
3.cd openssl-1.0.1c
 
4. ./config --prefix=/usr/local/openssl
 
5.make
 
6.make install
2.3 安装zlib包
 
    1.cd /usr/local/src #到指定的目录下
 
2.tar zxvf openssl-1.2.5.tar.gz
 
3.cd openssl-1.2.5
 
4. ./config --prefix=/usr/local/zlib
 
5.make
 
6.make install
3.安装nginx
 
1.cd /usr/local/src #到指定的目录下
 
2.tar zxvf nginx.tar.gz
 
3.cd nginx-1.3.8
 
4. ./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/nginx/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --error-log-path=/usr/local/nginx/error.log --pid-path=/usr/local/nginx/nginx.pid --lock-path=/usr/local/nginx/nginx.lock  --with-http_stub_status_module --with-http_gzip_static_module --with-pcre=/usr/local/pcre-1.3.8 --with-zlib=/usr/local/zlib-1.2.5--with-openssl=/usr/local/openssl-8.12
 
#--with-pcre=/usr/local/src/pcre --对应pcre解压路径
 
#--sbin-path=/usr/local/nginx/sbin/nginx --nginx启动路径
 
#--conf-path=/usr/local/nginx/conf/nginx.conf --nginx配置文件的路径
 
#--error-log-path=/usr/local/nginx/error.log --日志存放路径
 
5.make
 
6.make install
nginx安装完后需要添加
 
proxy.conf -- nginx代理tomcat文件和nginx.conf路径相同
 
nginx.conf --需要修改
 
启动nginx /usr/local/nginx/sbin/下 nginx为启动nginx
 
停止nginx /usr/local/nginx/sbin/下 nginx为启动nginx -s stop
 
3.安装tengine  www.2cto.com  
 
1.cd /usr/local/src #到指定的目录下
 
2.tar zxvf tengine-1.4.2.tar.gz
 
3.cd hotpost
 
4.
     ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-openssl=/usr/local/src/openssl-1.0.1c --with-zlib=/usr/local/src/zlib-1.2.5 --with-pcre=/usr/local/src/pcre-8.12
 
#--prefix=/usr/local/nginx --对应是tengine的路径
 
#--with-openssl=/usr/local/src/openssl --对应openssl解压的路径 执行tar zxvf pcre-8.13.tar.gz后的路径
 
#--with-pcre=/usr/local/src/pcre --对应pcre解压路径
 
5.make
 
6.make install
提示可能环境不一样的话,它会报少zlib包。步骤同上。很容易解决。
 

相关内容

    暂无相关文章