You are here
How to build your own RPM repository for MySQL Enterprise Server 5.7 on RHEL 7
Mon, 2016-10-24 23:01 — Shinguz
Prepare the RPM repository server
Install the software to create a RPM repository server (on an Ubuntu web server):
shell> sudo apt-get install createrepo
Create the directory structures and initialize the repositories:
shell> sudo mkdir -p /var/www/html/repos/centos/7/os/x86_64 shell> sudo createrepo /var/www/html/repos/centos/7/os/x86_64/
Copy the MySQL Enterprise RPM packages to the repository:
shell> sudo cd /var/www/html/repos/centos/7/os/x86_64/ shell> sudo unzip -v /download/V790254-01.zip # MySQL Enterprise Server 5.7.16 Archive: /download/V790254-01.zip Length Method Size Cmpr Date Time CRC-32 Name --------- ------ -------- ---- ---------- ----- -------- ---- 23979568 Stored 23979568 0% 2016-09-29 16:56 ae6693b1 mysql-commercial-client-5.7.16-1.1.el7.x86_64.rpm 45327096 Stored 45327096 0% 2016-09-29 16:56 bb83c965 mysql-commercial-embedded-5.7.16-1.1.el7.x86_64.rpm 271300 Stored 271300 0% 2016-09-29 16:56 b4eebc96 mysql-commercial-common-5.7.16-1.1.el7.x86_64.rpm 2041404 Stored 2041404 0% 2016-09-29 16:57 cfc63d84 mysql-commercial-libs-compat-5.7.16-1.1.el7.x86_64.rpm 23747244 Stored 23747244 0% 2016-09-29 16:56 7b4d36fa mysql-commercial-embedded-compat-5.7.16-1.1.el7.x86_64.rpm 3644756 Stored 3644756 0% 2016-09-29 16:56 613af6a3 mysql-commercial-devel-5.7.16-1.1.el7.x86_64.rpm 170697184 Stored 170697184 0% 2016-09-29 16:57 ce26e84a mysql-commercial-server-5.7.16-1.1.el7.x86_64.rpm 116778644 Stored 116778644 0% 2016-09-29 16:58 8ca7f0f0 mysql-commercial-test-5.7.16-1.1.el7.x86_64.rpm 125679224 Stored 125679224 0% 2016-09-29 16:57 e74a416d mysql-commercial-embedded-devel-5.7.16-1.1.el7.x86_64.rpm 2172140 Stored 2172140 0% 2016-09-29 16:57 e2a1c2f9 mysql-commercial-libs-5.7.16-1.1.el7.x86_64.rpm 3018 Stored 3018 0% 2016-10-11 13:00 6d6efc1e README.txt --------- --------- ---- ------- 514341578 514341578 0% 11 files
Update the RPM repository metadata:
shell> sudo createrepo --update /var/www/html/repos/centos/7/os/x86_64/
Now the RPM repository server is finished.
Prepare the RPM client
Create the MySQL Enterprise Server repository file for the client. The IP address represents the IP address of your RPM repository server:
# # /etc/yum.repos.d/mysql-enterprise.repo # [mysql57-enterprise] name=MySQL 5.7 Enterprise Server baseurl=http://192.168.56.1/repos/centos/$releasever/os/$basearch/ gpgcheck=1 enabled=1 gpgkey=http://192.168.56.1/repos/centos/RPM-GPG-KEY-CentOS-7
Clean up the yum cache:
shell> yum clean all Loaded plugins: fastestmirror Cleaning repos: base extras mysql57-enterprise updates Cleaning up everything
Show all know RPM repositories:
shell> yum repolist Loaded plugins: fastestmirror base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 mysql57-enterprise | 2.9 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/5): mysql57-enterprise/7/x86_64/primary_db | 12 kB 00:00:00 (2/5): base/7/x86_64/group_gz | 155 kB 00:00:00 (3/5): extras/7/x86_64/primary_db | 166 kB 00:00:00 (4/5): base/7/x86_64/primary_db | 5.3 MB 00:00:06 (5/5): updates/7/x86_64/primary_db | 8.4 MB 00:00:11 Determining fastest mirrors * base: mirror.imt-systems.com * extras: mirror.eu.oneandone.net * updates: mirror.rackspeed.de repo id repo name status base/7/x86_64 CentOS-7 - Base 9'007 extras/7/x86_64 CentOS-7 - Extras 393 mysql57-enterprise/7/x86_64 MySQL 5.7 Enterprise Server 10 updates/7/x86_64 CentOS-7 - Updates 2'548 repolist: 11'958
Search what MySQL Enterprise Server packages are available:
shell> yum search mysql-commercial Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.imt-systems.com * extras: mirror.eu.oneandone.net * updates: mirror.rackspeed.de ============================================================================= N/S matched: mysql-commercial ============================================================================== mysql-commercial-client.x86_64 : MySQL database client applications and tools mysql-commercial-common.x86_64 : MySQL database common files for server and client libs mysql-commercial-devel.x86_64 : Development header files and libraries for MySQL database client applications mysql-commercial-embedded.x86_64 : MySQL embedded library mysql-commercial-embedded-compat.x86_64 : MySQL embedded compat library mysql-commercial-embedded-devel.x86_64 : Development header files and libraries for MySQL as an embeddable library mysql-commercial-libs.x86_64 : Shared libraries for MySQL database client applications mysql-commercial-libs-compat.x86_64 : Shared compat libraries for MySQL 5.6.31 database client applications mysql-commercial-server.x86_64 : A very fast and reliable SQL database server mysql-commercial-test.x86_64 : Test suite for the MySQL database server Name and summary matches only, use "search all" for everything.
Now you are ready to install your MySQL Enterprise Server RPM packages:
shell> yum install mysql-commercial-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.imt-systems.com * extras: mirror.eu.oneandone.net * updates: mirror.rackspeed.de Resolving Dependencies --> Running transaction check ---> Package mysql-commercial-server.x86_64 0:5.7.16-1.1.el7 will be installed --> Processing Dependency: mysql-commercial-client(x86-64) >= 5.7.9 for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: /usr/bin/perl for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: perl(strict) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: net-tools for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: mysql-commercial-server-5.7.16-1.1.el7.x86_64 --> Running transaction check ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed ---> Package mysql-commercial-client.x86_64 0:5.7.16-1.1.el7 will be installed ---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed ---> Package perl.x86_64 4:5.16.3-286.el7 will be installed --> Processing Dependency: perl-libs = 4:5.16.3-286.el7 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-macros for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl-libs for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-286.el7.x86_64 --> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-286.el7.x86_64 ---> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed --> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch --> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch --> Running transaction check ---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed ---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed ---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed ---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed ---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed ---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed ---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed --> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch --> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch ---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed --> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch --> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch ---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed ---> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed ---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed ---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed ---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed ---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed ---> Package perl-constant.noarch 0:1.27-2.el7 will be installed ---> Package perl-libs.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-macros.x86_64 4:5.16.3-286.el7 will be installed ---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed ---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed --> Running transaction check ---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed ---> Package perl-Pod-Escapes.noarch 1:1.04-286.el7 will be installed ---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed --> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch --> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch ---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed --> Running transaction check ---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed ---> Package perl-parent.noarch 1:0.225-244.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================== Installing: mysql-commercial-server x86_64 5.7.16-1.1.el7 mysql57-enterprise 163 M Installing for dependencies: libaio x86_64 0.3.109-13.el7 base 24 k mysql-commercial-client x86_64 5.7.16-1.1.el7 mysql57-enterprise 23 M net-tools x86_64 2.0-0.17.20131004git.el7 base 304 k perl x86_64 4:5.16.3-286.el7 base 8.0 M perl-Carp noarch 1.26-244.el7 base 19 k perl-Encode x86_64 2.51-7.el7 base 1.5 M perl-Exporter noarch 5.68-3.el7 base 28 k perl-File-Path noarch 2.09-2.el7 base 26 k perl-File-Temp noarch 0.23.01-3.el7 base 56 k perl-Filter x86_64 1.49-3.el7 base 76 k perl-Getopt-Long noarch 2.40-2.el7 base 56 k perl-HTTP-Tiny noarch 0.033-3.el7 base 38 k perl-PathTools x86_64 3.40-5.el7 base 82 k perl-Pod-Escapes noarch 1:1.04-286.el7 base 50 k perl-Pod-Perldoc noarch 3.20-4.el7 base 87 k perl-Pod-Simple noarch 1:3.28-4.el7 base 216 k perl-Pod-Usage noarch 1.63-3.el7 base 27 k perl-Scalar-List-Utils x86_64 1.27-248.el7 base 36 k perl-Socket x86_64 2.010-3.el7 base 49 k perl-Storable x86_64 2.45-3.el7 base 77 k perl-Text-ParseWords noarch 3.29-4.el7 base 14 k perl-Time-HiRes x86_64 4:1.9725-3.el7 base 45 k perl-Time-Local noarch 1.2300-2.el7 base 24 k perl-constant noarch 1.27-2.el7 base 19 k perl-libs x86_64 4:5.16.3-286.el7 base 687 k perl-macros x86_64 4:5.16.3-286.el7 base 43 k perl-parent noarch 1:0.225-244.el7 base 12 k perl-podlators noarch 2.5.1-3.el7 base 112 k perl-threads x86_64 1.87-4.el7 base 49 k perl-threads-shared x86_64 1.43-6.el7 base 39 k Transaction Summary ========================================================================================================================================================================================== Install 1 Package (+30 Dependent packages) Total download size: 197 M Installed size: 852 M Is this ok [y/d/N]: y
Further sources of information:
Taxonomy upgrade extras:
- Shinguz's blog
- Log in or register to post comments