Centos7.5 configuration java environment installation tomcat explanation

Centos7.5 configuration java environment installation tomcat explanation

Tomcat is a web server software based on Java language. This article mainly introduces how to configure Java environment and install Tomcat on CentOS 7.5.

1. Install Java environment:

Visit the orcal official website to download the JDK rpm package: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

After downloading, execute: rpm -ivh jdk-8u161-linux-x64.rpm to install. By default, it will be installed in the /usr/java directory.

After the installation is complete, modify the /etc/profile file and add the Java environment variables:

export JAVA_HOME=/usr/java/jdk1.8.0_161/export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport PATH=$PATH:$JAVA_HOME/bin

After adding, execute: source /etc/profile to make the configuration effective

Execute: java -version to verify whether the configuration is successful. The following interface appears to indicate that the configuration is successful.

2. Install Tomcat

Visit the Apache official website and download the tomcat source package: https://tomcat.apache.org/download-80.cgi

When downloading, be sure to select the source package in Binary Distributions

After downloading, unzip it and copy the contents of the unzipped directory to /usr/local/tomcat (the /usr/local/tomcat directory needs to be created manually)

tar -xf apache-tomcat-8.5.38.tar.gz
mkdir /usr/local/tomcat8
mv apache-tomcat-8.5.38/* /usr/local/tomcat8/
cd /usr/local/tomcat8/bin
./startup.sh 

At this point, Tomcat has been installed successfully, visit to test:

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Installation and configuration of mysql 8.0.15 under Centos7
  • Centos7.4 server installation of apache and solutions to problems encountered during the installation process
  • Tutorial on installing lamp-php7.0 in Centos7.4 environment
  • The best way to start a jar package project under Centos7 server
  • Alibaba Cloud Centos7 installation and configuration of SVN
  • How to add custom system services to CentOS7 systemd
  • How to add Nginx to system services in CentOS7
  • Detailed explanation of the basic use of centos7 firewall in linux
  • Detailed explanation of Nginx installation, SSL configuration and common commands under Centos7.x
  • CentOS 7 switching boot kernel and switching boot mode explanation

<<:  jQuery plugin to achieve image suspension

>>:  MySql Group By implements grouping of multiple fields

Recommend

Implementation of Nginx load balancing cluster

(1) Experimental environment youxi1 192.168.5.101...

How to deploy SpringBoot project using Docker

The development of Docker technology provides a m...

How to collect Nginx logs using Filebeat

Nginx logs can be used to analyze user address lo...

How to install multiple mysql5.7.19 (tar.gz) files under Linux

For the beginner's first installation of MySQ...

Introduction to the usage of common XHTML tags

There are many tags in XHTML, but only a few are ...

Detailed explanation of chmod command usage in Linux

chmod Command Syntax This is the correct syntax w...

In-depth understanding of the use of r2dbc in MySQL

Introduction MySQL should be a very common databa...

JavaScript prototype and prototype chain details

Table of contents 1. prototype (explicit prototyp...

Detailed explanation of CSS3 to achieve responsive accordion effect

I recently watched a video of a foreign guy using...

MySQL joint index effective conditions and index invalid conditions

Table of contents 1. Conditions for joint index f...

MySQL detailed single table add, delete, modify and query CRUD statements

MySQL add, delete, modify and query statements 1....

A brief talk about MySQL semi-synchronous replication

Introduction MySQL achieves high availability of ...