Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure Tomca in a Linux environment

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "Linux environment how to install and configure Tomca", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Linux environment how to install and configure Tomca" this article.

1. (log in with root users) create a user group and group name, such as: loan

Groupadd-g 501 loan

2. (log in with root user) create a user, such as finance, belong to group: loan, and user home directory is: / opt/finance

Useradd-s / bin/bash-g loan-d / opt/finance-m finance

3. (log in with root user) set the finance user password

Passwd finance

4. Switch to use finance username / password (I use secureCRT) to log in remotely to the server and create a new downloads folder.

Mkdir downloads

5. Upload jdk and tomcat to the downloads directory. The version number is as follows:

Apache-tomcat-8.0.36.tar.gzjdk-8u60-linux-x64.tar.gz

1. Download the installation package locally and upload it to the server via ftp (secureFX)

2. You can also download it online: wget xxxxx (you need to switch to root users to download)

3. Through scp, you can copy the installation to the current server scp / opt/xxxx/downloads/apache-tomcat-8.0.36.tar.gz loan@x.x.x.x:/opt/finance/downloads/apache-tomcat-8.0.36.tar.gz from other servers with these two installation packages.

6. Decompress jdk and tomcat

Tar zxvf apache-tomcat-8.0.36.tar.gztar zxvf jdk-8u60-linux-x64.tar.gz

7. Move jdk and tomcat to the user's home directory. The name of the tomcat directory is subject to the application project, for example: tomcat-finance

Mv jdk1.8.0_60.. / mv apache-tomcat-8.0.36.. / tomcat-finance (move and rename)

8. Configure the jdk environment variable, and add the set java configuration in the middle of the original file. The specific paths of JAVA_HOME and JRE_HOME shall prevail.

Vi .bash _ profile#User specific environment and startup programs#set java environmentJAVA_HOME=/opt/finance/jdk1.8.0_60JRE_HOME=/opt/finance/jdk1.8.0_60/jreCLASSPATH=.:$JAVA_HOME/lib/tools.jar:%JAVA_HOME%/lib/dt.jarPATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATHexport JAVA_HOME CLASSPATH PATHPATH=$PATH:$HOME/bin

9. Execute load configuration

Source .bash _ profile

10. Create a new webapps under the home (/ opt/finance) directory

Mkdir webapps

Later on, map the webapps directory to the home (/ opt/finance) directory

11. Delete the default project of tomcat container

Cd tomcat-financerm-rf webapps/*

12. Modify tomcat configuration parameters

Cd tomcat-financevi conf/server.xml

As shown below:

The copy code is as follows:

13. Create the project name finance_web (consistent with the configuration mapping in tomcat), and copy the release project to / opt/finance/webapps/finance_web/

Mkdir finance_web

14. Start tomcat and view the startup log

. / startup.shtail-f logs/catalina.out

Note: jvm can be tuned if stress test is performed.

These are all the contents of the article "how to install and configure Tomca in a Linux environment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report