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

Docker deploys net5 program to achieve cross-platform functions

Deployment environment: docker container, liunx s...

How to set the text in the select drop-down menu to scroll left and right

I want to use the marquee tag to set the font scro...

MYSQL 5.6 Deployment and monitoring of slave replication

MYSQL 5.6 Deployment and monitoring of slave repl...

Spring Boot layered packaging Docker image practice and analysis (recommended)

Table of contents 1. Prepare the springboot proje...

Implementation of element shuttle frame performance optimization

Table of contents background Solution New Questio...

Element Plus implements Affix

Table of contents 1. Component Introduction 2. So...

Flex layout makes adaptive pages (syntax and examples)

Introduction to Flex Layout Flex in English means...

React native ScrollView pull down refresh effect

This article shares the specific code of the pull...

Solution to 404 error when downloading apk file from IIS server

Recently, when using IIS as a server, the apk fil...

How to set up scheduled tasks in Linux and Windows

Table of contents Linux 1. Basic use of crontab 2...

CSS tips for implementing Chrome tab bar

This time let’s look at a navigation bar layout w...