# MySQL "offline" installation

**URL:** <https://forums.percona.com/t/mysql-offline-installation/9064>\
**Category:** Other MySQL® Questions\
**Created:** [February 2, 2021, 8:17pm UTC](https://forums.percona.com/t/mysql-offline-installation/9064 "2021-02-02T20:17:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sulimo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sulimo/32/2538_2.png) [@sulimo](https://forums.percona.com/u/sulimo)\
**Post date:** [February 2, 2021, 8:17pm UTC](https://forums.percona.com/t/mysql-offline-installation/9064/1 "2021-02-02T20:17:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [February 2, 2021, 10:03pm UTC](https://forums.percona.com/t/mysql-offline-installation/9064/2 "2021-02-02T22:03:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 2, 2021, 10:28pm UTC](https://forums.percona.com/t/mysql-offline-installation/9064/3 "2021-02-02T22:28:18Z")

</div>

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](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](https://www.percona.com/downloads/Percona-Server-LATEST/Percona-Server-8.0.22-13/)

---

<div class="post-metadata">

**Author:** ![sulimo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sulimo/32/2538_2.png) [@sulimo](https://forums.percona.com/u/sulimo)\
**Post date:** [February 2, 2021, 10:36pm UTC](https://forums.percona.com/t/mysql-offline-installation/9064/4 "2021-02-02T22:36:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 2, 2021, 10:49pm UTC](https://forums.percona.com/t/mysql-offline-installation/9064/5 "2021-02-02T22:49:24Z")

</div>

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

> **[Using Percona rsync repositories to set up the local CentOS mirror](https://www.percona.com/blog/2014/02/14/using-percona-rsync-repositories-set-local-centos-mirror/)**
>
> Percona rsync repositories are available, you can use it to set up the local CentOS mirror. Hrvoje Matijakovic with more in today's MySQL Performance Blog.

---

<div class="post-metadata">

**Author:** ![sulimo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sulimo/32/2538_2.png) [@sulimo](https://forums.percona.com/u/sulimo)\
**Post date:** [February 3, 2021, 11:44am UTC](https://forums.percona.com/t/mysql-offline-installation/9064/6 "2021-02-03T11:44:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sulimo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sulimo/32/2538_2.png) [@sulimo](https://forums.percona.com/u/sulimo)\
**Post date:** [February 3, 2021, 11:47am UTC](https://forums.percona.com/t/mysql-offline-installation/9064/7 "2021-02-03T11:47:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 3, 2021, 2:39pm UTC](https://forums.percona.com/t/mysql-offline-installation/9064/8 "2021-02-03T14:39:05Z")

</div>

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

> **[Restricting a Package to a Fixed Version Number with yum - Red Hat Customer...](https://access.redhat.com/solutions/98873)**
>
> Lock a package to a specific version only, and no later Exclude a package from $ yum update What is yum versionlock?

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 3, 2021, 2:39pm UTC](https://forums.percona.com/t/mysql-offline-installation/9064/9 "2021-02-03T14:39:30Z")

</div>

Understood @sulimo - good luck with your project!
