Tomcat9.0 Latest Version experience

Source: Internet
Author: User

Tomcat9.0 Latest Version experience
1. Install JDK 8 in rpm Mode

Software preparation: Download jdk8 first
: Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-4243151.html.

Download the rpm installation package of linux64-bit, wget plugin.

Source code: Ghost.

Wget download error, saying: Connection edelivery.oracle.com | 23.0.182.140 |: 443... connected. Error: the General Certificate Name "www.oracle.com" does not match the required host name "edelivery.oracle.com. To connect to edelivery.oracle.com in insecure mode, use '-- no-check-certificate '.

Therefore, after you open the download in the browser of the local pc Computer, upload the file to the linux server through securefx.

The rpm package is installed. The default path is/usr/java:

rpm -ivh jdk-8u66-linux-x64-demos.rpm

2. Add the 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. Make the jdk8 configuration take effect.

Source/etc/profile make the profile file take effect immediately

4. check jdk version
[root@oracle_standby jdk1.8.0_66]# echo $JAVA_HOME/usr/java/jdk1.8.0_66[root@oracle_standby jdk1.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_standby jdk1.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_standby jdk1.8.0_66]# java -versionjava version "1.7.0_09-icedtea"OpenJDK Runtime Environment (rhel-2.3.4.1.el6_3-x86_64)OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)[root@oracle_standby jdk1.8.0_66]# 
5. Configure the default JDK (this step can be omitted in general)

The default JDK exists in some Linux distributions, such as OpenJDK. So in order to make the installed JDK version become the default JDK version, we need to make the following configuration.
Run the following command:
Sudo update-alternatives-install/usr/bin/java/usr/java/jdk1.8.0 _ 66/bin/java 300
Sudo update-alternatives-install/usr/bin/javac/usr/java/jdk1.8.0 _ 66/bin/javac 300
Note: If the above two commands fail to find the path, restart the machine and repeat the above two lines of code.

Run the following code to view the current JDK versions and configurations:
Sudo update-alternatives-config java

6. tomcat9.0 download

Source code:
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 the archive directory.
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
Start 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
-# Change to Port 6000

Start tomcat
/Usr/local/app/apache-tomcat-9.0.0.M1_6000/bin/startup. sh

PS: Port 6000 in linux is up, but http: // 192.168.121.52: 6000 cannot be opened. If it is changed to 6100, OK:

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

Related Article

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.