目录
一、Linux部分
1、环境搭建
请参考
Linux系统三https://blog.csdn.net/m0_58719994/article/details/121195652?spm=1001.2014.3001.5502
环境搭建完成后 输入一下内容
[root@192 ~]# rpm -qa | grep jdk
[root@192 ~]# yum list | grep jdk
**如果报错 报一下错误 **
[root@192 ~]# rpm -qa | grep jdk
[root@192 ~]# yum list | grep jdk
同步仓库 'AppStream' 缓存失败,忽略这个 repo。
同步仓库 'BaseOS' 缓存失败,忽略这个 repo。
**请参考 **详解CentOS8更换yum源后出现同步仓库缓存失败的问题https://blog.csdn.net/m0_58719994/article/details/126332565?spm=1001.2014.3001.5502
以上解决。。。。
1.1 jdk安装
先查找要安装的jdk版本
[root@192 home]# yum list | grep jdk
copy-jdk-configs.noarch 4.0-2.el8 AppStream
java-1.8.0-openjdk.x86_64 1:1.8.0.312.b07-2.el8_5 AppStream
java-1.8.0-openjdk-accessibility.x86_64 1:1.8.0.312.b07-2.el8_5 AppStream
java-1.8.0-openjdk-demo.x86_64 1:1.8.0.312.b07-2.el8_5 AppStream
java-1.8.0-openjdk-devel.x86_64 1:1.8.0.312.b07-2.el8_5 AppStream
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.312.b07-2.el8_5 AppStream
java-1.8.0-openjdk-headless-slowdebug.x86_64 1:1.8.0.312.b07-2.el8_5 AppStream
java-1.8.0-openjdk-javadoc.noarch 1:1.8.0.312.b07-2.el8_5 AppStream
java-1.8.0-openjdk-javadoc-zip.noarch 1:1.8.0.312.b07-2.el8_5 AppStream
java-1.8.0-openjdk-slowdebug.x86_64 1:1.8.0.312.b07-2.el8_5 AppStream
java-1.8.0-openjdk-src.x86_64 1:1.8.0.312.b07-2.el8_5 AppStream
java-11-openjdk.x86_64 1:11.0.13.0.8-4.el8_5 AppStream
java-11-openjdk-demo.x86_64 1:11.0.13.0.8-4.el8_5 AppStream
java-11-openjdk-devel.x86_64 1:11.0.13.0.8-4.el8_5 AppStream
java-11-openjdk-headless.x86_64 1:11.0.13.0.8-4.el8_5 AppStream
java-11-openjdk-javadoc.x86_64 1:11.0.13.0.8-4.el8_5 AppStream
java-11-openjdk-javadoc-zip.x86_64 1:11.0.13.0.8-4.el8_5 AppStream
java-11-openjdk-jmods.x86_64 1:11.0.13.0.8-4.el8_5 AppStream
java-11-openjdk-src.x86_64 1:11.0.13.0.8-4.el8_5 AppStream
java-11-openjdk-static-libs.x86_64 1:11.0.13.0.8-4.el8_5 AppStream
java-17-openjdk.x86_64 1:17.0.1.0.12-2.el8_5 AppStream
java-17-openjdk-demo.x86_64 1:17.0.1.0.12-2.el8_5 AppStream
java-17-openjdk-devel.x86_64 1:17.0.1.0.12-2.el8_5 AppStream
java-17-openjdk-headless.x86_64 1:17.0.1.0.12-2.el8_5 AppStream
java-17-openjdk-javadoc.x86_64 1:17.0.1.0.12-2.el8_5 AppStream
java-17-openjdk-javadoc-zip.x86_64 1:17.0.1.0.12-2.el8_5 AppStream
java-17-openjdk-jmods.x86_64 1:17.0.1.0.12-2.el8_5 AppStream
java-17-openjdk-src.x86_64 1:17.0.1.0.12-2.el8_5 AppStream
java-17-openjdk-static-libs.x86_64 1:17.0.1.0.12-2.el8_5 AppStream
java-latest-openjdk.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-demo.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-demo-fastdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-demo-slowdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-devel.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-devel-fastdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-devel-slowdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-fastdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-headless.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-headless-fastdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-headless-slowdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-javadoc.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-javadoc-zip.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-jmods.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-jmods-fastdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-jmods-slowdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-slowdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-src.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-src-fastdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-src-slowdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-static-libs.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-static-libs-fastdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
java-latest-openjdk-static-libs-slowdebug.x86_64 1:18.0.1.0.10-1.rolling.el8 epel
openjdk-asmtools.noarch 7.0.b10-0.2.20210610.gitf40a2c0.el8 epel
openjdk-asmtools-javadoc.noarch 7.0.b10-0.2.20210610.gitf40a2c0.el8 epel
然后选择安装需要的版本
[root@192 home]# yum -y install java-1.8.0-openjdk.x86_64
上次元数据过期检查:0:20:28 前,执行于 2022年08月14日 星期日 15时47分21秒。
依赖关系解决。
=====================================================================================
软件包 架构 版本 仓库 大小
=====================================================================================
Installing:
java-1.8.0-openjdk x86_64 1:1.8.0.312.b07-2.el8_5 AppStream 341 k
Upgrading:
nspr x86_64 4.32.0-1.el8_4 AppStream 142 k
nss x86_64 3.67.0-7.el8_5 AppStream 741 k
nss-softokn x86_64 3.67.0-7.el8_5 AppStream 487 k
nss-softokn-freebl x86_64 3.67.0-7.el8_5 AppStream 395 k
nss-sysinit x86_64 3.67.0-7.el8_5 AppStream 73 k
nss-util x86_64 3.67.0-7.el8_5 AppStream 137 k
安装依赖关系:
copy-jdk-configs noarch 4.0-2.el8 AppStream 31 k
java-1.8.0-openjdk-headless
x86_64 1:1.8.0.312.b07-2.el8_5 AppStream 34 M
javapackages-filesystem noarch 5.3.0-1.module_el8.0.0+11+5b8c10bd AppStream 30 k
ttmkfdir x86_64 3.0.9-54.el8 AppStream 62 k
tzdata-java noarch 2021e-1.el8 AppStream 191 k
xorg-x11-fonts-Type1 noarch 7.5-19.el8 AppStream 522 k
lksctp-tools x86_64 1.0.18-3.el8 base 100 k
Enabling module streams:
javapackages-runtime 201801
事务概要
=====================================================================================
安装 8 软件包
升级 6 软件包
总下载:37 M
下载软件包:
(1/14): copy-jdk-configs-4.0-2.el8.noarch.rpm 23 kB/s | 31 kB 00:01
(2/14): javapackages-filesystem-5.3.0-1.module_el8.0 132 kB/s | 30 kB 00:00
(3/14): ttmkfdir-3.0.9-54.el8.x86_64.rpm 253 kB/s | 62 kB 00:00
(4/14): java-1.8.0-openjdk-1.8.0.312.b07-2.el8_5.x86 139 kB/s | 341 kB 00:02
(5/14): tzdata-java-2021e-1.el8.noarch.rpm 226 kB/s | 191 kB 00:00
(6/14): lksctp-tools-1.0.18-3.el8.x86_64.rpm 269 kB/s | 100 kB 00:00
(7/14): nspr-4.32.0-1.el8_4.x86_64.rpm 240 kB/s | 142 kB 00:00
(8/14): xorg-x11-fonts-Type1-7.5-19.el8.noarch.rpm 272 kB/s | 522 kB 00:01
(9/14): nss-softokn-3.67.0-7.el8_5.x86_64.rpm 263 kB/s | 487 kB 00:01
(10/14): nss-3.67.0-7.el8_5.x86_64.rpm 270 kB/s | 741 kB 00:02
(11/14): nss-sysinit-3.67.0-7.el8_5.x86_64.rpm 214 kB/s | 73 kB 00:00
(12/14): nss-util-3.67.0-7.el8_5.x86_64.rpm 238 kB/s | 137 kB 00:00
(13/14): nss-softokn-freebl-3.67.0-7.el8_5.x86_64.rp 251 kB/s | 395 kB 00:01
(14/14): java-1.8.0-openjdk-headless-1.8.0.312.b07-2 267 kB/s | 34 MB 02:09
-------------------------------------------------------------------------------------
总计 292 kB/s | 37 MB 02:09
警告:/var/cache/dnf/AppStream-a5e033d33ad24141/packages/copy-jdk-configs-4.0-2.el8.noarch.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID 8483c65d: NOKEY
CentOS-8 - AppStream - mirrors.aliyun.com 1.3 kB/s | 1.6 kB 00:01
导入 GPG 公钥 0x8483C65D:
Userid: "CentOS (CentOS Official Signing Key) <[email protected]>"
指纹: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
来自: https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
导入公钥成功
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
运行脚本 : copy-jdk-configs-4.0-2.el8.noarch 1/1
运行脚本 : java-1.8.0-openjdk-headless-1:1.8.0.312.b07-2.el8_5.x86_64 1/1
准备中 : 1/1
Upgrading : nspr-4.32.0-1.el8_4.x86_64 1/20
运行脚本 : nspr-4.32.0-1.el8_4.x86_64 1/20
Upgrading : nss-util-3.67.0-7.el8_5.x86_64 2/20
Upgrading : nss-softokn-freebl-3.67.0-7.el8_5.x86_64 3/20
Upgrading : nss-softokn-3.67.0-7.el8_5.x86_64 4/20
Upgrading : nss-3.67.0-7.el8_5.x86_64 5/20
Upgrading : nss-sysinit-3.67.0-7.el8_5.x86_64 6/20
Installing : lksctp-tools-1.0.18-3.el8.x86_64 7/20
运行脚本 : lksctp-tools-1.0.18-3.el8.x86_64 7/20
Installing : tzdata-java-2021e-1.el8.noarch 8/20
Installing : ttmkfdir-3.0.9-54.el8.x86_64 9/20
Installing : xorg-x11-fonts-Type1-7.5-19.el8.noarch 10/20
运行脚本 : xorg-x11-fonts-Type1-7.5-19.el8.noarch 10/20
Installing : javapackages-filesystem-5.3.0-1.module_el8.0.0+11+5b8c10bd.n 11/20
Installing : copy-jdk-configs-4.0-2.el8.noarch 12/20
Installing : java-1.8.0-openjdk-headless-1:1.8.0.312.b07-2.el8_5.x86_64 13/20
运行脚本 : java-1.8.0-openjdk-headless-1:1.8.0.312.b07-2.el8_5.x86_64 13/20
Installing : java-1.8.0-openjdk-1:1.8.0.312.b07-2.el8_5.x86_64 14/20
运行脚本 : java-1.8.0-openjdk-1:1.8.0.312.b07-2.el8_5.x86_64 14/20
清理 : nss-3.41.0-5.el8.x86_64 15/20
运行脚本 : nss-3.41.0-5.el8.x86_64 15/20
Setting system policy to DEFAULT
Note: System-wide crypto policies are applied on application start-up.
It is recommended to restart the system for the change of policies
to fully take place.
清理 : nss-softokn-3.41.0-5.el8.x86_64 16/20
清理 : nss-sysinit-3.41.0-5.el8.x86_64 17/20
清理 : nss-softokn-freebl-3.41.0-5.el8.x86_64 18/20
清理 : nss-util-3.41.0-5.el8.x86_64 19/20
清理 : nspr-4.20.0-2.el8.x86_64 20/20
运行脚本 : nspr-4.20.0-2.el8.x86_64 20/20
运行脚本 : nss-3.67.0-7.el8_5.x86_64 20/20
运行脚本 : copy-jdk-configs-4.0-2.el8.noarch 20/20
运行脚本 : java-1.8.0-openjdk-1:1.8.0.312.b07-2.el8_5.x86_64 20/20
运行脚本 : nspr-4.20.0-2.el8.x86_64 20/20
验证 : copy-jdk-configs-4.0-2.el8.noarch 1/20
验证 : java-1.8.0-openjdk-1:1.8.0.312.b07-2.el8_5.x86_64 2/20
验证 : java-1.8.0-openjdk-headless-1:1.8.0.312.b07-2.el8_5.x86_64 3/20
验证 : javapackages-filesystem-5.3.0-1.module_el8.0.0+11+5b8c10bd.n 4/20
验证 : ttmkfdir-3.0.9-54.el8.x86_64 5/20
验证 : tzdata-java-2021e-1.el8.noarch 6/20
验证 : xorg-x11-fonts-Type1-7.5-19.el8.noarch 7/20
验证 : lksctp-tools-1.0.18-3.el8.x86_64 8/20
验证 : nspr-4.32.0-1.el8_4.x86_64 9/20
验证 : nspr-4.20.0-2.el8.x86_64 10/20
验证 : nss-3.67.0-7.el8_5.x86_64 11/20
验证 : nss-3.41.0-5.el8.x86_64 12/20
验证 : nss-softokn-3.67.0-7.el8_5.x86_64 13/20
验证 : nss-softokn-3.41.0-5.el8.x86_64 14/20
验证 : nss-softokn-freebl-3.67.0-7.el8_5.x86_64 15/20
验证 : nss-softokn-freebl-3.41.0-5.el8.x86_64 16/20
验证 : nss-sysinit-3.67.0-7.el8_5.x86_64 17/20
验证 : nss-sysinit-3.41.0-5.el8.x86_64 18/20
验证 : nss-util-3.67.0-7.el8_5.x86_64 19/20
验证 : nss-util-3.41.0-5.el8.x86_64 20/20
已升级:
nspr-4.32.0-1.el8_4.x86_64 nss-3.67.0-7.el8_5.x86_64
nss-softokn-3.67.0-7.el8_5.x86_64 nss-softokn-freebl-3.67.0-7.el8_5.x86_64
nss-sysinit-3.67.0-7.el8_5.x86_64 nss-util-3.67.0-7.el8_5.x86_64
已安装:
java-1.8.0-openjdk-1:1.8.0.312.b07-2.el8_5.x86_64
copy-jdk-configs-4.0-2.el8.noarch
java-1.8.0-openjdk-headless-1:1.8.0.312.b07-2.el8_5.x86_64
javapackages-filesystem-5.3.0-1.module_el8.0.0+11+5b8c10bd.noarch
ttmkfdir-3.0.9-54.el8.x86_64
tzdata-java-2021e-1.el8.noarch
xorg-x11-fonts-Type1-7.5-19.el8.noarch
lksctp-tools-1.0.18-3.el8.x86_64
完毕!
查看jdk
[root@192 home]# java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
1.2 安装tomcat
先新建文件夹 进入文件夹
[root@192 home]# mkdir software
[root@192 home]# cd software
[root@192 software]# ls
在software文件夹下执行
[root@192 software]# wget https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.82/bin/apache-tomcat-8.5.82.tar.gz
-2022-08-14 16:16:21-- https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.82/bin/apache-tomcat-8.5.82.tar.gz
正在解析主机 dlcdn.apache.org (dlcdn.apache.org)... 151.101.2.132, 2a04:4e42::644
正在连接 dlcdn.apache.org (dlcdn.apache.org)|151.101.2.132|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:10610025 (10M) [application/x-gzip]
正在保存至: “apache-tomcat-8.5.82.tar.gz”
apache-tomcat-8.5.82. 100%[======================>] 10.12M 2.26MB/s 用时 61s ] 1.07M 27.5KB/s 剩余 4m 31s
2022-08-14 16:17:22 (171 KB/s) - 已保存 “apache-tomcat-8.5.82.tar.gz” [10610025/10610025])
在software文件夹下 就可以看到 下载的tomcat压缩包
[root@192 software]# ls
apache-tomcat-8.5.82.tar.gz
解压压缩包
[root@192 software]# tar zxf apache-tomcat-8.5.82.tar.gz
[root@192 software]# ls
apache-tomcat-8.5.82 apache-tomcat-8.5.82.tar.gz
启动tomcat 找到 ./startup.sh 文件
[root@192 software]# cd apache-tomcat-8.5.82/bin
[root@192 bin]# ll
总用量 888
-rw-r-----. 1 root root 36191 8月 9 05:26 bootstrap.jar
-rw-r-----. 1 root root 16840 8月 9 05:26 catalina.bat
-rwxr-x---. 1 root root 25294 8月 9 05:26 catalina.sh
-rw-r-----. 1 root root 1664 8月 9 05:26 catalina-tasks.xml
-rw-r-----. 1 root root 2123 8月 9 05:26 ciphers.bat
-rwxr-x---. 1 root root 1997 8月 9 05:26 ciphers.sh
-rw-r-----. 1 root root 25410 8月 9 05:26 commons-daemon.jar
-rw-r-----. 1 root root 211777 8月 9 05:26 commons-daemon-native.tar.gz
-rw-r-----. 1 root root 2040 8月 9 05:26 configtest.bat
-rwxr-x---. 1 root root 1922 8月 9 05:26 configtest.sh
-rwxr-x---. 1 root root 9100 8月 9 05:26 daemon.sh
-rw-r-----. 1 root root 2091 8月 9 05:26 digest.bat
-rwxr-x---. 1 root root 1965 8月 9 05:26 digest.sh
-rw-r-----. 1 root root 3460 8月 9 05:26 setclasspath.bat
-rwxr-x---. 1 root root 3708 8月 9 05:26 setclasspath.sh
-rw-r-----. 1 root root 2020 8月 9 05:26 shutdown.bat
-rwxr-x---. 1 root root 1902 8月 9 05:26 shutdown.sh
-rw-r-----. 1 root root 2022 8月 9 05:26 startup.bat
-rwxr-x---. 1 root root 1904 8月 9 05:26 startup.sh
-rw-r-----. 1 root root 51542 8月 9 05:26 tomcat-juli.jar
-rw-r-----. 1 root root 436593 8月 9 05:26 tomcat-native.tar.gz
-rw-r-----. 1 root root 4574 8月 9 05:26 tool-wrapper.bat
-rwxr-x---. 1 root root 5540 8月 9 05:26 tool-wrapper.sh
-rw-r-----. 1 root root 2026 8月 9 05:26 version.bat
-rwxr-x---. 1 root root 1908 8月 9 05:26 version.sh
[root@192 bin]# ./startup.sh
Using CATALINA_BASE: /home/software/apache-tomcat-8.5.82
Using CATALINA_HOME: /home/software/apache-tomcat-8.5.82
Using CATALINA_TMPDIR: /home/software/apache-tomcat-8.5.82/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/software/apache-tomcat-8.5.82/bin/bootstrap.jar:/home/software/apache-tomcat-8.5.82/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.
1.3安装 mysql
[root@192 home]# rpm -qa | grep mysql
[root@192 home]# yum -y install mysql-server mysql mysql-devel
上次元数据过期检查:0:41:25 前,执行于 2022年08月14日 星期日 15时47分21秒。
依赖关系解决。
=====================================================================================
软件包 架构 版本 仓库 大小
=====================================================================================
Installing:
mysql x86_64 8.0.26-1.module_el8.4.0+915+de215114 AppStream 12 M
mysql-devel x86_64 8.0.26-1.module_el8.4.0+915+de215114 AppStream 155 k
mysql-server x86_64 8.0.26-1.module_el8.4.0+915+de215114 AppStream 25 M
Upgrading:
e2fsprogs x86_64 1.45.6-2.el8 base 1.0 M
e2fsprogs-libs x86_64 1.45.6-2.el8 base 233 k
keyutils x86_64 1.5.10-9.el8 base 66 k
keyutils-libs x86_64 1.5.10-9.el8 base 34 k
krb5-libs x86_64 1.18.2-14.el8 base 840 k
libcom_err x86_64 1.45.6-2.el8 base 49 k
libselinux x86_64 2.9-5.el8 base 165 k
libselinux-utils x86_64 2.9-5.el8 base 243 k
libsepol x86_64 2.9-3.el8 base 340 k
libss x86_64 1.45.6-2.el8 base 54 k
openssl x86_64 1:1.1.1k-5.el8_5 base 709 k
openssl-libs x86_64 1:1.1.1k-5.el8_5 base 1.5 M
pcre2 x86_64 10.32-2.el8 base 246 k
python3-libselinux x86_64 2.9-5.el8 base 283 k
zlib x86_64 1.2.11-17.el8 base 102 k
安装依赖关系:
mariadb-connector-c-config
noarch 3.1.11-2.el8_3 AppStream 15 k
mecab x86_64 0.996-1.module_el8.4.0+589+11e12751.9 AppStream 393 k
mysql-common x86_64 8.0.26-1.module_el8.4.0+915+de215114 AppStream 134 k
mysql-errmsg x86_64 8.0.26-1.module_el8.4.0+915+de215114 AppStream 598 k
mysql-libs x86_64 8.0.26-1.module_el8.4.0+915+de215114 AppStream 1.4 M
protobuf-lite x86_64 3.5.0-13.el8 AppStream 149 k
keyutils-libs-devel x86_64 1.5.10-9.el8 base 48 k
krb5-devel x86_64 1.18.2-14.el8 base 560 k
libcom_err-devel x86_64 1.45.6-2.el8 base 38 k
libkadm5 x86_64 1.18.2-14.el8 base 187 k
libselinux-devel x86_64 2.9-5.el8 base 200 k
libsepol-devel x86_64 2.9-3.el8 base 87 k
libverto-devel x86_64 0.3.0-5.el8 base 18 k
openssl-devel x86_64 1:1.1.1k-5.el8_5 base 2.3 M
pcre2-devel x86_64 10.32-2.el8 base 605 k
pcre2-utf16 x86_64 10.32-2.el8 base 229 k
pcre2-utf32 x86_64 10.32-2.el8 base 220 k
zlib-devel x86_64 1.2.11-17.el8 base 58 k
Enabling module streams:
mysql 8.0
事务概要
=====================================================================================
安装 21 软件包
升级 15 软件包
总下载:50 M
下载软件包:
(1/36): mariadb-connector-c-config-3.1.11-2.el8_3.no 56 kB/s | 15 kB 00:00
(2/36): mysql-common-8.0.26-1.module_el8.4.0+915+de2 223 kB/s | 134 kB 00:00
(3/36): mysql-devel-8.0.26-1.module_el8.4.0+915+de21 233 kB/s | 155 kB 00:00
(4/36): mecab-0.996-1.module_el8.4.0+589+11e12751.9. 209 kB/s | 393 kB 00:01
(5/36): mysql-errmsg-8.0.26-1.module_el8.4.0+915+de2 242 kB/s | 598 kB 00:02
(6/36): mysql-libs-8.0.26-1.module_el8.4.0+915+de215 228 kB/s | 1.4 MB 00:06
(7/36): protobuf-lite-3.5.0-13.el8.x86_64.rpm 210 kB/s | 149 kB 00:00
(8/36): keyutils-libs-devel-1.5.10-9.el8.x86_64.rpm 176 kB/s | 48 kB 00:00
(9/36): krb5-devel-1.18.2-14.el8.x86_64.rpm 241 kB/s | 560 kB 00:02
(10/36): libcom_err-devel-1.45.6-2.el8.x86_64.rpm 142 kB/s | 38 kB 00:00
(11/36): libkadm5-1.18.2-14.el8.x86_64.rpm 223 kB/s | 187 kB 00:00
(12/36): libselinux-devel-2.9-5.el8.x86_64.rpm 205 kB/s | 200 kB 00:00
(13/36): libsepol-devel-2.9-3.el8.x86_64.rpm 92 kB/s | 87 kB 00:00
(14/36): libverto-devel-0.3.0-5.el8.x86_64.rpm 85 kB/s | 18 kB 00:00
(15/36): openssl-devel-1.1.1k-5.el8_5.x86_64.rpm 230 kB/s | 2.3 MB 00:10
(16/36): pcre2-devel-10.32-2.el8.x86_64.rpm 240 kB/s | 605 kB 00:02
(17/36): pcre2-utf16-10.32-2.el8.x86_64.rpm 230 kB/s | 229 kB 00:00
(18/36): pcre2-utf32-10.32-2.el8.x86_64.rpm 223 kB/s | 220 kB 00:00
(19/36): zlib-devel-1.2.11-17.el8.x86_64.rpm 174 kB/s | 58 kB 00:00
(20/36): e2fsprogs-1.45.6-2.el8.x86_64.rpm 232 kB/s | 1.0 MB 00:04
(21/36): e2fsprogs-libs-1.45.6-2.el8.x86_64.rpm 197 kB/s | 233 kB 00:01
(22/36): keyutils-1.5.10-9.el8.x86_64.rpm 178 kB/s | 66 kB 00:00
(23/36): keyutils-libs-1.5.10-9.el8.x86_64.rpm 121 kB/s | 34 kB 00:00
(24/36): krb5-libs-1.18.2-14.el8.x86_64.rpm 229 kB/s | 840 kB 00:03
(25/36): libcom_err-1.45.6-2.el8.x86_64.rpm 172 kB/s | 49 kB 00:00
(26/36): libselinux-2.9-5.el8.x86_64.rpm 204 kB/s | 165 kB 00:00
(27/36): libselinux-utils-2.9-5.el8.x86_64.rpm 216 kB/s | 243 kB 00:01
(28/36): libsepol-2.9-3.el8.x86_64.rpm 238 kB/s | 340 kB 00:01
(29/36): libss-1.45.6-2.el8.x86_64.rpm 170 kB/s | 54 kB 00:00
(30/36): openssl-1.1.1k-5.el8_5.x86_64.rpm 233 kB/s | 709 kB 00:03
(31/36): mysql-8.0.26-1.module_el8.4.0+915+de215114. 242 kB/s | 12 MB 00:50
(32/36): pcre2-10.32-2.el8.x86_64.rpm 243 kB/s | 246 kB 00:01
(33/36): python3-libselinux-2.9-5.el8.x86_64.rpm 216 kB/s | 283 kB 00:01
(34/36): openssl-libs-1.1.1k-5.el8_5.x86_64.rpm 242 kB/s | 1.5 MB 00:06
(35/36): zlib-1.2.11-17.el8.x86_64.rpm 196 kB/s | 102 kB 00:00
(36/36): mysql-server-8.0.26-1.module_el8.4.0+915+de 242 kB/s | 25 MB 01:45
-------------------------------------------------------------------------------------
总计 467 kB/s | 50 MB 01:49
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
准备中 : 1/1
Upgrading : zlib-1.2.11-17.el8.x86_64 1/51
Upgrading : openssl-libs-1:1.1.1k-5.el8_5.x86_64 2/51
运行脚本 : openssl-libs-1:1.1.1k-5.el8_5.x86_64 2/51
Upgrading : libcom_err-1.45.6-2.el8.x86_64 3/51
运行脚本 : libcom_err-1.45.6-2.el8.x86_64 3/51
Upgrading : keyutils-libs-1.5.10-9.el8.x86_64 4/51
Upgrading : pcre2-10.32-2.el8.x86_64 5/51
Upgrading : libsepol-2.9-3.el8.x86_64 6/51
运行脚本 : libsepol-2.9-3.el8.x86_64 6/51
Upgrading : libselinux-2.9-5.el8.x86_64 7/51
运行脚本 : libselinux-2.9-5.el8.x86_64 7/51
Upgrading : krb5-libs-1.18.2-14.el8.x86_64 8/51
Installing : zlib-devel-1.2.11-17.el8.x86_64 9/51
Installing : mariadb-connector-c-config-3.1.11-2.el8_3.noarch 10/51
Installing : mysql-common-8.0.26-1.module_el8.4.0+915+de215114.x86_64 11/51
Installing : mysql-8.0.26-1.module_el8.4.0+915+de215114.x86_64 12/51
Installing : mysql-errmsg-8.0.26-1.module_el8.4.0+915+de215114.x86_64 13/51
Installing : mysql-libs-8.0.26-1.module_el8.4.0+915+de215114.x86_64 14/51
Installing : libkadm5-1.18.2-14.el8.x86_64 15/51
Installing : libsepol-devel-2.9-3.el8.x86_64 16/51
Installing : keyutils-libs-devel-1.5.10-9.el8.x86_64 17/51
Installing : libcom_err-devel-1.45.6-2.el8.x86_64 18/51
Upgrading : e2fsprogs-libs-1.45.6-2.el8.x86_64 19/51
运行脚本 : e2fsprogs-libs-1.45.6-2.el8.x86_64 19/51
Upgrading : libss-1.45.6-2.el8.x86_64 20/51
运行脚本 : libss-1.45.6-2.el8.x86_64 20/51
Installing : protobuf-lite-3.5.0-13.el8.x86_64 21/51
Installing : pcre2-utf32-10.32-2.el8.x86_64 22/51
Installing : pcre2-utf16-10.32-2.el8.x86_64 23/51
Installing : pcre2-devel-10.32-2.el8.x86_64 24/51
Installing : libselinux-devel-2.9-5.el8.x86_64 25/51
Installing : libverto-devel-0.3.0-5.el8.x86_64 26/51
Installing : krb5-devel-1.18.2-14.el8.x86_64 27/51
Installing : openssl-devel-1:1.1.1k-5.el8_5.x86_64 28/51
Installing : mecab-0.996-1.module_el8.4.0+589+11e12751.9.x86_64 29/51
运行脚本 : mecab-0.996-1.module_el8.4.0+589+11e12751.9.x86_64 29/51
运行脚本 : mysql-server-8.0.26-1.module_el8.4.0+915+de215114.x86_64 30/51
Installing : mysql-server-8.0.26-1.module_el8.4.0+915+de215114.x86_64 30/51
运行脚本 : mysql-server-8.0.26-1.module_el8.4.0+915+de215114.x86_64 30/51
ValueError: /var/log/mysql(/.*)? 的文件上下文已定义
Installing : mysql-devel-8.0.26-1.module_el8.4.0+915+de215114.x86_64 31/51
Upgrading : e2fsprogs-1.45.6-2.el8.x86_64 32/51
Upgrading : libselinux-utils-2.9-5.el8.x86_64 33/51
Upgrading : python3-libselinux-2.9-5.el8.x86_64 34/51
Upgrading : keyutils-1.5.10-9.el8.x86_64 35/51
Upgrading : openssl-1:1.1.1k-5.el8_5.x86_64 36/51
清理 : krb5-libs-1.16.1-22.el8.x86_64 37/51
清理 : openssl-1:1.1.1-8.el8.x86_64 38/51
清理 : keyutils-1.5.10-6.el8.x86_64 39/51
清理 : e2fsprogs-1.44.3-2.el8.x86_64 40/51
清理 : e2fsprogs-libs-1.44.3-2.el8.x86_64 41/51
运行脚本 : e2fsprogs-libs-1.44.3-2.el8.x86_64 41/51
清理 : libss-1.44.3-2.el8.x86_64 42/51
运行脚本 : libss-1.44.3-2.el8.x86_64 42/51
清理 : python3-libselinux-2.8-6.el8.x86_64 43/51
清理 : libselinux-utils-2.8-6.el8.x86_64 44/51
清理 : libselinux-2.8-6.el8.x86_64 45/51
清理 : openssl-libs-1:1.1.1-8.el8.x86_64 46/51
运行脚本 : openssl-libs-1:1.1.1-8.el8.x86_64 46/51
清理 : zlib-1.2.11-10.el8.x86_64 47/51
清理 : pcre2-10.32-1.el8.x86_64 48/51
清理 : libsepol-2.8-2.el8.x86_64 49/51
运行脚本 : libsepol-2.8-2.el8.x86_64 49/51
清理 : libcom_err-1.44.3-2.el8.x86_64 50/51
运行脚本 : libcom_err-1.44.3-2.el8.x86_64 50/51
清理 : keyutils-libs-1.5.10-6.el8.x86_64 51/51
运行脚本 : keyutils-libs-1.5.10-6.el8.x86_64 51/51
验证 : mariadb-connector-c-config-3.1.11-2.el8_3.noarch 1/51
验证 : mecab-0.996-1.module_el8.4.0+589+11e12751.9.x86_64 2/51
验证 : mysql-8.0.26-1.module_el8.4.0+915+de215114.x86_64 3/51
验证 : mysql-common-8.0.26-1.module_el8.4.0+915+de215114.x86_64 4/51
验证 : mysql-devel-8.0.26-1.module_el8.4.0+915+de215114.x86_64 5/51
验证 : mysql-errmsg-8.0.26-1.module_el8.4.0+915+de215114.x86_64 6/51
验证 : mysql-libs-8.0.26-1.module_el8.4.0+915+de215114.x86_64 7/51
验证 : mysql-server-8.0.26-1.module_el8.4.0+915+de215114.x86_64 8/51
验证 : protobuf-lite-3.5.0-13.el8.x86_64 9/51
验证 : keyutils-libs-devel-1.5.10-9.el8.x86_64 10/51
验证 : krb5-devel-1.18.2-14.el8.x86_64 11/51
验证 : libcom_err-devel-1.45.6-2.el8.x86_64 12/51
验证 : libkadm5-1.18.2-14.el8.x86_64 13/51
验证 : libselinux-devel-2.9-5.el8.x86_64 14/51
验证 : libsepol-devel-2.9-3.el8.x86_64 15/51
验证 : libverto-devel-0.3.0-5.el8.x86_64 16/51
验证 : openssl-devel-1:1.1.1k-5.el8_5.x86_64 17/51
验证 : pcre2-devel-10.32-2.el8.x86_64 18/51
验证 : pcre2-utf16-10.32-2.el8.x86_64 19/51
验证 : pcre2-utf32-10.32-2.el8.x86_64 20/51
验证 : zlib-devel-1.2.11-17.el8.x86_64 21/51
验证 : e2fsprogs-1.45.6-2.el8.x86_64 22/51
验证 : e2fsprogs-1.44.3-2.el8.x86_64 23/51
验证 : e2fsprogs-libs-1.45.6-2.el8.x86_64 24/51
验证 : e2fsprogs-libs-1.44.3-2.el8.x86_64 25/51
验证 : keyutils-1.5.10-9.el8.x86_64 26/51
验证 : keyutils-1.5.10-6.el8.x86_64 27/51
验证 : keyutils-libs-1.5.10-9.el8.x86_64 28/51
验证 : keyutils-libs-1.5.10-6.el8.x86_64 29/51
验证 : krb5-libs-1.18.2-14.el8.x86_64 30/51
验证 : krb5-libs-1.16.1-22.el8.x86_64 31/51
验证 : libcom_err-1.45.6-2.el8.x86_64 32/51
验证 : libcom_err-1.44.3-2.el8.x86_64 33/51
验证 : libselinux-2.9-5.el8.x86_64 34/51
验证 : libselinux-2.8-6.el8.x86_64 35/51
验证 : libselinux-utils-2.9-5.el8.x86_64 36/51
验证 : libselinux-utils-2.8-6.el8.x86_64 37/51
验证 : libsepol-2.9-3.el8.x86_64 38/51
验证 : libsepol-2.8-2.el8.x86_64 39/51
验证 : libss-1.45.6-2.el8.x86_64 40/51
验证 : libss-1.44.3-2.el8.x86_64 41/51
验证 : openssl-1:1.1.1k-5.el8_5.x86_64 42/51
验证 : openssl-1:1.1.1-8.el8.x86_64 43/51
验证 : openssl-libs-1:1.1.1k-5.el8_5.x86_64 44/51
验证 : openssl-libs-1:1.1.1-8.el8.x86_64 45/51
验证 : pcre2-10.32-2.el8.x86_64 46/51
验证 : pcre2-10.32-1.el8.x86_64 47/51
验证 : python3-libselinux-2.9-5.el8.x86_64 48/51
验证 : python3-libselinux-2.8-6.el8.x86_64 49/51
验证 : zlib-1.2.11-17.el8.x86_64 50/51
验证 : zlib-1.2.11-10.el8.x86_64 51/51
已升级:
e2fsprogs-1.45.6-2.el8.x86_64 e2fsprogs-libs-1.45.6-2.el8.x86_64
keyutils-1.5.10-9.el8.x86_64 keyutils-libs-1.5.10-9.el8.x86_64
krb5-libs-1.18.2-14.el8.x86_64 libcom_err-1.45.6-2.el8.x86_64
libselinux-2.9-5.el8.x86_64 libselinux-utils-2.9-5.el8.x86_64
libsepol-2.9-3.el8.x86_64 libss-1.45.6-2.el8.x86_64
openssl-1:1.1.1k-5.el8_5.x86_64 openssl-libs-1:1.1.1k-5.el8_5.x86_64
pcre2-10.32-2.el8.x86_64 python3-libselinux-2.9-5.el8.x86_64
zlib-1.2.11-17.el8.x86_64
已安装:
mysql-8.0.26-1.module_el8.4.0+915+de215114.x86_64
mysql-devel-8.0.26-1.module_el8.4.0+915+de215114.x86_64
mysql-server-8.0.26-1.module_el8.4.0+915+de215114.x86_64
mariadb-connector-c-config-3.1.11-2.el8_3.noarch
mecab-0.996-1.module_el8.4.0+589+11e12751.9.x86_64
mysql-common-8.0.26-1.module_el8.4.0+915+de215114.x86_64
mysql-errmsg-8.0.26-1.module_el8.4.0+915+de215114.x86_64
mysql-libs-8.0.26-1.module_el8.4.0+915+de215114.x86_64
protobuf-lite-3.5.0-13.el8.x86_64
keyutils-libs-devel-1.5.10-9.el8.x86_64
krb5-devel-1.18.2-14.el8.x86_64
libcom_err-devel-1.45.6-2.el8.x86_64
libkadm5-1.18.2-14.el8.x86_64
libselinux-devel-2.9-5.el8.x86_64
libsepol-devel-2.9-3.el8.x86_64
libverto-devel-0.3.0-5.el8.x86_64
openssl-devel-1:1.1.1k-5.el8_5.x86_64
pcre2-devel-10.32-2.el8.x86_64
pcre2-utf16-10.32-2.el8.x86_64
pcre2-utf32-10.32-2.el8.x86_64
zlib-devel-1.2.11-17.el8.x86_64
完毕!
设置mysql
[root@192 home]# ps aux | grep mysql
root 39367 0.0 0.1 12320 1080 pts/1 R+ 16:32 0:00 grep --color=auto mysql
[root@192 home]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[root@192 home]# mysqladmin -u root password 123456
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
[root@192 home]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.26 Source distribution
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
查看 tomcat 是否启动
[root@192 bin]# ps -ef | grep tomcat
root 40554 1 4 17:42 pts/1 00:00:17 /usr/bin/java -Djava.util.logging.config.file=/home/software/apache-tomcat-8.5.82/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djdk.tls.ephemeralDHKeySize=2048
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
-Dignore.endorsed.dirs= -classpath /home/software/apache-tomcat-8.5.82/bin/bootstrap.jar:/home/software/apache-tomcat-8.5.82/bin/tomcat-juli.jar
-Dcatalina.base=/home/software/apachetomcat-8.5.82
-Dcatalina.home=/home/software/apache-tomcat-8.5.82
-Djava.io.tmpdir=/home/software/apache-tomcat-8.5.82/temp org.apache.catalina.startup.Bootstrap start
root 40708 2907 0 17:49 pts/1 00:00:00 grep --color=auto tomcat
关闭tomcat接口
[root@192 bin]# kill -9 40554
然后再查询
[root@192 bin]# ps -ef | grep tomcat
root 40720 2907 0 17:51 pts/1 00:00:00 grep --color=auto tomcat
关闭tomcat命令:
./shutdown.sh
启动tomcat命令:
./startup.sh
二、idea java部分
1.添加 生产环境和测试环境
application-dev.yml 和 application-prod.yml、application.yml
application-prod.yml
server:
port: 8989
servlet:
context-path: /
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://192.168.100.150:3306/lzj_jxc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: root
password: 123456
hikari:
# 连接池名
pool-name: DateHikariCP
# 最小空闲连接数
minimum-idle: 5
# 空闲连接存活最大时间,默认600000(10分钟)
idle-timeout: 180000
# 最大连接数,默认10
maximum-pool-size: 10
# 从连接池返回的连接的自动提交
auto-commit: true
# 连接最大存活时间,0表示永久存活,默认1800000(30分钟)
max-lifetime: 1800000
# 连接超时时间,默认30000(30秒)
connection-timeout: 30000
# 测试连接是否可用的查询语句
connection-test-query: SELECT 1
## freemarker
freemarker:
suffix: .ftl
content-type: text/html
charset: UTF-8
template-loader-path: classpath:/views/
request-context-attribute: ctx
settings:
number_format: 0.##
# Mybatis-plus配置
mybatis-plus:
#配置Mapper映射文件
mapper-locations: classpath*:/mapper/*Mapper.xml
# 配置MyBatis数据返回类型别名(默认别名是类名)
type-aliases-package: com.lzj.admin.pojo
configuration:
# 自动驼峰命名
map-underscore-to-camel-case: true
## SQL 打印(方法接口所在的包,不是Mapper.xml所在的包)
logging:
level:
com.lzj.admin.mapper: debug
application-dev.yml
server:
port: 8989
servlet:
context-path: /
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/lzj_jxc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: root
password: 123456
hikari:
# 连接池名
pool-name: DateHikariCP
# 最小空闲连接数
minimum-idle: 5
# 空闲连接存活最大时间,默认600000(10分钟)
idle-timeout: 180000
# 最大连接数,默认10
maximum-pool-size: 10
# 从连接池返回的连接的自动提交
auto-commit: true
# 连接最大存活时间,0表示永久存活,默认1800000(30分钟)
max-lifetime: 1800000
# 连接超时时间,默认30000(30秒)
connection-timeout: 30000
# 测试连接是否可用的查询语句
connection-test-query: SELECT 1
## freemarker
freemarker:
suffix: .ftl
content-type: text/html
charset: UTF-8
template-loader-path: classpath:/views/
request-context-attribute: ctx
settings:
number_format: 0.##
# Mybatis-plus配置
mybatis-plus:
#配置Mapper映射文件
mapper-locations: classpath*:/mapper/*Mapper.xml
# 配置MyBatis数据返回类型别名(默认别名是类名)
type-aliases-package: com.lzj.admin.pojo
configuration:
# 自动驼峰命名
map-underscore-to-camel-case: true
## SQL 打印(方法接口所在的包,不是Mapper.xml所在的包)
logging:
level:
com.lzj.admin.mapper: debug
application.yml
spring:
profiles:
active: prod
在运行/调试配置
然后把war 放到 tomcat里面就可以了
版权归原作者 童小纯 所有, 如有侵权,请联系我们删除。