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

JavaScript implements asynchronous acquisition of form data

This article example shares the specific code for...

Implementing WeChat tap animation effect based on CSS3 animation attribute

Seeing the recent popular WeChat tap function, I ...

JavaScript implements the nine-grid mobile puzzle game

This article shares the specific code for JavaScr...

Vue3.0+vite2 implements dynamic asynchronous component lazy loading

Table of contents Create a Vite project Creating ...

React configuration px conversion rem method

Install related dependencies npm i lib-flexible -...

Detailed explanation of the use of Linux seq command

01. Command Overview The seq command is used to g...

Steps to restore code from a Docker container image

Sometimes the code is lost and you need to recove...

Sample code for html list box, text field, and file field

Drop-down box, text field, file field The upper p...

Detailed explanation of Nginx log customization and enabling log buffer

Preface If you want to count the source of websit...

Solution to Linux QT Kit missing and Version empty problem

Currently encountering such a problem My situatio...

MySQL controls the number of attempts to enter incorrect passwords

1. How to monitor MySQL deadlocks in production e...

MySQL 5.7.17 installation and configuration tutorial for Mac

1. Download MySQL Click on the official website d...