美文网首页
【Kylin】KylinV10SP3 服务器上安装5.7.44版

【Kylin】KylinV10SP3 服务器上安装5.7.44版

作者: Bogon | 来源:发表于2024-04-12 23:33 被阅读0次

如何在联网的KylinV10SP3 服务器上安装5.7.44版本MySQL?

本机操作系统

# nkvers

############## Kylin Linux Version #################
Release:
Kylin Linux Advanced Server release V10 (Lance)

Kernel:
4.19.90-52.22.v2207.ky10.x86_64

Build:
Kylin Linux Advanced Server
release V10 (SP3) /(Lance)-x86_64-Build23/20230324
#################################################

从MySQL官网下载mysql-5.7.44-1.el7.x86_64.rpm-bundle.tar

# wget  https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.44-1.el7.x86_64.rpm-bundle.tar

#  tar  xvf  mysql-5.7.44-1.el7.x86_64.rpm-bundle.tar


-rw-r--r-- 1 root root  570705920  4月 13 22:52 mysql-5.7.44-1.el7.x86_64.rpm-bundle.tar
-rw-r--r-- 1 7155 31415  32675564 10月 12  2023 mysql-community-client-5.7.44-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415    320884 10月 12  2023 mysql-community-common-5.7.44-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   4969564 10月 12  2023 mysql-community-devel-5.7.44-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415  48598388 10月 12  2023 mysql-community-embedded-5.7.44-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415  23315956 10月 12  2023 mysql-community-embedded-compat-5.7.44-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 134443120 10月 12  2023 mysql-community-embedded-devel-5.7.44-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   3093304 10月 12  2023 mysql-community-libs-5.7.44-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   1266600 10月 12  2023 mysql-community-libs-compat-5.7.44-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 193071528 10月 12  2023 mysql-community-server-5.7.44-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 128934768 10月 12  2023 mysql-community-test-5.7.44-1.el7.x86_64.rpm

安装MySQL 依赖

# yum -y install libaio net-tools  perl

# yum -y localinstall  *.rpm
上次元数据过期检查:0:05:04 前,执行于 2024年04月13日 星期六 22时49分19秒。
依赖关系解决。
=====================================================================================================================================================================================================
 Package                                                       Architecture                         Version                                         Repository                                  Size
=====================================================================================================================================================================================================
安装:
 mysql-community-client                                        x86_64                               5.7.44-1.el7                                    @commandline                                31 M
 mysql-community-common                                        x86_64                               5.7.44-1.el7                                    @commandline                               313 k
 mysql-community-devel                                         x86_64                               5.7.44-1.el7                                    @commandline                               4.7 M
 mysql-community-embedded                                      x86_64                               5.7.44-1.el7                                    @commandline                                46 M
 mysql-community-embedded-compat                               x86_64                               5.7.44-1.el7                                    @commandline                                22 M
 mysql-community-embedded-devel                                x86_64                               5.7.44-1.el7                                    @commandline                               128 M
 mysql-community-libs                                          x86_64                               5.7.44-1.el7                                    @commandline                               3.0 M
 mysql-community-libs-compat                                   x86_64                               5.7.44-1.el7                                    @commandline                               1.2 M
 mysql-community-server                                        x86_64                               5.7.44-1.el7                                    @commandline                               184 M
 mysql-community-test                                          x86_64                               5.7.44-1.el7                                    @commandline                               123 M
安装依赖关系:
 compat-openssl10                                              x86_64                               1:1.0.2o-8.ky10                                 ks10-adv-os                                1.1 M
 perl-JSON                                                     noarch                               2.97.001-6.ky10                                 ks10-adv-os                                 50 k

事务概要
=====================================================================================================================================================================================================
安装  12 软件包

