tomcat9.0 latest version of the first experience

Source: Internet
Author: User

1,rpm Mode installation Jdk8

software Preparation: Download Jdk8 first
: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.

Download the linux64-bit version of the RPM installation package, wget http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.rpm.

Source: http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz.

wget下载报错,说:正在连接 edelivery.oracle.com|23.0.182.140|:443... 已连接。错误: 证书通用名 “www.oracle.com” 与所要求的主机名 “edelivery.oracle.com” 不符。要以不安全的方式连接至 edelivery.oracle.com,使用‘--no-check-certificate’。

So after the local PC browser opens the download, it is uploaded to the Linux server via Securefx.

RPM package installation, default in/usr/java path:

RPM-IVH jdk-8u66-linux-x64-demos.rpm

2. Add JDK8 configuration at the end of the/etc/profile file
vim /etc/profile JAVA_HOME=/usr/java/jdk1.8.0_66PATH=$JAVA_HOME/bin:$PATHCLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jarexport PATH JAVA_HOME CLASSSPATH
3, let JDK8 configuration take effect

Source/etc/profile make profile file effective immediately

4,check JDK Version
[Root@oracle_standbyJdk1.8.0_66]# echo $JAVA _home/usr/java/jdk1.8.0_66[Root@oracle_standbyJdk1.8.0_66]# echo $CLASSPATH/usr/java/jdk1.8.0_66/jre/lib/Ext:/usr/java/jdk1.8.0_66/lib/tools.jar[root@oracle_standbyJdk1.8.0_66]# echo $PATH/usr/java/jdk1.8.0_66/Bin:/usr/lib64/qt-3.3/Bin:/usr/local/sbin:/usr/local/Bin:/sbin:/Bin:/usr/sbin:/usr/Bin:/root/bin[root@oracle_standbyJdk1.8.0_66]# java-versionJava version"1.7.0_09-icedtea"OpenJDK Runtime Environment(rhel-2.3.4.1. el6_3-x86_64)OpenJDK  --Bit Server VMS(Build23.2-B09, mixed mode) [root@oracle_standbyJdk1.8.0_66]# 
5, configure default JDK (usually this step can be omitted)

Some Linux distributions already have default JDK, such as OPENJDK. So in order to make the JDK version we just installed can be the default JDK version, we will also make the following configuration.
Execute the following command:
sudo update-alternatives–install/usr/bin/java Java/usr/java/jdk1.8.0_66/bin/java 300
sudo update-alternatives–install/usr/bin/javac Javac/usr/java/jdk1.8.0_66/bin/javac 300
Note: If the above two commands do not find a path problem, just restart the machine and repeat the above two lines of code is OK.

Execute the following code to see the current various JDK versions and configurations:
sudo update-alternatives–config java

6,tomcat9.0 Download

Source:
wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-9/v9.0.0.M1/src/apache-tomcat-9.0.0.M1-src.tar.gz
TAR-XVF apache-tomcat-9.0.0.m1-src.tar.gz
CD APACHE-TOMCAT-9.0.0.M1-SRC

: Go to this archive directory, http://archive.apache.org/dist/tomcat/tomcat-9/v9.0.0.M1/bin/, see apache-tomcat-9.0.0.m1.tar.gz version, download it down.
wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-9/v9.0.0.M1/bin/apache-tomcat-9.0.0.M1.tar.gz

Installation Document Address: http://tomcat.apache.org/tomcat-9.0-doc/setup.html
To start the installation:
Mkdir-p/usr/local/app/
TAR-XVF apache-tomcat-9.0.0.m1.tar.gz-c/usr/local/app/
MV Apache-tomcat-9.0.0.m1 apache-tomcat-9.0.0.m1_6000
Vim./conf/server.xml
:%/80/60/g
-#修改成6000端口

Start Tomcat
/usr/local/app/apache-tomcat-9.0.0.m1_6000/bin/startup.sh

Ps:linux under 6000 port up, but http://192.168.121.52:6000 dead and alive can not open, later changed to 6100 OK:

vim ./conf/server.xml:%/60/61/g

tomcat9.0 latest version of the first experience

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.