Home > Article > Operation and Maintenance > How to configure the Tomcat environment in Linux system
The following steps are to deploy the jtomcat environment in the Linux system
Prerequisite preparation: successfully install the jdk environment (jdk installation steps)
Check the linux system version and download the corresponding tomcat installation package
uname -a 查看下系统信息
vim /etc/profile 进去profile文件
Switch to input mode.
and paste it into the profile file as shown (enter in front of unset i)
export CATALINA_HOME=/usr/local/java/tomcat/apache-tomcat-9.0.38 设置为自己的tomcat目录位置 export CLASSPATH=.:$JAVA_HOME/lib:$CATALINA_HOME/lib export PATH=$PATH:$CATALINA_HOME/bin##6. Press the Esc key to exit insert mode, enter: wq Save and exit
:wq Save and exit
:q! Do not save and exit regardless of editing or not.
source /etc/profile 文件修改生效命令7. Verify whether tomcat is installed successfully (default is 8080 port)
systemctl stop firewalld.service 关闭防火墙
cd /usr/local/java/tomcat/apache-tomcat-9.0.38/bin 进入Tomcat下的bin目录
./startup.sh Tomcat 开启命令
./shutdown.sh Tomcat关闭命令 ./startup.sh Tomcat Tomcat 开启命令
systemctl stop firewalld.service 关闭防火墙 systemctl start firewalld 开启防火墙,没有任何提示即开启成功 systemctl restart firewalld 重启防火墙 systemctl disable firewalld.service 禁止firewall开机启动
The above is the detailed content of How to configure the Tomcat environment in Linux system. For more information, please follow other related articles on the PHP Chinese website!