总计:545 M
总下载:1.1 M
安装大小:2.8 G
下载软件包:
(1/2): compat-openssl10-1.0.2o-8.ky10.x86_64.rpm                                                                                                                     3.0 MB/s | 1.1 MB     00:00
(2/2): perl-JSON-2.97.001-6.ky10.noarch.rpm                                                                                                                          140 kB/s |  50 kB     00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                                                                 3.1 MB/s | 1.1 MB     00:00
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
  准备中  :                                                                                                                                                                                      1/1
  安装    : mysql-community-common-5.7.44-1.el7.x86_64                                                                                                                                          1/12
  安装    : mysql-community-libs-5.7.44-1.el7.x86_64                                                                                                                                            2/12
  运行脚本: mysql-community-libs-5.7.44-1.el7.x86_64                                                                                                                                            2/12
  安装    : compat-openssl10-1:1.0.2o-8.ky10.x86_64                                                                                                                                             3/12
  安装    : mysql-community-client-5.7.44-1.el7.x86_64                                                                                                                                          4/12
  运行脚本: mysql-community-server-5.7.44-1.el7.x86_64                                                                                                                                          5/12
  安装    : mysql-community-server-5.7.44-1.el7.x86_64                                                                                                                                          5/12
  运行脚本: mysql-community-server-5.7.44-1.el7.x86_64                                                                                                                                          5/12
  安装    : mysql-community-devel-5.7.44-1.el7.x86_64                                                                                                                                           6/12
  安装    : mysql-community-embedded-5.7.44-1.el7.x86_64                                                                                                                                        7/12
  运行脚本: mysql-community-embedded-5.7.44-1.el7.x86_64                                                                                                                                        7/12
  安装    : perl-JSON-2.97.001-6.ky10.noarch                                                                                                                                                    8/12
  安装    : mysql-community-test-5.7.44-1.el7.x86_64                                                                                                                                            9/12
  安装    : mysql-community-embedded-devel-5.7.44-1.el7.x86_64                                                                                                                                 10/12
  安装    : mysql-community-embedded-compat-5.7.44-1.el7.x86_64                                                                                                                                11/12
  安装    : mysql-community-libs-compat-5.7.44-1.el7.x86_64                                                                                                                                    12/12
  运行脚本: mysql-community-libs-compat-5.7.44-1.el7.x86_64                                                                                                                                    12/12
  验证    : compat-openssl10-1:1.0.2o-8.ky10.x86_64                                                                                                                                             1/12
  验证    : perl-JSON-2.97.001-6.ky10.noarch                                                                                                                                                    2/12
  验证    : mysql-community-client-5.7.44-1.el7.x86_64                                                                                                                                          3/12
  验证    : mysql-community-common-5.7.44-1.el7.x86_64                                                                                                                                          4/12
  验证    : mysql-community-devel-5.7.44-1.el7.x86_64                                                                                                                                           5/12
  验证    : mysql-community-embedded-5.7.44-1.el7.x86_64                                                                                                                                        6/12
  验证    : mysql-community-embedded-compat-5.7.44-1.el7.x86_64                                                                                                                                 7/12
  验证    : mysql-community-embedded-devel-5.7.44-1.el7.x86_64                                                                                                                                  8/12
  验证    : mysql-community-libs-5.7.44-1.el7.x86_64                                                                                                                                            9/12
  验证    : mysql-community-libs-compat-5.7.44-1.el7.x86_64                                                                                                                                    10/12
  验证    : mysql-community-server-5.7.44-1.el7.x86_64                                                                                                                                         11/12
  验证    : mysql-community-test-5.7.44-1.el7.x86_64                                                                                                                                           12/12

