Linux Server Installation Jdk+tomcat

Source: Internet
Author: User

First, the tool

1.1, SECURECRTSECUREFX_7.0.0.326:HTTPS://YUNPAN.CN/CRNXRV2EAQMWD access password a018

1.2, JDK: Ask Niang

1.3. Tomcat: Ibid.

Second, the operation of step 2.1, the use of tools securecrtsecurefx_7.0.0.326 1.1, 1.2, 1.3 three packets uploaded to the/home/soft folder

2.2. Configuring the JDK environment variables

TAR-XZVF jdk-8u45-linux-x64.tar.gz

Then move the JDK package to the/usr/local/folder

MV Jdk1.8.0_45/user/local

Copy a profile before configuring the environment variable

Cp/etc/profile/etc/profile1

Then edit the profile file

Vi/etc/profile then click I to enter insert mode

Find export ..... Then add the following code below it

Export java_home=/usr/local/jdk1.8.0_45

Export JRE_HOME=/USR/LOCAL/JDK1.8.0_45/JRE

Export path= $PATH:/usr/local/jdk1.8.0_45/bin

Export Classpath=./:/usr/local/jdk1.8.0_45/lib:/usr/local/jdk1.8.0_45/jre/lib

Then press the ESC key to exit Insert mode and type: Wq exit. Then enter Source/etc/profile to make it effective. The configuration is complete.

Input Java, Javac, java-version to detect

Java

Javac

Iii. installing tomcat and modifying the firewall Port 3.1 unzip Tomcat

TAR-XZVF tomcat-7.0.61.tar.gz

Renamed

MV tomcat-7.0.61 TOMCAT7

Then move to the/home/folder

MV tomcat7/home/

3.2. Start Tomcat

CD Tomcat7/bin

Then type./startup.sh to start Tomcat

3.3, start the firewall 8080 port

After the 3.2 tomcat boot succeeds, access is not found in the Address bar, enter the following command

Service Iptables Status

found that only 22 ports are accessible, so here we modify the configuration file, enter the following command

Vi/etc/sysconfig/iptables

Press I to enter insert mode

Copy the following statement
-A input-m state--state new-m tcp-p TCP--dport 22-j ACCEPT

Modified 22 to 8080
-A input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT

Press ESC to exit Insert mode, and then type: Wq Save to exit

Then restart the firewall
Service Iptables Restart

8080 Port configured successfully

Then enter http://Your ip:8080/in the browser and return to the following page, then Tomcat installs and starts successfully.

Linux Server Installation Jdk+tomcat

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.