Build a Linux dependent environment

Table of contents

1. jdk (installation based on yum)

2. Tomcat (manually download and install)

3. MariaDB (installation based on yum)

Install 

start up 

test connection 


1. jdk (installation based on yum)

You can use yum list | grep [keyword] to find the package name to be installed, and use yum install [package name] to install

After finding the corresponding jdk, use ctrl+insert to copy it, then download and install it 

After downloading, there will be a prompt: prompt whether to install (enter y) 

 Then just wait for the installation:

Then we use javac to test whether the installation is complete:

If there is no error message, then our jdk is installed. 

2. Tomcat (manually download and install)

Tomcat can also be installed through yum, but the version of Tomcat above may be relatively backward. 

 We can see that the Tomcat version above is 7, which does not meet the 8 we require here, so we need to install Tomcat manually.

 Find Tomcat's official website and download Tomcat8:

After the download is complete, a zip archive is obtained

 Then drag the compressed package into xshell and upload it.

If the upload is not successful after we drag it in, it is probably because there is no rz command in your system . At this time, we need to use yum to install a lrzsz , ( yum install lrzsz )

Then we use the unzip command to decompress:

If unzip cannot be found, it is the same as above ( yum install unzip

 This completes the decompression. 

Entering the directory of Tomcat, we can see that it is the same as the directory on our Windows. 

The bin directory is the content related to our startup script.

 When we enter the bin directory, we need to use chmod +x *.sh to give executable permissions to all .sh files.

 If it turns green, the executable permission is granted.

Use sh startup.sh to start Tomcat.

3. MariaDB (installation based on yum)

Install 

Install mariadb service:

# yum install -y mariadb-server

Install mariadb command line client 

# yum install -y mariadb

 Install the mariadb C library 

# yum install -y mariadb-libs

Install mariadb development package 

# yum install -y mariadb-devel

start up 

start service

# systemctl start mariadb

Set the service to start automatically

# systemctl enable mariadb

View service status 

# systemctl status mariadb

test connection 

Try connecting using the command line client 

View mariadb version number 

select version();

 In order to support Chinese when creating a database, the utf8mb4 character set is uniformly used

create database demo_db charset utf8mb4;

Guess you like

Origin blog.csdn.net/m0_67995737/article/details/130495729