Linux common commands-jdk and tomcat

Source: Internet
Author: User

I. Installation and configuration of the JDK

1. Download the JDK file

Go to the official website to download Linux 64-bit jdk-8u131-linux-x64.tar.gz

2. Upload to/usr/local using the FTP tool.

Use the command: TAR-ZXVF jdk-8u131-linux-x64.tar.gz for decompression

3. Configuring environment Variables (/etc/profile)

Using the command: Vim/etc/profile, place the following three lines at the end of the file

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

Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

Export path= $JAVA _home/bin: $PATH

4. Make the environment variable effective immediately

Use command: Source/etc/profile or. /etc/profile

JDK installation and configuration is complete, try to configure the success.

Use commands: Java-version and javac to see if they are normal.

Second, the installation and configuration of Tomcat

1. Download Tomcat

Apache-tomcat-8.0.44.tar.gz

2. Upload to/usr/local using the FTP tool.

Use the command: TAR-ZXVF apache-tomcat-8.0.44.tar.gz for decompression

3. Start Tomcat

Use command:/usr/local/apache-tomcat-8.0.44/bin/startup.sh

4. Visit: http://ip:8080

If you cannot access it, it is because the Linux firewall prohibits access to port 8080

Using the command: Service iptables stop, the CENTOS7 system will prompt the following error message.

This is because CentOS starts with the 7 default is FIREWALLD, this is based on iptables, although there is iptables core,

But Iptables's service is not installed. So you just stop FIREWALLD service:

Execute: sudo systemctl stop firewalld.service && sudo systemctl disable firewalld.service can be

viewing the Tomcat process : Ps-ef |grep Tomcat

Force shutdown process: kill-9 4401

  

Linux common commands-jdk and 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.