In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how to install JDK and Tomcat in Linux centOS". The editor shows you the operation process through an actual case. The method of operation is simple, fast and practical. I hope this article "how to install JDK and Tomcat in Linux centOS" can help you solve the problem.
First download jdk.
Jdk-8u181-linux-x64.tar.gz is used here
Download tomcat.
Apache-tomcat-8.5.35.tar.gz is used here
Create a directory
$cd / $mkdir soft$ cd soft
Put the installation package in soft
You can upload using the yum command
Installation
Yum install-y lrzsz
Rz enter selection file
Install jdk
$cd / usr$ mkdir java$ tar-zxvf jdk-8u181-linux-x64.tar.gz-c / usr/java
Add environment variables after installation is complete
$vim / etc/profile
Add environment variables at the end
Export java_home=/usr/java/jdk1.8.0_181export classpath=.:$ {java_home} / jre/lib/rt.jar:$ {java_home} / lib/dt.jar:$ {java_home} / lib/tools.jarexport path=$path:$ {java_home} / bin
Save exit
$wq
Then execute the command to make the environment variable take effect
$source / etc/profile
Check to see if the configuration is successful
$java-version
Install tomcat
$cd / usr$ mkdir tomcat$ tar-zxvf apache-tomcat-8.5.35.tar.gz-c / usr/tomcat
Configure firewall policy after successful decompression, open firewall port 8080
$vim / etc/sysconfig/iptables
If there is no iptables file but iptables-config
Execute the following command
$iptables-p output accept $service iptables save$ vim / etc/sysconfig/iptables
Add at the end
# Open port 8080-an input-m state-- state new-m tcp-p tcp-- dport 8080-j accept
Save exit
$wq
Modify the tomcat configuration to change the local localhost to your own domain name or server ip, where ip is used
$vim / usr/tomcat/apache-tomcat-8.5.35/conf/server.xml
Save and exit after modification
Start tomcat
$sh / usr/tomcat/apache-tomcat-8.5.35/bin/startup.sh
After starting successfully
Browser input server ip:8080
Jump to tomcat page configuration successfully.
This is the end of the introduction to "how Linux centOS installs JDK and Tomcat". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.