Linux Get the IP address of Centos7, JDK + Tomcat + Mysql Install

一. Get the IP address of Centos   

1. Enter ip addr to view Centos ip address

2. If the above result is displayed, Need to modify the configuration input map command


Enter the following picture results

Change ONBOOT=no to ONBOOT = yes

Press Esc, then press Enter + : Enter wq, press Enter to save

Save and enter service network restart Restart service

Restart the service and then enter ip addr to view Centos ip address

上图192.168.43.26 is your ip address

JDK Install

1. Log in to WinSCP via ip address and centos account, copy jdk archive to a folder

2. Unzip jdk.tar.gz file

JDK installation [email protected]@@ @//Open /etc/profile file

Configure environment variable

vi /etc/profile 


export JAVA_HOME=/usr/jdk/jdk1.8.0_144

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export PATH=$JAVA_HOME/bin:$PATH

// Enter java-version test, the information of jdk appears that the installation is successful

source /etc/profile

Environment variable configuration is successful


installTomcat Login WinSCP through ip address and centos account, copy jdk archive to a folder

  1. 解压tomcat
  2. install successfully, delete tomcat Installation package rm apache-tom Cat-8.0.53.tar.gz


Browser access and solve the firewall problem


iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

rpm -qa |grep -i mysql

yum remove mysql-community mysql-community-server mysql-community-libs mysql-community-common

rpm -qa |grep -i mysql

yum remove mysql-community-release

rpm -qa |grep -i mysql

find / -name mysql.

rm -rf /usr/share/mysql

@ Look at what is installed Dongdong:

yum -y yyum -y install wget um -y install wget yum -y install wget install wget

  1. Start uninstall

    yum update

3.Execute uninstall command:


sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm

yum update

4.Check uninstall residual

yum install

yum install mysql-serversystemctl start mysqlmysql-serveystemctl st

 Check whether uninstall uninstall:

uninstall residual

uninstall Drop the part that has not been uninstalled:

ultimate check

mysql -uroot -p

and check it again:

, the installation part has been completely uninstalled.


View mysql file directory:

Delete this file: