1. Home
  2. Docs
  3. ClusterControl
  4. Installation
  5. Offline Installation

Offline Installation

ClusterControl provides a script to install and configure ClusterControl packages in an Internetless environment, available at this URL.

Take note that the following ClusterControl features will not work without an Internet connection:

  • Backup → Create/Schedule Backup → Upload to Cloud – requires a connection to cloud providers.
  • Integrations → Cloud Providers – requires a connection to cloud providers.
  • Manage → Load Balancer – requires a connection to EPEL, ProxySQL, HAProxy, MariaDB repository.
  • Manage → Upgrades – requires a connection to the provider’s repository.
  • Deploy Database Cluster – requires a connection to the database provider’s repository.

Prior to the offline install, make sure you meet the following requirements for the ClusterControl node:

  • Ensure the offline repository is ready. We assume that you already configured an offline repository. Details on how to set up an offline repository are explained in the Setting up Offline Repository section.
  • Firewall, SELinux or AppArmor must be turned off. You can turn on the firewall once the installation has completed. Make sure to allow ports as defined in Firewall and Security Groups.
  • MySQL server must be installed and running on the ClusterControl host.

Setting up Offline Repository

The installer script requires an offline repository to satisfy the dependencies. In this documentation, we provide steps to configure offline repository on CentOS/AlmaLinux/RockyLinux 8 & 9  and Ubuntu 20.04 & 22.04 LTS. It’s necessary to have a temporary internet access to download all the packages in the Repository Server.

CentOS/AlmaLinux/RockyLinuxUbuntu 16.04

1. Setup the webserver on the repo server to serve up packages to the yum package manager remotely:

$ dnf install -y nginx
$ systemctl start nginx
$ systemctl enable nginx
$ systemctl status nginx

2. Setup software required for repository server

$ dnf install -y createrepo yum-utils wget
$ dnf install -y epel-release

3. Create directory for repo packages:

$ mkdir -p /usr/share/nginx/html/repos

4. Configure the nginx in the Repository Server:

$ sudo vi /etc/nginx/conf.d/repos.conf
 server {
        listen   80;
        server_name  repo-server;
        root   /usr/share/nginx/html/repos;
    index index.html; 
    location / {
                autoindex on;
        }
}

5. Configure hostname repo-server in the /etc/hosts on the Repository Server.
6. Restart the nginx service:

$ systemctl restart nginx
$ chcon -Rt httpd_sys_content_t /usr/share/nginx/html/repos

7. Perform repository syncing with appropriate repositories (the following commands will consume time to finish):

$  dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=baseos --newest-only --download-metadata
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=appstream--newest-only --download-metadata
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=extras --newest-only --download-metadata
-- For AlmaLinux/RockyLinux/CentOS 9 (CodeReadyBuilder)
$ dnf config-manager set-enabled crb
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=crb--newest-only --download-metadata 
-- For AlmaLinux/RockyLinux/CentOS 8 (Powertools)
$ dnf config-manager set-enabled powertools
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=powertools--newest-only --download-metadata

8. Adding Severalnines Repository to the Repo Server.

Import the public key:

$ rpm --import http://repo.severalnines.com/severalnines-repos.asc

Download the s9s-repo fom the Severalnines Repository

$ wget http://www.severalnines.com/downloads/cmon/s9s-repo.repo -P /etc/yum.repos.d/

Edit the s9s-repo.repo and add s9s-tools repo to the existing repo file with the following content:

[s9s-tools]
name=s9s-tools (RHEL_8)
type=rpm-md
baseurl=http://repo.severalnines.com/s9s-tools/{os_codename}
gpgcheck=1
gpgkey=http://repo.severalnines.com/s9s-tools/{os_codename}/repodata/repomd.xml.key
enabled=1
Note

Replace {os_codename} based on the list of Operating System code below: RHEL_7,RHEL_8,RHEL_9,CentOS_7,CentOS_8,CentOS_9.

Perform repository syncing of Severalnines:

$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=s9s-repo --newest-only --download-metadata
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=s9s-tools --newest-only --download-metadata

9. Adding PostgreSQL Repository to the Repo Server.

Download the PostgreSQL release package:

$ dnf install https://download.postgresql.org/pub/repos/yum/reporpms/{os_code}-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Note

Replace the {os_code} for each version of Operating System; EL-7, EL-8, EL-9.

Clear the repository cache and list out the repositories, make sure the newly added PostgreSQL repository is in the list:

$ dnf clean all
$ dnf repolist

Perform repository syncing of PostgreSQL:

