标签:x86 光驱 server perl 镜像文件 64 mysql mariadb el7
#系统:centos 7
#mysql在centos7当中的安装包名为服务端mariadb-server和客户端mariadb:
第一步:在可联网的centos7系统上新建一个Yum仓库目录
mkdir mariadb-yumrepo
第二步:使用如下命令下载mysql安装所需要的包到yum仓库目录中
yum install --downloadonly --downloaddir=/mariadb-yumrepo mariadb-server mariadb
第三步:通过yum安装创建元数据的索引命令工具createrepo
yum install createrepo
第四步:通过createrepo工具为mariadb-yumrepo目录下的服务包建立索引元数据
createrepo /mariadb-yumrepo
第五步:将目录打包,上传到需要安装mysql服务的系统上
tar -zcvf mariadb-yumreop.tar.gz /mariadb-yumrepo
第六步:在需要安装mysql服务的系统上,解压上面打包好的文件,
tar -zxvf mariadb-yumreop.tar.gz -C /var/
[root@Centos 7 /]# cd /var/mariadb-yumrepo/
[root@Centos 7 /var/mariadb-yumrepo]# pwd
/var/mariadb-yumrepo
[root@Centos 7 /var/mariadb-yumrepo]# ls
mariadb-5.5.68-1.el7.x86_64.rpm
mariadb-server-5.5.68-1.el7.x86_64.rpm
perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm
perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm
perl-Data-Dumper-2.145-3.el7.x86_64.rpm
perl-DBD-MySQL-4.023-6.el7.x86_64.rpm
perl-DBI-1.627-4.el7.x86_64.rpm
perl-IO-Compress-2.061-2.el7.noarch.rpm
perl-Net-Daemon-0.48-5.el7.noarch.rpm
perl-PlRPC-0.2020-14.el7.noarch.rpm
repodata
第七步:根据此目录文件建立本地yum仓库
[root@Centos 7 /var/mariadb-yumrepo]# cd /etc/yum.repos.d/
[root@Centos 7 /etc/yum.repos.d]# vim bendiyum.repo
[mariadb-server]
name=mysql isntall server
baseurl=file:///var/mariadb-yumrepo/
gpgcheck=0
#建立元数据
[root@Centos 7 /etc/yum.repos.d]# yum makecache
第八步:开始安装mysql服务
[root@Centos 7 /etc/yum.repos.d]# yum install mariadb-server mariadb
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.68-1.el7 will be installed
---> Package mariadb-server.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(DBI) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.023-6.el7 will be installed
---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
--> Running transaction check
---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Running transaction check
---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
--> Running transaction check
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
mariadb x86_64 1:5.5.68-1.el7 mariadb-server 8.8 M
mariadb-server x86_64 1:5.5.68-1.el7 mariadb-server 11 M
Installing for dependencies:
perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 mariadb-server 32 k
perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 mariadb-server 57 k
perl-DBD-MySQL x86_64 4.023-6.el7 mariadb-server 140 k
perl-DBI x86_64 1.627-4.el7 mariadb-server 802 k
perl-Data-Dumper x86_64 2.145-3.el7 mariadb-server 47 k
perl-IO-Compress noarch 2.061-2.el7 mariadb-server 260 k
perl-Net-Daemon noarch 0.48-5.el7 mariadb-server 51 k
perl-PlRPC noarch 0.2020-14.el7 mariadb-server 36 k
Transaction Summary
===================================================================================
Install 2 Packages (+8 Dependent packages)
Total download size: 21 M
Installed size: 110 M
Is this ok [y/d/N]: y
Downloading packages:
Total 290 MB/s | 21 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : perl-Data-Dumper-2.145-3.el7.x86_64 1/10
Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 2/10
Installing : 1:mariadb-5.5.68-1.el7.x86_64 3/10
Installing : perl-Net-Daemon-0.48-5.el7.noarch 4/10
Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 5/10
Installing : perl-IO-Compress-2.061-2.el7.noarch 6/10
Installing : perl-PlRPC-0.2020-14.el7.noarch 7/10
Installing : perl-DBI-1.627-4.el7.x86_64 8/10
Installing : perl-DBD-MySQL-4.023-6.el7.x86_64 9/10
Installing : 1:mariadb-server-5.5.68-1.el7.x86_64 10/10
Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 1/10
Verifying : perl-Net-Daemon-0.48-5.el7.noarch 2/10
Verifying : perl-Data-Dumper-2.145-3.el7.x86_64 3/10
Verifying : 1:mariadb-server-5.5.68-1.el7.x86_64 4/10
Verifying : perl-DBD-MySQL-4.023-6.el7.x86_64 5/10
Verifying : 1:mariadb-5.5.68-1.el7.x86_64 6/10
Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 7/10
Verifying : perl-DBI-1.627-4.el7.x86_64 8/10
Verifying : perl-IO-Compress-2.061-2.el7.noarch 9/10
Verifying : perl-PlRPC-0.2020-14.el7.noarch 10/10
Installed:
mariadb.x86_64 1:5.5.68-1.el7 mariadb-server.x86_64 1:5.5.68-1.el7
Dependency Installed:
perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7
perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7
perl-DBD-MySQL.x86_64 0:4.023-6.el7
perl-DBI.x86_64 0:1.627-4.el7
perl-Data-Dumper.x86_64 0:2.145-3.el7
perl-IO-Compress.noarch 0:2.061-2.el7
perl-Net-Daemon.noarch 0:0.48-5.el7
perl-PlRPC.noarch 0:0.2020-14.el7
Complete!
#启动mysql服务
[root@Centos 7 /etc/yum.repos.d]# systemctl start mariadb.service
#查看mysql服务状态
[root@Centos 7 /etc/yum.repos.d]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: active (running) since Sat 2022-10-22 23:00:55 CST; 8s ago
Process: 4299 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 4216 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 4298 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─4298 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─4463 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --...
Oct 22 23:00:53 Centos 7 mariadb-prepare-db-dir[4216]: MySQL manual for more ins...
Oct 22 23:00:53 Centos 7 mariadb-prepare-db-dir[4216]: Please report any problem...
Oct 22 23:00:53 Centos 7 mariadb-prepare-db-dir[4216]: The latest information ab...
Oct 22 23:00:53 Centos 7 mariadb-prepare-db-dir[4216]: You can find additional i...
Oct 22 23:00:53 Centos 7 mariadb-prepare-db-dir[4216]: http://dev.mysql.com
Oct 22 23:00:53 Centos 7 mariadb-prepare-db-dir[4216]: Consider joining MariaDB'...
Oct 22 23:00:53 Centos 7 mariadb-prepare-db-dir[4216]: https://mariadb.org/get-i...
Oct 22 23:00:53 Centos 7 mysqld_safe[4298]: 221022 23:00:53 mysqld_safe Logging....
Oct 22 23:00:53 Centos 7 mysqld_safe[4298]: 221022 23:00:53 mysqld_safe Startin...l
Oct 22 23:00:55 Centos 7 systemd[1]: Started MariaDB database server.
Hint: Some lines were ellipsized, use -l to show in full.
#访问mysql服务
[root@Centos 7 /etc/yum.repos.d]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]> show databases; #查看数据库
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
————————————————
标签:x86,
光驱,
server,
perl,
镜像文件,
64,
mysql,
mariadb,
el7
From: https://blog.51cto.com/u_15793623/5798165