1. Install JDK

Unpack the

Upload the downloaded JDK to Linux

Create a directory to store Java and decompress it using commands

Mkdir /usr/java ## Decompress tar XVF amazon-corretto-11.0.12.7.1-linux-x64.tar.gz -c /usr/javaCopy the code

Delete other Java versions

# # to check the other Java RPM - qa | grep Java delete # # RPM - qa | grep Java | xargs RPM -e -- nodepsCopy the code

Change the name

Amazon - mv corretto - 11.0.12.7.1 - Linux - x64 jdk11 - amazon - correttoCopy the code
Configure the environment

Configure the environment in the profile file

Vim /etc/profile ## Add export JAVA_HOME=export JAVA_HOME=/usr/ Java /jdk11-amazon-corretto export to the end of the file PATH=$PATH:$JAVA_HOME/binCopy the code
Viewing the Java Version
java -vserion
Copy the code

2, download MySQL

Download the Linux universal version of MySQL,

3. Upload and unpack

Upload to Linux using XFTP

Unpack the

The file is decompressed to the current directory

The tar Jxvf mysql - 8.0.26 - Linux - glibc2.12 - x86_64. Tar. XzCopy the code

Move to the specified directory and change the name

Mysql - 8.0.26 - Linux - mv glibc2.12 x86_64 / usr/local/mysqlCopy the code

Check to see if libaio is installed and install if not

rpm -q libaio
Copy the code
Start the configuration

Check whether there are user groups

id mysql
Copy the code

Go to the bin directory to add a user group

CD /usr/local/mysql/bin ## Add user group useradd -r -s /sbin/nologin mysql ## Check whether id mysql is added successfullyCopy the code

Initialize and copy the MySQL password for easy login

./mysqld --initialize --user=mysql
Copy the code

Copy mysql.server to /etc/init.d/mysqld under support-files of mysql directory

cp mysql.server /etx/init.d/mysqld
Copy the code

Remove mariadb-libs and modify the my.cnf file

yum remove mariadb-libs
vim /etx/my.cnf
Copy the code

Modified my.cnf file

Start the MySQL

Because MySQL environment variables are not configured, all use of systemctl is invalid

service mysqld start
Copy the code

Log in to MySQL and change the password in the bin directory of MySQL

Alter user 'root'@'localhost' IDENTIFIED by '123456'; alter user 'root'@'localhost' identified by '123456';Copy the code
Add MySQL environment variables
Vim /etc/profile ## export MYSQL_HOME=/usr/local/mysql export PATH=$PATH:$MYSQL_HOME/binCopy the code

After the environment variables are configured, verify that you can log in to MySQL anywhere

Mysql -uroot -p123456Copy the code

\