已安装:
  compat-openssl10-1:1.0.2o-8.ky10.x86_64         mysql-community-client-5.7.44-1.el7.x86_64          mysql-community-common-5.7.44-1.el7.x86_64         mysql-community-devel-5.7.44-1.el7.x86_64
  mysql-community-embedded-5.7.44-1.el7.x86_64    mysql-community-embedded-compat-5.7.44-1.el7.x86_64 mysql-community-embedded-devel-5.7.44-1.el7.x86_64 mysql-community-libs-5.7.44-1.el7.x86_64
  mysql-community-libs-compat-5.7.44-1.el7.x86_64 mysql-community-server-5.7.44-1.el7.x86_64          mysql-community-test-5.7.44-1.el7.x86_64           perl-JSON-2.97.001-6.ky10.noarch

完毕!

# systemctl  start  mysqld
# systemctl  enable  mysqld


# systemctl  status mysqld
 mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2024-04-13 22:59:22 CST; 2s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 2190 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
  Process: 2245 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
 Main PID: 2247 (mysqld)
    Tasks: 27
   Memory: 362.9M
   CGroup: /system.slice/mysqld.service
           └─2247 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

4月 13 22:59:18 localhost.localdomain systemd[1]: Starting MySQL Server...
4月 13 22:59:18 localhost.localdomain /semanage[2207]: Successful:  resrc=fcontext op=add-equal sglob="/var/lib/mysql-files" tglob="/var/lib/mysql"
4月 13 22:59:19 localhost.localdomain /semanage[2210]: Successful:  resrc=fcontext op=add-equal sglob="/var/lib/mysql-keyring" tglob="/var/lib/mysql"
4月 13 22:59:19 localhost.localdomain mysqld_pre_systemd[2216]: mysqld: Out of memory (Needed 4294967200 bytes)
4月 13 22:59:22 localhost.localdomain systemd[1]: Started MySQL Server.
# grep  -i password  /var/log/mysqld.log

2024-04-13T14:59:20.094002Z 1 [Note] A temporary password is generated for root@localhost: =uu:-#zOu5*r


# mysql  -h localhost -P  3306  -u root   -p'=uu:-#zOu5*r'

> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MySQL@123';
> flush privileges;

> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

> select  user,host from mysql.user;
+---------------+-----------+
| user          | host      |
+---------------+-----------+
| mysql.session | localhost |
| mysql.sys     | localhost |
| root          | localhost |
+---------------+-----------+
3 rows in set (0.00 sec)

如何在不联网的KylinV10SP3 服务器上安装5.7.44版本MySQL?

在联网的KylinV10SP3 服务器上打包安装5.7.44版本MySQL所需的依赖

# mkdir  install_mysql-5.7.44-KylinV10SP3/

# wget  https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.44-1.el7.x86_64.rpm-bundle.tar

#  tar  xvf  mysql-5.7.44-1.el7.x86_64.rpm-bundle.tar

#  rm  -f   mysql-5.7.44-1.el7.x86_64.rpm-bundle.tar

# mkdir yum 

# yum -y install  yum-utils  createrepo  

# repotrack   per  libaio net-tools 

# mv  *.rpm    yum 

# createrepo  -v  yum  

# cat   install_mysql-5.7.44.sh

#----------------------------------------------------------#
#!/bin/bash

parent_path="$( cd "$(dirname "$0")"; pwd -P )"
cd "$parent_path"

rm -rf /tmp/yum
cp -pr yum  /tmp/

echo "
[YUM]
name=yum
baseurl=file:///tmp/yum
enable=1
gpgcheck=0 " > /etc/yum.repos.d/yum.repo

yum clean all

yum -y install mysql-community-client   mysql-community-server  --disablerepo="*" --enablerepo="YUM"

rm -rf /etc/yum.repos.d/yum.repo
rm -rf /tmp/yum

#----------------------------------------------------------#
image.png

将 install_mysql-5.7.44-KylinV10SP3 打包成 install_mysql-5.7.44-KylinV10SP3.tar.gz 就可以在不联网服务器做离线安装了!

相关文章

网友评论

      本文标题:【Kylin】KylinV10SP3 服务器上安装5.7.44版

      本文链接:https://www.haomeiwen.com/subject/dgukxjtx.html