查看yum源中JDK版本
yum list java*
安装JDK1.8
yum -y install java-1.8.0-openjdk*
查看版本
java -version
下载并安装MySQL官方的Yum Repository
wget http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install * --nogpgcheck mysql-community-server
启动 MySQL 数据库
systemctl start mysqld.service
查看MySQL初始密码
grep "password" /var/log/mysqld.log
登录数据库
mysql -uroot -p
修改MySQL默认密码
set global validate_password_policy=0; #修改密码安全策略为低(只校验密码长度,至少8位)。
ALTER USER 'root'@'localhost' IDENTIFIED BY '12345678';
授予root用户远程管理权限
GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY '12345678';
安装Tomcat
下载Tomcat压缩包
wget --no-check-certificate https://labfileapp.oss-cn-hangzhou.aliyuncs.com/apache-tomcat-8.5.72.tar.gz
解压刚刚下载Tomcat包
tar -zxvf apache-tomcat-8.5.72.tar.gz
修改Tomcat名字
mv apache-tomcat-8.5.72 /usr/local/Tomcat8.5
为Tomcat授权
chmod +x /usr/local/Tomcat8.5/bin/*.sh
修改Tomcat默认端口号为80
sed -i 's/Connector port="8080"/Connector port="80"/' /usr/local/Tomcat8.5/conf/server.xml
启动Tomcat
/usr/local/Tomcat8.5/bin/./startup.sh