Linux deployment Java and Tomcat operating environment

Source: Internet
Author: User

Linux deployment Java and Tomcat operating environment

1, upload the downloaded JDK rpm package and Tomcat's tar package, I put in the/opt directory, the file directly to the official website to download.

2, if you have previously installed other versions of the JDK, it is better to rpm-e package_name now, and then directly execute the installation command

RPM-IVH jdk-8u162-linux-x64.rpm

After waiting for installation to complete, the default is to install to the/usr/java directory, perform java-version to see if the installation is successful

3, RPM installation should not need to match environment variables, if not effective manually configure the Vi/etc/profile after adding the following content

Export java_home=/usr/java/jdk1.8.0_162
Export jre_home=/usr/java/jdk1.8.0_162
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $CLASSPATH
Export path= $JAVA _home/bin: $PATH

4, Tomcat I put directly into the current directory, directly decompression

TAR-ZXVF apache-tomcat-8.0.23.tar.gz

5, go to the/opt/apache-tomcat-8.0.23/bin directory to start the Tomcat service, found no permissions

chmod 777 *.sh

And then start

./catalina.sh Start

6, from the outside to visit Tomcat found that the Tomcat process is normal, systemctl status Firewalld; Check that the firewall is on and the firewall is blocking it.

/sbin/iptables-i input-p TCP--dport 8080-j ACCEPT open firewall 8080 port

Service Iptables Save #保存防火墙规则
Service iptables Restart #重置防火墙规则

Or simply rude, you shut down the firewall ....

Re-visit, everything is fine, wait for a bag to try

Linux deployment Java and Tomcat operating environment

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.