安装环境:
Red Hat Enterprise Linux Server release 7.6 (Maipo)
安装包:
nginx-1.14.2.tar.gz
apache-tomcat-10.0.0-M4.tar.gz
pcre-8.42.tar.gz
zlib-1.2.8.tar.gz
依赖包:
libstdc++-devel-4.8.5-36.el7.x86_64.rpm
libstdc++-4.8.5-36.el7.x86_64.rpm
gcc-c++-4.8.5-36.el7.x86_64.rpm
===================================
安装概览:
1、安装tomcat01和tomcat02
2、安装nginx
安装操作:
(2)tomcat安装
tar -zxvf apache-tomcat-10.0.0-M4.tar.gz
复制成两套tomcat01和tomcat02
bin/setclasspath.sh中添加JAVA路径 :
export JAVA_HOME=/home/ops/jdk1.8.0_181
修改conf/server.xml中的端口,保证tomcat01和tomcat02内的端口不重复!!!
(2)nginx安装
tar -zxvf nginx-1.14.2.tar.gz
cd nginx-1.14.2/
./configure --prefix=/home/nginx/nginx --with-pcre=/home/nginx/pcre-8.42 --with-zlib=/home/nginx/zlib-1.2.8 ----需要安装上库
make && make install
完成安装,查看版本信息:
修改conf/nginx.conf端口配置
启动服务: sbin/nginx -c /home/nginx/nginx/conf/nginx.conf
打开web页面查看:
==================================================
安装报错问题补充:
相关下载地址友情提示
http://nginx.org/download/nginx-1.14.2.tar.gz
https://sourceforge.net/projects/pcre/files/pcre/8.42/pcre-8.42.tar.gz/download
https://linux.softpedia.com/get/Programming/Libraries/zlib-159.shtml
or
http://www.downza.cn/soft/211857.html
https://blog.csdn.net/u013014761/article/details/100051147
- 需要安装zlib库:
- 需要安装PRCE库:
- 需要安装gcc gcc++
- 需要修改nginx配置:
注释下面一句:
- 修改80端口为其他非占用的端口: