Detailed tutorial on uploading and configuring jdk and tomcat on linux

Detailed tutorial on uploading and configuring jdk and tomcat on linux

Preparation

1. Start the virtual machine
2. git tool

Login with root account

Log in using the root account

insert image description here

After logging in: Use the Linux command:
cd /opt/ Open the opt directory
mkdir app Create an app directory under opt (unzip the compressed package here)
mkdir software creates a software directory under opt (the uploaded compressed package is placed here)
mkdir war Create a war directory under opt (the uploaded project is placed here)

insert image description here

Turn off Linux firewall

Firewall related settings View firewall status

service iptables status

Disable firewall status

service iptables stop

Check the firewall status 2-5. All of them are on, indicating the startup status

chkconfig iptables --list

Disable the firewall startup

chkconfig iptables off

2-5 are all off, indicating successful shutdown

insert image description here

Local compressed package upload

Right click on the local disk location git bash here

insert image description here

Use the following command to upload the compressed package to the Linux server:

scp apache-tomcat-7.0.79.tar.gz root@linux ip:/opt/software
scp jdk-8u144-linux-x64.tar.gz root@linux ip:/opt/software

Open the software directory ll command to check whether the upload is successful

insert image description here

Unzip to the app directory

The linux commands are as follows:

tar -zxvf /opt/software/apache-tomcat-7.0.79.tar.gz -C /opt/app
tar -zxvf /opt/software/jdk-8u144-linux-x64.tar.gz -C /opt/app

You can open the app directory by typing cd/opt/app to check whether the decompression is successful.

Configure JDK environment variables

Open the profile file in the etc/directory
vim /etc/profile
i Enter editing mode

export JAVA_HOME=/opt/app/jdk1.8.0_144
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export CATALINA_HOME=/opt/app/apache-tomcat-7.0.79
export PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin:/usr/local/bin
export LC_ALL=en_US.UTF-8

Press esc to exit editing, and press shift + : wq to save and exit.

source /etc/profile to make the environment variable configuration take effect.

Check whether jdk is configured successfully

insert image description here

Summarize

This is the end of this article about uploading and configuring jdk and tomcat in linux. For more relevant linux jdk tomcat configuration content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of two ways of Linux service management: service and systemctl
  • Solve the problem of VScode configuration remote debugging Linux program
  • Detailed explanation of the process of configuring multiple SVN repositories on Linux servers
  • Analysis of Linux configuration to achieve key-free login process
  • Installation and configuration method of Zabbix Agent on Linux platform
  • vscode Linux C++ development code automatic prompt configuration under win10 environment (based on WSL)
  • Summary of Linux environment variable configuration methods (differences between .bash_profile and .bashrc)
  • Install Tomcat on Linux system and configure Service startup and shutdown

<<:  Vue uses Amap to realize city positioning

>>:  MySQL select, insert, update batch operation statement code examples

Recommend

Two ways to completely delete users under Linux

Linux Operation Experimental environment: Centos7...

Differences between MySQL MyISAM and InnoDB

the difference: 1. InnoDB supports transactions, ...

HTML+CSS to implement the sample code of the navigation bar drop-down menu

Effect The pictures in the code can be changed by...

JavaScript data flattening detailed explanation

Table of contents What is Flattening recursion to...

Node.js solves the problem of Chinese garbled characters in client request data

Node.js solves the problem of Chinese garbled cha...

JavaScript to achieve full screen page scrolling effect

After I finished reading JavaScript DOM, I had a ...

MySQL daily statistics report fills in 0 if there is no data on that day

1. Problem reproduction: Count the total number o...

Summary of MySQL5 green version installation under Windows (recommended)

1 Download MySQL Download address: http://downloa...

How to load Flash in HTML (2 implementation methods)

First method : CSS code: Copy code The code is as ...

Detailed explanation of how to mount remote file systems via SSH on Linux

Features of SSHFS: Based on FUSE (the best usersp...

CSS3 realizes draggable Rubik's Cube 3D effect

Mainly used knowledge points: •css3 3d transforma...

Solution to mysql failure to start due to insufficient disk space in ubuntu

Preface Recently, I added two fields to a table i...

MySQL 8.0.23 Major Updates (New Features)

Author: Guan Changlong is a DBA in the Delivery S...