Tutorial on deploying jdk and tomcat on centos7 without interface

Tutorial on deploying jdk and tomcat on centos7 without interface

1. Install xshell6

2. Create a server connection and enter your username and password

3. Enter sudo su -root to obtain root privileges

4. Enter cd /usr/local to enter the local folder

5. Enter wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/jdk-8u201-linux-x64.tar.gz Use wget to download the jdk1.8 compressed package to the current folder

6. Enter tar -zxvf jdk-8u201-linux-x64.tar.gz to decompress

7. Enter vim /etc/profile and press i to edit the profile file

8. Move the cursor to the end of the profile file and append

export JAVA_HOME=/usr/local/name of the folder after decompression export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}

9. Press Esc first, then press shift+zz to exit vim editing

10. Enter java -version to test whether Java is installed successfully

11. Enter cd /usr/local to re-enter the local folder

12. Enter wget https://mirrors.cnnic.cn/apache/tomcat/tomcat-8/v8.5.41/bin/apache-tomcat-8.5.41.tar.gz to download the tomcat8.5 compressed package to the current folder

13. Enter tar -zxvf apache-tomcat-8.5.41.tar.gz to decompress it to the current folder

14. Enter cd apache-tomcat-8.5.41/bin to enter the bin folder

15. Enter ls to view all files and directories under bin

16. Enter ./startup.sh to start tomcat

17. In the Alibaba console, select Lightweight Application Server from Products and Services (in the left menu).

18. As shown in the picture

19. Add rules to the firewall in the details


20. After the settings are completed, enter Alibaba public network ip:8080 in the browser and the Tomcat welcome page will appear.

21. Upload the javaweb program developed on windows to the server through xshell. First check whether lrzsz has been installed. Enter rpm -qa lrzsz in the session. If it does not exist, install lrzsz first. Enter yum -y install lrzsz to install lrzsz. After the installation is complete, enter rpm -qa lrzsz to check whether the installation is successful.

22. If the installation is successful, enter cd /usr/local/apache-tomcat-8.5.41/webapps to enter the webapps directory

23. Enter rz -y to pop up a local window, select the packaged war file or the project file packaged into tar, confirm and wait for upload. After the upload is complete, the file will be in the webapps directory

24. If the uploaded file is a tar file, you need to enter tar -xvf compressed file name to decompress it

25. Enter Alibaba public network ip:8080/project name/ in the browser to access the project

Summarize

The above is a tutorial on how to deploy jdk and tomcat on centos7 without interface. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed tutorial on installing CentOS, JDK and Hadoop on VirtualBox
  • Linux system (Centos6.5 and above) installation jdk tutorial analysis
  • Graphical tutorial on installing JDK1.8 under CentOS7.4
  • Install JDK8 in rpm mode on CentOS7
  • Detailed tutorial on installing JDK8 on Linux system (CentOS7 installation)
  • CentOS8 installation tutorial of jdk8 / java8 (recommended)
  • Linux centOS installation JDK and Tomcat tutorial
  • Centos installation jdk case explanation

<<:  mysql zip file installation tutorial

>>:  Native js implements regular validation of the form (submit only after validation)

Recommend

JavaScript to achieve all or reverse selection function

This article shares the specific code of JavaScri...

Six inheritance methods in JS and their advantages and disadvantages

Table of contents Preface Prototype chain inherit...

How to use not in to optimize MySql

Recently, when using select query in a project, I...

The whole process of Vue page first load optimization

Table of contents Preface 1. Image Optimization 2...

Using JavaScript to implement carousel effects

This article shares the specific code for JavaScr...

Use of Linux usermod command

1. Command Introduction The usermod (user modify)...

Graphic tutorial on installing Mac system in virtual machine under win10

1. Download the virtual machine version 15.5.1 I ...

Tutorial on how to quickly deploy clickhouse using docker-compose

ClickHouse is an open source column-oriented DBMS...

Solution to win10 without Hyper-V

Are you still looking for a way to enable Hyper-v...

40 fonts recommended for famous website logos

Do you know what fonts are used in the logo desig...