1、test-env
host-ip:20.20.20.20
host-name:centos7-ssh
soft:
2、安装jdk
$ sudo rpm -ivh jdk-8u181-linux-x64.rpm
$ sudo vim /etc/profile ---> 在最后面添加下面这几行
JAVA_HOME=/usr/java/jdk1.8.0_181-amd64
JAVA_BIN=/usr/java/jdk1.8.0_181-amd64/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin:/bin
CLASSPATH=.:/lib/dt.jar:/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
$ source /etc/profile
$ java -version
3、安装mysql数据库
$ sudo yum install -y mariadb mariadb-server
$ sudo systemctl start mariadb
$ sudo systemctl enable mariadb
# 备份下配置文件
$ sudo cp /etc/my.cnf /etc/my.cnf.bak
$ sudo cp /etc/my.cnf.d/client.cnf /etc/my.cnf.d/client.cnf.bak
$ sudo cp /etc/my.cnf.d/mysql-clients.cnf /etc/my.cnf.d/mysql-clients.cnf.bak
# 修改配置文件
$ sudo vim /etc/my.cnf ---> # 在[mysqld]下面添加如下
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
transaction-isolation&#