下载nginx: wget http://nginx.org/download/nginx-1.8.0.tar.gz
下载openssl : wget http://www.openssl.org/source/openssl-fips-2.0.9.tar.gz
下载zlib : wget http://zlib.net/zlib-1.2.8.tar.gz
下载pcre : wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
安装编译工具
yum-y install make zlib zlib-devel gcc-c++libtool openssl openssl-devel
安装 PCRE
下载PCRE wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
解压:tar zxvf pcre-8.35.tar.gz
编译安装: ./configure && make &&make install
安装nginx
下载 wget http://nginx.org/download/nginx-1.6.2.tar.gz
解压: tar zxvf nginx-1.6.2.tar.gz
编译安装 :./configure && make && make install
出现问题 ./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
原因 64位机器上nginx读取的pcre文件为/lib64/libpcre.so.1文件,默认安装pcre时libpcre.so文件安装在/usr/local/lib/目录下,所以输入/opt/nginx/sbin/nginx -V 找不到文件路径!!
切换路径: cd /usr/local/lib 执行 ln -s /usr/local/lib/libpcre.so.1 /lib64/
测试安装成功:/usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
安装jdk
没有找到现成的安装地址 从官网下载下来jdk-8u144-linux-x64.tar.gz
解压 tar zxvf jdk-8u144-linux-x64.tar.gz
配置环境变量vi /etc/profile
添加如下
#set java environment
JAVA_HOME=/usr/local/java/jdk1.8.0_144
JRE_HOME=/usr/local/java/jdk1.8.0_144//jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH
让修改生效 source /etc/profile
安装tomcat
没有找到现成的安装地址 从官网下载下来apache-tomcat-8.5.20.tar.gz
解压 tar zxvf apache-tomcat-8.5.14.tar.gz
修改配置文件:vim catalina.sh
CATALINA_HOME=/usr/local/tomcat8.0/
然后 chmod +x *.sh
大功告成