1. 从Oracle官网下载Oracle JDK 10并以jdk10.rpm文件名保存然后安装
JDK10下载地址需要从Oracle JDK下载页获取,Oracle设置了认证策略,AuthParam有过期时间
wget http://download.oracle.com/otn-pub/java/jdk/10+46/76eac37278c24557a3c4199677f19b62/jdk-10_linux-x64_bin.rpm?AuthParam=1523521010_631a8c1dad4fdcadf6edd06e1faa24a1 -O jdk10.rpm
rpm -ivh jdk10.rpm
2. 安装MySQL
yum install mysql
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
service mysqld restart
3. 设置MySQL root用户密码,允许root用户远程连接
set password for 'root'@'localhost' =password('password');
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
4. 从Tomcat官网下载Tomcat8.5 然后解压
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.tar.gz -O tomcat8.5.tar.gz
mkdir tomcat8.5
tar zxvf tomcat8.5.tar.gz -C tomcat8.5
5. 设置防火墙策略,允许8080,80,3306端口TCP连接
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-port=3306/tcp --permanent
systemctl restart firewalld
参考:
1. centos7 mysql数据库安装和配置
2. VULTR的VPS在CENTOS 7.3的操作系统中出现网站无法访问 80端口被FIREWALL禁止