Install jdk: Oracle official download https://www.oracle.com/technetwork/java/javase/downloads/index.html Install openjdk with yum: 1. Find the available jdk package: 2. Select the corresponding version of the package to install: Install tomcat: Tomcat official website: http://tomcat.apache.org/ Download the tomcat binary package: [root@linux ~]# cd /usr/local/src/ [root@linux src]# wget https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.27/bin/apache-tomcat-9.0.27.tar.gz Unzip: [root@linux src]# tar -xzvf apache-tomcat-9.0.27.tar.gz Move to the /usr/local/ directory: [root@linux src]# mv apache-tomcat-9.0.27 /usr/local/tomcat Start tomcat: [root@linux ~]# /usr/local/tomcat/bin/startup.sh Using CATALINA_BASE: /usr/local/tomcat Using CATALINA_HOME: /usr/local/tomcat Using CATALINA_TMPDIR: /usr/local/tomcat/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar Tomcat started. View the process: View the listening port: [root@linux ~]# netstat -lntp |grep java tcp6 0 0 :::8009 :::* LISTEN 13601/java tcp6 0 0 :::8080 :::* LISTEN 13601/java tcp6 0 0 127.0.0.1:8005 :::* LISTEN 13601/java 8080: web port Use zrlog to deploy the website through tomcat: zrlog is an open source java blog system, official website: https://www.zrlog.com/ Download zrlog: [root@linux ~]# wget http://dl.zrlog.com/release/zrlog-2.1.3-b5f0d63-release.war?attname=ROOT.war&ref=index Move to the webapps directory of tomcat: [root@linux ~]# mv zrlog-2.1.3-b5f0d63-release.war\?attname\=ROOT.war /usr/local/tomcat/webapps/zrlog.war When you move the .war package to the webapps directory, it will be automatically decompressed: [root@linux ~]# cd /usr/local/tomcat/webapps/ [root@linux webapps]# ls docs examples host-manager manager ROOT zrlog zrlog.war Rename the zrlog directory to ROOT: [root@linux webapps]# mv ROOT ROOT.bak [root@linux webapps]# mv zrlog ROOT Create a database for the zrlog blog website: [root@linux ~]# mysql -uroot -p123456 -e "create database zrlog" Create a database user and authorize it: [root@linux ~]# mysql -uroot -p123456 -e "grant all on zrlog.* to 'zrloguser'@'127.0.0.1' identified by 'test123'" #Create user zrloguser, password test123, authorized host: 127.0.01 Access from the browser: http://ip:8080/ #Next step after configuring the database information Configure administrator account information: #After entering the information, click Next to complete the installation. After logging in to the backend with an administrator account, you can make various settings: Summarize The above is my introduction to installing tomcat and deploying websites under Linux. 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! You may also be interested in:
|
<<: vue+rem custom carousel effect
The layout of text has some formatting requiremen...
Important data must be backed up, and must be bac...
Windows Server 2019 is the latest server operatin...
This article example shares the specific code of ...
Table of contents Overview definition Instance Me...
1. Create a table using HTML tags: Copy code The ...
HTML to achieve simple ListViews effect Result: c...
By turning on the Recycle Bin function, you can r...
Preface The most common task after we install a L...
This article shares the specific code for JavaScr...
The reuse of code in vue provides us with mixnis....
Table of contents Preface Lua Script nignx.conf c...
I recently bought the cheapest Tencent cloud serv...
Detailed explanation of MySQL sorting Chinese cha...
When installing FileZilla Server on the server, t...