Get the App
SLTechnology News&Howtos  ›  Development  › 

How to install tomcat in centos6

Shulou Source: shulou.com Published: 2022-06-01 16:28:53 10月04日 Update

In this article, the editor introduces in detail "how to install tomcat in centos6", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to install tomcat in centos6" can help you solve your doubts.

Tomcat server is an open source lightweight Web application server, which is widely used in small and medium-sized systems and small concurrency. It is the first choice for developing and debugging Servlet and JSP programs.

1. Compile and install JDK [root @ localhost src] # mkdir / usr/java # create a storage directory [root@localhost src] # tar-zxvf jdk-8u131-linux-x64.tar.gz # extract the downloaded jdk [root] # mv jdk1.8.0_131/ / usr/java # and move to the created directory 2. Configure jdk environment global users to add JDK environment variables

As root user, edit the system global environment configuration file / etc/profile

[root@localhost src] # vim / etc/profile is added at the end of / etc/profile file: export JAVA_HOME=/usr/java/jdk1.8.0_131 # jdk installation path export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATHexport CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH. Configure the JDK environment variable to the tomcat user (application user), edit the user environment configuration file $HOME/.bash_ profile [tomcat @ localhost ~] $vim. Bash _ profile# and modify it to the following content: # .bash _ profile# Get the aliases and functionsif [- f ~ / .bashrc]; then. ~ / .bashrcfi # User specific environment and startup programsJAVA_HOME=/usr/java/jdk1.8.0_131 # jdk installation path export JAVA_HOMECLASSPATH=.:$JAVA_HOME/jre/lib/dt.jar:$JAVA_HOME/jre/lib/tools.jarexport CLASSPATHPATH=$PATH:$HOME/bin:$JAVA_HOME/jre/binexport PATHexport.UTF-8 [tomcat@localhost ~] $source / etc/profile [tomcat@localhost ~] $java-versionjava version "1.8.0x131" Java (TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot (TM) 64-Bit Server VM (build 25.131-b11) Mixed mode) read this. This article "how to install tomcat in centos6" has been introduced, and if you want to master the knowledge of this article, you still need to practice and use it. If you want to know more about the article, please pay attention to the industry information channel.

Tags: User environment configuration content file article system global variable server directory path application service proper small and medium small and medium situation tail application system Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Docker Huawei Shulou Information macOS