$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg-common --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg16 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg15 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg14 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg13 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg12 --newest-only --download-metadata

10. Adding MongoDB Repository to the Repo Server.

The package name of the MongoDB server as seen in the yum command is dnf install mongodb-org. Therefore, the /etc/yum.repos.d/mongodb-org.repo can only have one entry pointing to the appropriate version of MongoDB (one and only one of either 4.4, 5.0or 6.0).

Create a repo file located at /etc/yum.repos.d/mongodb-org.repo and make sure it has the following lines (the example shows we activate MongoDB 6.0):

# cat mongodb-org.repo 
[mongodb-org-6.0-latest]
name=MongoDB lastest 6.0 Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/6.0/x86_64/
gpgcheck=0
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc
 
#[mongodb-org-5.0]
#name=MongoDB Repository
#baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/5.0/x86_64/
#gpgcheck=1
#enabled=1
#gpgkey=https://www.mongodb.org/static/pgp/server-5.0.asc
Note

Disable GPGkey checking if you don’t have an internet connection. Furthermore, only one version (i.e., either 6.0, 5.0, 4.4) can be supported at any given time. The reason is, that all the versions are called “mongodb-org”.

Clear the repository cache and list out the repositories, make sure the newly added MongoDB repository is in the list:

$ dnf clean all
$ dnf repolist

Perform repository syncing of MongoDB:

$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mongodb-org-6.0-latest --newest-only --download-metadata

11. Adding Percona MongoDB Repository to the Repo Server.

The package name of the Percona MongoDB server as seen in the yum command is dnf install percona-server-mongodb. Therefore, the /etc/yum.repos.d/percona-mongodb-org.repo can only have one entry pointing to the appropriate version of MongoDB (one and only one of either 4.4, 5.0 or 6.0).
Create a repo file located at /etc/yum.repos.d/percona-mongodb.repo and make sure it has the following lines (the example shows we activate Percona MongoDB 6.0):

[psmdb-60-release-x86_64]
name = Percona Server for MongoDB 6.0 release/x86_64 YUM repository
baseurl = http://repo.percona.com/psmdb-60/yum/release/$releasever/RPMS/x86_64
enabled = 1
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
 
[psmdb-60-release-noarch]
name = Percona Server for MongoDB 6.0 release/noarch YUM repository
baseurl = http://repo.percona.com/psmdb-50/yum/release/$releasever/RPMS/noarch
enabled = 1
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
 
[psmdb-60-release-sources]
name = Percona Server for MongoDB 6.0 release/sources YUM repository
baseurl = http://repo.percona.com/psmdb-60/yum/release/$releasever/SRPMS
enabled = 0
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
 
[tools-release-x86_64]
name = Percona Tools release/x86_64 YUM repository
baseurl = http://repo.percona.com/tools/yum/release/$releasever/RPMS/x86_64
enabled = 1
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
 
[tools-release-noarch]
name = Percona Tools release/noarch YUM repository
baseurl = http://repo.percona.com/tools/yum/release/$releasever/RPMS/noarch
enabled = 1
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
 
[tools-release-sources]
name = Percona Tools release/sources YUM repository
baseurl = http://repo.percona.com/tools/yum/release/$releasever/SRPMS
enabled = 0
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
Note

Disable GPGkey checking if you don’t have an internet connection. Furthermore, only one version (i.e., either 6.0, 5.0, 4.4) can be supported at any given time. The reason is, that all the versions are called “percona-mongodb-org”.

Clear the repository cache and list out the repositories, make sure the newly added Percona MongoDB repository is in the list:

$ dnf clean all
$ dnf repolist

Perform repository syncing of Percona MongoDB:

$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=psmdb-60-release-x86_64 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=tools-release-x86_64 --newest-only --download-metadata

12. Adding Oracle MySQL Repository to the Repo Server.

Download the appropriate Oracle MySQL community release package

$ dnf install https://dev.mysql.com/get/mysql84-community-release-{os_code}-1.noarch.rpm 
Note

Replace the {os_code} for each verion of Operating System; el7, el8, el9.

Clear the repository cache and list out the repositories, make sure the newly added MySQL 8 repository is in the list:

$ dnf clean all
$ dnf repolist

Perform repository syncing of Oracle MySQL:

$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mysql80-community --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mysql-connectors-community --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mysql-tools-community --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mysql-cluster-8.0-community --newest-only --download-metadata

13. Adding Percona MySQL Repository to the Repo Server.

Download the appropriate Percona MySQL release package

