LINUX 7 版本
JDK版本
推荐 | 版本 | 更新至 | 地址 |
---|---|---|---|
✅ | Eclipse Temurin 17 | October 2029 | 访问 |
✅ | OracleJDK 17 | October 2029 | 访问 |
JDK 安装
下载地址
Eclipse Temurin 8 x64 RPM Package
假设当前安装目录/root
curl -L "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_x64_linux_hotspot_17.0.8.1_1.tar.gz" -H "Cookie: oraclelicense=accept-securebackup-cookie" -H "Connection: keep-alive" -O
解压缩及安装
tar -zxf OpenJDK17U-jdk_x64_linux_hotspot_17.0.8.1_1.tar.gz
完成后本地目录
jdk-17.0.8.1+1
安装配置MySQL 8.0
安装MySQL 8.0
假如本地安装过mariadb,请先卸载
安装MySQL官方的yum repository
curl -L "https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm" -O
下载rpm包:
yum -y install mysql80-community-release-el7-3.noarch.rpm
安装MySQL服务
yum -y install mysql-community-server
安装MySQL问题
Failing package is: mysql-community-libs-compat-8.0.28-1.el7.x86_64 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
解决方案
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
调整配置
编辑 /etc/my.cnf 文件
character-set-server=utf8
lower_case_table_names=1
启动mysql服务
systemctl start mysqld
--停止
systemctl stop mysqld --无需执行
登录MySQL
第一次启动MySQL后,就会有临时密码,这个默认的初始密码在/var/log/mysqld.log文件中,我们可以用这个命令来查看:
grep "password" /var/log/mysqld.log