Home>

First, install jdk

1. Uninstall the old version or jdk that comes with the system

(1) List all installed jdk

Rpm -qa | grep jdk

(2) Uninstall unwanted jdk

Yum -y remove installation package name

2. Download and extract jdk

(1) Download the installation package

Go to the/usr/local directory and create a new java directory

mkdir java

Alas, use the wget command to download the installation package in the java directory,Such as

wget --no-cookies --no-check-certificate --header "cookie:gpw_e24=http%3a%2f%2fwww.oracle.com%2f;oraclelicense=accept-securebackup-cookie"

Or use a shell tool to upload to Linux locally.

(2) Extract the installation package

After downloading, use command to decompress,

Tar -zxvf archive name

3. Configure environment variables

Enter the/etc/folder and use the vim profile command editor to edit the profile file (global environment variable configuration). If there is no profile file, go to/root and configure the .bash_profile file (the environment variable configuration under the current user). Add the following configuration to the end of the file:(Worries about modification errors, you can use the ps command to back up the file)

export java_home=jdk installation package root directory
Export path=$java_home/bin:$path
Export classpath =.:$Java_home/lib/dt.jar:$java_home/lib/tools.jar:$java_home/jre/lib/rt.jar
</pre>
</div>
<p>
Finally don't forget to execute the command
</p>
<p>
<Code>
Source/etc/profile

Make the configuration file take effect.

Enter java -version to see if the jdk configuration is successful.The version information appears and the jdk installation and configuration are complete.

Second, install tomcat

2. Download and unzip tomcat

(1) Download the installation package

Enter the new mywork directory under the/usr/local directory

Mkdir mywork

Alas, use the wget command to download the installation package in the mywork directory.Such as

Wget ""

Or use a shell tool to upload to Linux locally.

(2) Extract the installation package

After downloading, use command to decompress,

tar -zxvf archive name

3. Start tomcat

Go to the tomcat home directory, start tomcat, use the command

bin/startup.sh

Check whether tomcat is successfully started (process exists), use the command

Ps -ef | grep tomcat

4. Check if tomcat is successfully installed

(1) View the status of the firewall

Systemctl status firewalld

use Use the command when the above command is invalid

service iptables status

(2) Turn off the Linux firewall

systemctl stop firewalld

use Use the command when the above command is invalid

service iptables stop

(3) View the IP address information of Linux

Ifconfig

(4) Visit tomcat

Browser enter address,Address:8080

Third, install mysql

1.Uninstall the database mariadb that comes with the system

yum list installed | grep mariadb (check if mariadb is installed on the system)Yum -y remove application name (uninstall mariadb)

2. Download and extract mysql

(1) Download the installation package

Go to the/usr/local directory and use the wget command to download the installation package.Such as

Wget ""

Or use a shell tool to upload to Linux locally.

(2) Extract the installation package

After downloading, use command to decompress,

tar -zxvf archive name

change Change the file name after unzipping,

mv unzip file name mysql

3. Create a data warehouse directory

mkdir/mysql/data (this directory stores database data)

4. Create mysql users and user groups

Groupadd mysql (create user group)
Useradd -r -s/sbin/nologin -g mysql mysql -d/usr/local/mysql (add the mysql user to the group and specify the mysql directory for the user)

5. Specify the owner of the directory

Go to the mysql root directory
Cd/usr/local/mysql
Change directory owner,Chown -r mysql. (Don't forget the latter.
)
Chgrp -r mysql.
Chown -r mysql/mysql/data

6. Initialize mysql configuration parameters

Execute in the mysql root directory,Bin/mysqld --initialize --user=mysql --basedir =/usr/local/mysql --datadir =/mysql/data
Note:After the command is executed, an initial password is generated at the end.
Copy it into Notepad for the first login later.
Set up data encryption,Bin/mysql_ssl_rsa_setup --datadir =/mysql/data

7. Modify the system configuration file

Add the mysql configuration file to the system configuration file,Enter the directory
Cd/usr/local/mysql/support-files
Copy,Cp my-default.cnf /etc/my.cnf
Cp mysql.server /etc/init.d/mysql
Edit the mysql configuration file,Specify the base and data directories,Vim /etc/init.d/mysql
Modify the following properties:
Basedir =/usr/local/mysql
Datadir =/mysql/data

8. Change password

Start mysql,/Etc/init.d/mysql start --5.0 version is mysqld start
  log in,Mysql -h localhost -u root -p
Enter the password obtained in step (6).
If it appears:-bash:mysql:commond not found execute:ln -s/usr/local/mysql/bin/mysql/usr/bin
  change Password,Set password=password ("The password i want to set")

9. Modify the operation permissions of the remote host to the root user

Give all hosts all permissions

grant all privileges on *. * to "root"@"%" identified by "root";
</pre>
</div>
<p>
Make permissions effective
</p>
<p>
<code>
flush privileges;

View user table permissions

Use mysql;Select * from user;

10. Add system environment variables

vim/etc/profile

Add at the end:

export path =/usr/local/mysql/bin:$path

Enable the configuration file to take effect

source/etc/profile

11. Remote connection test

You can use the mysql client tool to connect remotely,If the connection fails, close the firewall and try again.

supplement:

View mysql running status,Service mysql status --5.0 version is service mysqld statusStop mysql,Service mysql stop --5.0 version is service mysqld stopStart mysqlService mysql start --5.0 version is service mysqld startRestart mysqlService mysql restart --5.0 version is service mysqld restart

mysql can be configured in detail by modifying /etc/my.cnf.

to sum up

  • Previous Interactive plotting based on python plotly
  • Next The use and difference of C ++ push method and push_back method