$ dnf install https://repo.percona.com/yum/percona-release-latest.noarch.rpm

Enable the Percona Server for MSQL 8.0 (the latest version at the time of this writing):

$ percona-release setup ps80

Clear the repository cache and list out the repositories, make sure the newly added Percona Server repository is in the list:

$ dnf clean all
$ dnf repolist

Perform repository syncing of Percona MySQL:

$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=ps-80-release-x86_64 --newest-only --download-metadata

14. Adding MariaDB Repository to the Repo Server.

Install the MariaDB repository by using the following script:

$ curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash

Clear the repository cache and list out the repositories, make sure the newly added MariaDB repository is in the list:

$ dnf clean all
$ dnf repolist

Perform repository syncing of MariaDB:

$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mariadb-main --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mariadb-maxscale --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mariadb-tools --newest-only --download-metadata

15. Creating Repository

$ createrepo /usr/share/nginx/html/repos/

1. Insert Ubuntu 16.04 installation disc into the DVD drive.

2. Mount the disk as /media/cdrom:

$ sudo mkdir /media/cdrom
$ sudo mount /dev/cdrom /media/cdrom/

3. Uncomment the following line (the first line) inside /etc/apt/sources.list and comment on the other lines:

deb cdrom:[Ubuntu-Server 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.8)]/ xenial main restricted

4. Retrieve the new list of packages:

$ sudo apt-get update

Make sure the last step does not produce any errors.

Performing Offline Installation

Red Hat/CentOSDebian/Ubuntu

1. The offline installation script will need a running MySQL server on the host. Install MySQL server and client, enable it to start on boot and start the service:

$ yum install -y mariadb mariadb-server
$ systemctl enable mariadb
$ systemctl start mariadb

2. Configure MySQL root password for the newly installed MySQL server:

$ mysqladmin -uroot password yourR00tP4ssw0rd

3. Create the staging directory called s9s_tmp and download the latest version of ClusterControl related RPM packages from the Severalnines download site and Severalnines Repository. There are a number of packages you need to download as explained below:

4. Perform the package installation manually:

$ yum localinstall clustercontro*
$ yum localinstall s9s-tools*

5. Execute the post-installation script to configure ClusterControl components and follow the installation wizard accordingly:

$ /var/www/html/clustercontrol/app/tools/setup-cc.sh

6. Open the browser and navigate to https://ClusterControl_host/clustercontrol. Setup the super admin account by specifying a valid email address and password on the welcome page.

Note

You would see this error: “Sorry we are not able to retrieve your license information. Please register your license under Settings – Subscription”. This is expected because the demo license is automatically retrieved from our license server automatically via the Internet. Please contact our Sales or Support team to get a free 30-day demo license. Otherwise, you will be running ClusterControl as a community edition.

1. Install MySQL on the host and enable it on boot:

$ sudo apt-get install -y --force-yes mysql-client mysql-server
$ sudo systemctl enable mysql

2. Create the staging directory called s9s_tmp and download the latest version of ClusterControl related DEB packages from the Severalnines download site and Severalnines Repository. There are a number of packages you need to download as explained below:

3. Perform the package installation and ClusterControl dependencies manually:

$ sudo apt-get -f install ntp gnuplot
$ sudo dpkg -i clustercontrol*.deb
$ sudo dpkg -i libs9s0*.deb
$ sudo dpkg -i s9s-tools*.deb

4. Execute the post-installation script to configure ClusterControl components and follow the installation wizard accordingly:

$ sudo /var/www/clustercontrol/app/tools/setup-cc.sh

5. Open the browser and navigate to https://ClusterControl_host/clustercontrol. Setup the super admin account by specifying a valid email address and password on the welcome page.

Note
You would see this error: “Sorry we are not able to retrieve your license information. Please register your license under Settings – Subscription”. This is expected because ClusterControl was trying to pull and configure a demo license from the license server via the Internet. Please contact our Sales or Support team for a free 30-day demo license.

Post-installation

Once ClusterControl is up and running, you can import your existing cluster or deploy a new database cluster and start managing them from one place. Make sure passwordless SSH is configured from the ClusterControl node to your database nodes.

1. Generate an SSH key on the ClusterControl node:

$ ssh-keygen -t rsa # press Enter on all prompts

2. Setup passwordless SSH to ClusterControl and database nodes:

$ ssh-copy-id -i ~/.ssh/id_rsa {os_user}@{IP address/hostname}

Repeat step 2 for all database hosts that you are going to manage (including the ClusterControl node itself).

Was this article helpful to you? Yes No