MySQL "offline" installation

Hello Forum,

Have a quick question, if you please

I’m documenting how to perform a custom MySQL install from scratch and I aiming for an “offline” installation using yum. So the intention is to download the rpm files for the community sever and then call yum to install the server, without actually having to configure the any repository repository or having to connect to it.

So I’m basically following the documentation and downloading:

mysql-community-common
mysql-community-libs
mysql-community-server
mysql-community-client
mysql-community-libs-compat

Which would give me a standard MySQL Installation.

Since I’m using RHEL8, I would then:

shell> sudo yum disable mysql
and then
shell> sudo yum install mysql-community-{server,client,common,libs}-*

And that would be it… It seems to do the job…

Would that be the right approach? What are you guys doing for “offline” installations?

Cheers,
J

2 Likes

That appears to be correct, though there might be some other dependencies which are commonly available in the main OS repo. I would use rpm -Uvh to install the packages locally, which would prevent any external fetch. You can also install the ‘download-only’ tool for yum, then tell it to install mysql. It will download the RPMs but not install. Then you can take a look at all the packages it needs.

2 Likes

Hi @sulimo , thanks for posting this question! Just to add to what @matthewb wrote, if you’re interested in using Percona Server for MySQL (drop-in binary compatible with MySQL Community) you can download a single tar package that contains all related Percona Server packages. For example this is the link for our Percona Server for MySQL 8.0.22 release for CentOS 8: https://downloads.percona.com/downloads/Percona-Server-LATEST/Percona-Server-8.0.22-13/binary/redhat/8/x86_64/Percona-Server-8.0.22-13-r6f7822f-el8-x86_64-bundle.tar
If you need a different version of CentOS, or need deb-based or sources, you can use the more generic link to then drill down: Download Percona Server for MySQL 8.0

1 Like

Thanks Matt!

Indeed. So yum prompts for some dependencies, but since the host is already connected to the Red Hat repository, it would download them from RedHat. Would that create any conflict in that yum is pulling rpms needed to resolve those dependencies from RedHat?

The reason why we want to do it offline is to be able to pick whichever version we have and place it in our depot, from where we would then deploy to other on-prem servers. But having redhat resolve missing dependencies can be advantageous. Alternatively we will have to download all those RPMs instead, which may be different on every version.

I like the ‘download-only’ tool for yum that you mentioned, as we could deploy that on out satellite server/depo and then have yum download without install. Then we push them to the DB server and do an rpm -Uvh. But for that, I will have to check with the Unix team to make sure this does not meddle around with the default yum configuration they already have with Redhat

Cheers,
J

2 Likes

Hi @sulimo
Have you considered simply cloning the Percona Repo and then your database servers can download and resolve dependencies via yum?

1 Like

Thanks Michael,

We are trying not to set up any repositories other than the RedHat we already have. But I will consider this as well.

Cheers,
J

2 Likes

Thanks Michael,

As requested by the project owner, it has to be the Community server.
We are considering Percona backup, among others, for both Mysql and Postgres

Cheers,
J

2 Likes

Hi @sulimo
You may want to explore how yum versionlock can restrict your deployed versions from being automatically upgraded.

1 Like

Understood @sulimo - good luck with your project!

1 Like