TOMCAT 7安装实录
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了TOMCAT 7安装实录相关的知识,希望对你有一定的参考价值。
安装APR
[[email protected] ~]# cd /usr/local/src
[[email protected] src]# tar zxvf apr-1.6.3.tar.gz
[[email protected] src]# cd apr-1.6.3
[[email protected] apr-1.6.3]# ./configure --prefix=/usr/local/apr
[[email protected] apr-1.6.3]# make & make install
[[email protected] ~]# cd /usr/local/src
[[email protected] src]# tar -zxvf apr-iconv-1.2.2.tar.gz
[[email protected] src]# cd apr-iconv-1.2.2
[[email protected] apr-iconv-1.2.2]# ./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
[[email protected] apr-iconv-1.2.2]# make & make install
[[email protected] ~]# cd /usr/local/src
[[email protected] ~]# tar zxvf apr-util-1.6.1.tar.gz
[[email protected] ~]# cd apr-util-1.6.1
[[email protected] apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv
[[email protected] apr-util-1.6.1]# make & make install
安装JDK
[[email protected] ~]# yum remove -y java-1.7.0-openjdk
[[email protected] ~]# yum remove -y java-1.6.0-openjdk
[[email protected] ~]# cd /usr/local/src
[[email protected] src]# tar zxvf jdk-7u80-linux-x64.tar.gz
[[email protected] src]# mv jdk1.7.0_80 /usr/local
[[email protected] src]# vi /etc/profile
JAVA_HOME=/usr/local/jdk1.7.0_80
JAVA_BIN=/usr/local/jdk1.7.0_80/bin
PATH=$PATH:$JAVA_BIN
CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
export LD_LIBRARY_PATH=/usr/local/apr/lib
[[email protected] src]# java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
OPENSSL版本升级
[[email protected] ~]# cd /usr/local/src
[[email protected] src]# tar -zxvf openssl-1.0.2n.tar.gz
[[email protected] src]# cd openssl-1.0.2n
[[email protected] openssl-1.0.2n]# ./config --prefix=/usr/local/openssl -fPIC
[[email protected] openssl-1.0.2n]# make & make install
[[email protected] openssl-1.0.2n]# mv /usr/bin/openssl ~
[[email protected] openssl-1.0.2n]# ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
[[email protected] ~]# openssl version
OpenSSL 1.0.2n 7 Dec 2017
安装TOMCAT
[[email protected] ~]# cd /usr/local/src
[[email protected] src]# tar -zxvf apache-tomcat-7.0.75.tar.gz
[[email protected] src]# mv apache-tomcat-7.0.75 /usr/local/
[[email protected] src]# cd /usr/local/apache-tomcat-7.0.75/bin/
[[email protected] bin]# chmod +x *.sh
[[email protected] bin]# vim catalina.sh
CATALINA_HOME=/usr/local/apache-tomcat-7.0.75
JAVA_HOME=/usr/local/jdk1.7.0_80
安装TOMCAT-NATIVE
[[email protected] ~]# cd /usr/local/apache-tomcat-7.0.75/bin
[[email protected] bin]# tar zxvf tomcat-native.tar.gz
[[email protected] bin]# cd /usr/local/apache-tomcat-7.0.75/bin/tomcat-native-1.2.10-src/native
[[email protected] native]# ./configure --with-apr=/usr/local/apr --with-java-home=/usr/local/jdk1.7.0_80 --with-ssl=/usr/local/openssl
[[email protected] native]# make & make install
启动TOMCAT
[[email protected] ~]# /usr/local/apache-tomcat-7.0.75/bin/catalina.sh start
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/local/jdk
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
[[email protected] ~]# tail -n 200 /usr/local//apache-tomcat-7.0.75/logs/catalina.out
INFO: Loaded APR based Apache Tomcat Native library 1.2.10 using APR version 1.6.3.
以上是关于TOMCAT 7安装实录的主要内容,如果未能解决你的问题,请参考以下文章
CentOS 7安装KVM虚拟机OpenSUSE42操作实录