rpm包离线安装

事先从官网下载RPM安装包,上传至服务器:

[root@node2 ~]# ls -l mysql-5.7.37-1.el7.x86_64.rpm-bundle.tar
-rw-r--r-- 1 root root 545894400 Mar 27 22:31 mysql-5.7.37-1.el7.x86_64.rpm-bundle.tar

解压查看:

[root@node2 ~]# tar xf mysql-5.7.37-1.el7.x86_64.rpm-bundle.tar
[root@node2 ~]# ls -l mysql-community-*
-rw-r--r-- 1 7155 31415  26670472 Dec 16 10:01 mysql-community-client-5.7.37-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415    318884 Dec 16 10:01 mysql-community-common-5.7.37-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   4122424 Dec 16 10:01 mysql-community-devel-5.7.37-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415  47760004 Dec 16 10:02 mysql-community-embedded-5.7.37-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415  23316972 Dec 16 10:02 mysql-community-embedded-compat-5.7.37-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 132204460 Dec 16 10:02 mysql-community-embedded-devel-5.7.37-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   2474780 Dec 16 10:02 mysql-community-libs-5.7.37-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415   1264836 Dec 16 10:02 mysql-community-libs-compat-5.7.37-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 182274360 Dec 16 10:02 mysql-community-server-5.7.37-1.el7.x86_64.rpm
-rw-r--r-- 1 7155 31415 125477564 Dec 16 10:03 mysql-community-test-5.7.37-1.el7.x86_64.rpm

其中:
mysql-community-client 客户端
mysql-community-devel 开发库
mysql-community-common 服务端和客户端的公共文件
mysql-community-embedded 嵌入式
mysql-community-serve 服务端
mysql-community-test 测试组件
mysql-community-libs 共享
mysql-community-libs-compat MySQL之前版本的共享兼容库

安装:
首先限制mariadb相关软件包。

[root@node2 ~]# yum remove mariadb-libs -y
# 安装
[root@node2 ~]# rpm -ivh mysql-community-client-5.7.37-1.el7.x86_64.rpm 
 mysql-community-common-5.7.37-1.el7.x86_64.rpm \
 mysql-community-libs-5.7.37-1.el7.x86_64.rpm \
 mysql-community-server-5.7.37-1.el7.x86_64.rpm

设计开机自启并启动

[root@node2 ~]# systemctl enable --now mysqld

登陆

[root@node2 ~]# tmp_pwd=`awk '/temporary password/ {print $NF}' /var/log/mysqld.log`
[root@node2 ~]# mysql -uroot -p$tmp_pwd
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 10
Server version: 5.7.37 MySQL Community Server (GPL)

Copyright (c) 2000, 2022, 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.

mysql>

文章链接: https://www.mfisp.com/16701.html

文章标题:rpm包离线安装

文章版权:梦飞科技所发布的内容,部分为原创文章,转载请注明来源,网络转载文章如有侵权请联系我们!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
建站教程投稿分享

yum在线安装

2023-2-15 16:30:30

投稿分享服务器vps推荐

传统IDC是什么

2023-2-16 15:18:42

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
客户经理
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索

梦飞科技 - 最新云主机促销服务器租用优惠