A, JDK installation
Install version: JDK13
1, JDK downloaded in two ways
1) the installation files uploaded via FTP:
In JavaSE's official website:
https://www.oracle.com/technetwork/java/javase/downloads/jdk13-downloads-56725
38.html
Download it
The
JDK
installation package:
the JDK-13_linux-x64_bin.tar.gz
uploaded to the specified directory
2 ) Linux environment Download:
wget --no-check-certificate --no-cookies --header "Cookie:
oraclelicense=accept-securebackup-cookie"
https://download.oracle.com/otn-pub/java/jdk/13+33/5b8a42f3905b406298b72d750b
6919f6/jdk-13_linux-x64_bin.tar.gz
#
Server does not
wget
command
prompt
#
Solution
: Enter the following command at the server command line to install
wget
yum -y install wget
3 ) extract the JDK to prepare for the configuration environment variable
#
Use
tar
command to extract
tar.gz
file suffixes
tar –zxvf jdk-13_linux-x64_bin.tar.gz
#
Environmental variable configuration after extraction is completed
JDK
unpacked file directory:
the JDK-13
4 ) configuration environment variable to JDK into force
#
After extracting see
JDK
File Path command:
pwd
/usr/java/jdk-13
#
Add an environment variable
vi /etc/profile
After opening the file, a combination of keyboard operation:
shirt+g
Move to the very bottom of the file, keyboard input
i
Enter document editing state, the following configuration input
export JAVA_HOME=/usr/java/jdk-13
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
After entering the complete keyboard input
ESC
after entry
:wq
Save files
After the file is saved execute commands
source /etc/profile
Validate the configuration
Viewing System
Java
version, at the command line
java –version
See the following results to complete the installation
Two, the Tomcat installation configuration
#Tomcat
安装前需要将
JDK
安装完成
1、Tomcat 下载的两种方式
1)通过 FTP 上传文件:
登录
Tomcat
官网:
https://tomcat.apache.org/download-90.cgi
下载
Tomcat9.0
并上传到所需的服务器目录
2)服务器端直接下载
wget
http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.26/bin/apache-tomca
t-9.0.26.tar.gz
前面下载
JDK
已经讲过没有
wget
命令如何处理
2、Tomcat 安装
1)解压 Tomcat
tar –zxvf apache-tomcat-9.0.26.tar.gz
解压后的文件:
apache-tomcat-9.0.26
2)启动 Tomcat
进入解压后的文件
bin
目录,启动命令如下
./startup.sh
服务器进入后台运行
./catalina.sh run
服务器运行于当前进程,关闭窗口服务停止,主要用于系统调
试的日志输入
#
后台启动后可以通过命令看一下线程是否正常运行:
ps –ef|grep tomcat