current position:Home>Tomcat installation and environment configuration in Linux

Tomcat installation and environment configuration in Linux

2022-01-26 22:55:06 #HashMap#

One .Linux in tomcat Installation

(1) stay Filezila Zhongba apache-tomcat-7.0.68.tar.gz Compressed packet transfer to linux in ( The address is 172.18.116.88)
Filezila Download address : link :https://pan.baidu.com/s/1z4k22gpJSW9L_cNUR-GytA
Extraction code :qet4
apache-tomcat-7.0.68.tar.gz Compressed package : link :https://pan.baidu.com/s/1NAF3yBymYsMwlMV5DPVVyg
Extraction code :bc49
 Insert picture description here
(2) decompression tmp Under the apache-tomcat-7.0.68.tar.gz Compressed package , The order is as follows :
#:cd /usr/local/tmp Get into tmp Next
tmp]:tar zxvf apache-tomcat-7.0.68.tar.gz
(3) stay linux In the operation , The order is as follows :
// hold tmp Download the decompressed apache-tomcat-7.0.68 File copy to
/usr/local/tomcat7 Next
#:cp -r apache-tomcat-7.0.68 /usr/local/tomcat7

Two .Tomcat Environment configuration

(1) The order is as follows :
#:cd /etc
etc]:vi profile
 Insert picture description here
(2) After successful configuration , Do file parsing , The order is as follows :
etc]:source profile // Parsing files
Be careful :/etc/profile After next configuration , File parsing is required after
(3) After the configuration is successful, you can view bin file (linux The green in represents the executable )
 Insert picture description here
(4) Use ./ start-up .startup.sh file
bin]:./startup.sh
 Insert picture description here

(5) Port configuration
because linux The default allowed port in is 22, Others are blocked by firewalls , So we need to configure web Allowed ports (8080), The order is as follows :
i)bin]:vim /etc/sysconfig/iptables // Enter the edit port page
ii) Copy the following command , We see 22 It's the port number , Change the port number of the copied command to 8080
 Insert picture description here
 Insert picture description here
 Insert picture description here

iii) After the configuration is successful, the service needs to be restarted
Be careful : stay /etc/sysconfig The next is equivalent to windows Under the " service ", After each configuration ,linux You need to restart , The order is as follows :
bin]:service iptables restart
 Insert picture description here
iiii) stay web Verification in China
 Insert picture description here
Little knowledge points :
1. Use /etc/profile After the configuration , Use source profile
2. Use /etc/sysconfig/iptables(network-scripts) After the configuration , want service iptables restart Restart the service

copyright notice
author[#HashMap#],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201262255041365.html

Random recommended