最近工做須要,須要配置淘寶開發的tengine,查了一些資料。大體步驟以下:nginx
1.首先安裝tengine依賴的library pcre.jartomcat
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.jarpost
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安裝完後須要添加code
proxy.conf -- nginx代理tomcat文件和nginx.conf路徑相同ip
nginx.conf --須要修改ssl
啓動nginx /usr/local/nginx/sbin/下 nginx爲啓動nginx開發
中止nginx /usr/local/nginx/sbin/下 nginx爲啓動nginx -s stopopenssl
3.安裝tengine
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包。步驟同上。很容易解決。