1. Install JDK
- Download jdk (download tar.gz format)
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
You need to log in to download now, you can use the link I shared on Baidu Netdisk
: https://pan.baidu.com/s/163wwuhnCrcX5qs25l6tBNg
Extraction code: b301
2. Create a new java file under /usr, (I use xftp Upload the compressed package)
3. Then decompress the installation package by entering the following command in Xshell (note that the version number may be different, just modify it to the previously downloaded version)
tar-zxvf jdk-8u231-linux-x64.tar.gz
Configure JDK environment variables
- Enter the text editing state, the cursor goes to the end of the last line of the file
i enter edit mode
- Insert the following code in the last line
export JAVA_HOME=/usr/Java/jdk1.8.0_181
export CLASSPATH=.:${
JAVA_HOME}/jre/lib/rt.jar:${
JAVA_HOME}/lib/dt.jar:${
JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${
JAVA_HOME}/bin
-
Press the esc key to switch to the command mode, enter: wq to save the file and exit;
-
Environment variables take effect and check
./etc/profile
java -version
2. Install Tomcat (download tar.gz format)
- Official website download: https://tomcat.apache.org/download-80.cgi
Baidu Netdisk has shared
the link: https://pan.baidu.com/s/1OOmE9BerIDuZnMIRbFdUrQ
Extraction code: 3osh
2. Upload to the server /usr/java via Xftp (if it is local Linux, you can directly copy it to the corresponding directory )
- Enter the following command in Xshell to decompress the installation package (note that the version number may be different, just modify it to the previously downloaded version)
tar -zxvf apache-tomcat-9.0.30.tar.gz
-
start tomcat
-
After decompression, enter the following command to enter the bin directory of Tomcat
cd /usr/java/apache-tomcat-9.0.30/bin
Note your folder name
-
start tomcat
./startup.sh
-
3. MySQL installation
1. Install MySQL
-
MySQL depends on libaio, so install libaio first
yum install libaio
-
Check if MySQL is installed
yum list installed | grep mysql
Uninstall if already installed
yum -y remove mysql-libs.x86_64
-
Download MySQL Yum Repository
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
-
Add MySQL Yum Repository to your system repository list, execute
yum localinstall mysql-community-release-el7-5.noarch.rpm
You need to enter y to continue, and the prompt "complete!" indicates that the source is added successfully.
-
Select the MySQL version to start
yum repolist all | grep mysql (查看mysql报告列表)
View the current MySQL version started
yum repolist enabled | grep mysql
-
Install MySQL via yum
yum install mysql-community-server
-
Start or shut down MySQL
-
Start MySQL Server
systemctl start mysqld
-
View MySQL Server status
systemctl status mysqld
-
Shut down MySQL Server
systemctl stop mysqld
-
Restart MySQL Server
systemctl restart mysqld
-