Offline Installation
ClusterControl can be installed without any kind of internet access. In this section we are presenting two ways to install it, one that does not require any internet connectivity at all and second, that is easier to perform but it requires temporary network access to prepare an offline repository server with all packages required by ClusterControl.
Offline Installation Without Internet Access
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 for this guide. The details on how to set up an offline repository are explained in the next section.
- Firewall, SElinux, or AppArmor must be turned off. You can turn on the firewall once the installation has been completed. Make sure to allow ports as defined on this page.
- HTTPD/Apache and MySQL databases must be installed on the ClusterControl host.
Setting up Offline Repository
In this documentation, we provide steps to configure offline repository on CentOS/AlmaLinux/RockyLinux 8 & 9 and Ubuntu 20.04 & 22.04 LTS. The offline repository is configured in the ClusterControl host and it’s required to have an DVD iso file for the Operating System to mount all the packages into the ClusterControl host.
- Insert the DVD installation disc into the DVD drive.
-
Mount the DVD installation disc into the default media location. In this case we use RockyLinux 8 and the media at
/media/Rocky
: -
Disable the default repository by adding enabled=0 to “base”, “updates” and “extras” directives. You should have something like this inside
/etc/yum.repos.d/Rocky-BaseOS.repo
:# Rocky-BaseOS.repo # # The mirrorlist system uses the connecting IP address of the client and the # update status of each mirror to pick current mirrors that are geographically # close to the client. You should use this for Rocky updates unless you are # manually picking other mirrors. # # If the mirrorlist does not work for you, you can try the commented out # baseurl line instead. [baseos] name=Rocky Linux $releasever - BaseOS mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever #baseurl=http://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/os/ gpgcheck=1 enabled=1 countme=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
-
Update the “enabled” value under the
media-baseos
andmedia-appstream
directive in/etc/yum.repos.d/Rocky-Media.repo
, as shown below:# Rocky-Media.repo # # You can use this repo to install items directly off the installation media. # Verify your mount point matches one of the below file:// paths. [media-baseos] name=Rocky Linux $releasever - Media - BaseOS baseurl=file:///media/Rocky/BaseOS file:///media/cdrom/BaseOS file:///media/cdrecorder/BaseOS gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial [media-appstream] name=Rocky Linux $releasever - Media - AppStream baseurl=file:///media/Rocky/AppStream file:///media/cdrom/AppStream file:///media/cdrecorder/AppStream gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
-
Get the list of available packages:
-
Download the ISO images from the respective vendor site and upload them onto the ClusterControl host. You should have something like this on Debian
debian-12.7.0-amd64-DVD-1.iso
. -
Create mount points and mount each of the ISO images accordingly:
-
Add the following lines into /etc/apt/sources.list and comment other lines:
-
Retrieve the new list of packages:
Performing Offline Installation
-
Disable SElinux and open required ports (or stop iptables):
-
Install required packages via package manager:
# Rocky/RHEL/CentOS 9 $ yum -y install wget dmidecode python3 jq mariadb mariadb-server httpd mod_ssl # Rocky/RHEL/CentOS 8 $ yum -y install wget dmidecode hostname python36 mariadb mariadb-server httpd mod_ssl $ alternatives --set python /usr/bin/python3 # Rocky/RHEL/CentOS 7 $ yum -y install wget dmidecode python jq mariadb mariadb-server httpd mod_ssl # Rocky/RHEL/CentOS 6 $ yum -y install wget dmidecode python jq mariadb mariadb-server httpd mod_ssl
-
Install EPEL packages:
-
Create the staging directory and download the latest version of the ClusterControl RPM package from the Severalnines download page. The latest stable version is listed on this page.
$ wget https://severalnines.com/downloads/cmon/clustercontrol2-2.2.5-1647.x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-controller-dbg-2.2.0-10707-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-controller-2.2.0-10707-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-proxy-2.2.5-49-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-clud-2.2.5-413-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-cloud-2.2.5-413-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-ssh-2.2.5-201-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-notifications-2.2.5-360-x86_64.rpm $ wget https://repo.severalnines.com/s9s-tools/CentOS_8/x86_64/s9s-tools-1.9-30.1.x86_64.rpm
If the ClusterControl server has no internet connection, please download/upload the above files manually to the server.
-
Perform the package installation manually:
-
Start the MySQL server (MariaDB for RHEL 7/8 or CentOS 7/8), enable it on boot, and set a MySQL root password:
-
Create the
cmon
user and grant thecmon
user:$ mysql -uroot -p -e 'GRANT ALL PRIVILEGES ON *.* TO "cmon"@"localhost" IDENTIFIED BY "{cmonpassword}" WITH GRANT OPTION' $ mysql -uroot -p -e 'GRANT ALL PRIVILEGES ON *.* TO "cmon"@"127.0.0.1" IDENTIFIED BY "{cmonpassword}" WITH GRANT OPTION' $ mysql -uroot -p -e 'GRANT ALL PRIVILEGES ON *.* TO "cmon"@"{controller_ip_address}" IDENTIFIED BY "{cmonpassword}" WITH GRANT OPTION' $ mysql -uroot -p -e 'FLUSH PRIVILEGES'
-
Generate a ClusterControl key to be used by
RPC_TOKEN
: -
Initialize the
cmon
service by running the below command:$ cmon --init \ --mysql-hostname="127.0.0.1" \ --mysql-port="3306" \ --mysql-username="cmon" \ --mysql-password="{cmonpassword}" \ --mysql-database="cmon" \ --hostname="{ClusterControl Primary IP Address}" \ --rpc-token="{ClusterControl API key as generated above}" \ --controller-id="clustercontrol"
Note
The value of the
hostname
must be either a valid FQDN or IP address of the ClusterControl node. If the host has multiple IP addresses, pick the primary IP address of the host. The cmon user password taken from previous step when creating the user. -
ClusterControl event and cloud modules require their service definition inside
/etc/default/cmon
. Create the file and add the following lines: -
Create a temporary directory SSL and certificate:
-
Generate self-signed certificates:
$ openssl genrsa -out /tmp/ssl/server.key 2048 $ openssl req -new -key /tmp/ssl/server.key -out /tmp/ssl/server.csr \ -addext "subjectAltName = DNS:dev.severalnines.local" \ -subj "/C=SE/ST=Stockholm/L=Stockholm/O='Severalnines AB'/OU=Severalnines/CN=*.severalnines.local/[email protected]" $ openssl x509 -req -extfile /tmp/ssl/v3.ext -days 1825 -sha256 -in /tmp/ssl/server.csr -signkey /tmp/ssl/server.key -out /tmp/ssl/server.crt
-
Copy the certificate into default ClusterControl default directory:
-
Configure header origin in the
/etc/httpd/conf.d/security.conf
: -
Copy the Apache configuration file
cc-frontend.conf
from/usr/share/cmon/apache/
to/etc/httpd/conf.d/cc-frontend.conf
: -
Replace the default URL with the correct
hostname
:$ sed -i "s|https://cc2.severalnines.local:9443.*|https://{controller_ip_address}\/|g" /etc/httpd/conf.d/cc-frontend.conf $ sed -i "s|Listen 9443|#Listen 443|g" /etc/httpd/conf.d/cc-frontend.conf $ sed -i "s|9443|443|g" /etc/httpd/conf.d/cc-frontend.conf
Note
Replace
{controller_ip_address}
with valid FQDN or IP address of the ClusterControl node. -
Enable ClusterControl and Apache daemons on boot and start them:
For Sysvinit:
$ chkconfig --levels 235 cmon on $ chkconfig --levels 235 cmon-ssh on $ chkconfig --levels 235 cmon-events on $ chkconfig --levels 235 cmon-cloud on $ chkconfig --levels 235 httpd on $ service cmon start $ service cmon-ssh start $ service cmon-events start $ service cmon-cloud start $ service httpd start
For Systemd:
-
Create
ccsetup
user for registration new account:$ export S9S_USER_CONFIG=/tmp/ccsetup.conf $ s9s user --create --new-password=admin --group=admins --email-address="{your_email_address}" --controller="https://localhost:9501" ccsetup $ unset S9S_USER_CONFIG
Note
The email
{your_email_address}
is used to register a new account. -
Open the browser and navigate to
https://ClusterControl_host/
. 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.
The following steps should be performed on the ClusterControl node unless specified otherwise. Ensure you have the Severalnines repository and ClusterControl UI installed. Please refer to the Severalnines Repository section for details. Omit sudo if you are installing as the root user. Take note that for Ubuntu 12.04/Debian 7 and earlier, replace all occurrences of /var/www/html
with /var/www
in the following instructions.
-
If you have AppArmor running, disable it and open the required ports (or stop iptables):
-
Install ClusterControl dependencies:
-
Create the staging directory and download the latest version of the ClusterControl DEB package from the Severalnines download page. The latest stable version is listed on this page.
$ wget https://severalnines.com/downloads/cmon/clustercontrol2_2.2.5-1647_amd64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-controller-dbg-2.2.0-10707-x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-controller-2.2.0-10707-x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-proxy_2.2.5-49_x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-clud_2.2.5-413_x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-cloud_2.2.5-413_x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-ssh_2.2.5-201_x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-notifications_2.2.5-360_x86_64.deb $ wget https://repo.severalnines.com/s9s-tools/bookworm/amd64/s9s-tools_1.9.2024100217-release1_amd64.deb
If the ClusterControl server has no internet connection, please download/upload the above files manually to the server.
-
Install the ClusterControl controller package:
$ sudo apt-get install -y clustercontrol2_2.2.5-1647_amd64.deb clustercontrol-controller-dbg-2.2.0-10707-x86_64.deb clustercontrol-controller-dbg-2.2.0-10707-x86_64.deb clustercontrol-controller-dbg-2.2.0-10707-x86_64.deb clustercontrol-clud_2.2.5-413_x86_64.deb clustercontrol-cloud_2.2.5-413_x86_64.deb clustercontrol-ssh_2.2.5-201_x86_64.deb clustercontrol-notifications_2.2.5-360_x86_64.deb s9s-tools_1.9.2024100217-release1_amd64.deb
-
Start MySQL server, enable it on boot and set a MySQL root password:
-
Create the
cmon
user and grant the cmon user:$ mysql -uroot -p -e 'GRANT ALL PRIVILEGES ON *.* TO "cmon"@"localhost" IDENTIFIED BY "{cmonpassword}" WITH GRANT OPTION' $ mysql -uroot -p -e 'GRANT ALL PRIVILEGES ON *.* TO "cmon"@"127.0.0.1" IDENTIFIED BY "{cmonpassword}" WITH GRANT OPTION' $ mysql -uroot -p -e 'GRANT ALL PRIVILEGES ON *.* TO "cmon"@"{controller_ip_address}" IDENTIFIED BY "{cmonpassword}" WITH GRANT OPTION' $ mysql -uroot -p -e 'FLUSH PRIVILEGES'
-
Generate a ClusterControl key to be used by
RPC_TOKEN
: -
Initialize the cmon service by running below command:
$ cmon --init \ --mysql-hostname="127.0.0.1" \ --mysql-port="3306" \ --mysql-username="cmon" \ --mysql-password="{cmonpassword}" \ --mysql-database="cmon" \ --hostname="{ClusterControl Primary IP Address}" \ --rpc-token="{ClusterControl API key as generated above}" \ --controller-id="clustercontrol"
Note
The value of the
hostname
must be either a valid FQDN or IP address of the ClusterControl node. If the host has multiple IP addresses, pick the primary IP address of the host. The cmon user password taken from previous step when creating the user. -
ClusterControl’s event and cloud modules require
/etc/default/cmon
for service definition. Create the file and add the following lines: -
Create temporary directory SSL and certificate:
-
Generate self signed certificates:
$ openssl genrsa -out /tmp/ssl/server.key 2048 $ openssl req -new -key /tmp/ssl/server.key -out /tmp/ssl/server.csr \ -addext "subjectAltName = DNS:dev.severalnines.local" \ -subj "/C=SE/ST=Stockholm/L=Stockholm/O='Severalnines AB'/OU=Severalnines/CN=*.severalnines.local/[email protected]" $ openssl x509 -req -extfile /tmp/ssl/v3.ext -days 1825 -sha256 -in /tmp/ssl/server.csr -signkey /tmp/ssl/server.key -out /tmp/ssl/server.crt
-
Copy the certificate into default ClusterControl default directory:
-
Configure header origin in the
/etc/apache2/conf-available/security.conf
: -
Replace the default URL with the correct
hostname
:$ sed -i "s|^[ \t]*ServerName.*| ServerName {controller_ip_address}|g" /etc/apache2/sites-available/cc-frontend.conf $ sed -i "s|https://cc2.severalnines.local:9443.*|https://{controller_ip_address}\/|g" /etc/apache2/sites-available/cc-frontend.conf $ sed -i "s|Listen 9443|#Listen 443|g" /etc/apache2/sites-available/cc-frontend.conf $ sed -i "s|9443|443|g" /etc/apache2/sites-available/cc-frontend.conf
Note
Replace
{controller_ip_address}
with valid FQDN or IP address of the ClusterControl node. -
Enable required Apache modules and create a symlink to sites-enabled for default HTTPS virtual host:
-
Restart Apache webserver to apply the changes:
-
Enable ClusterControl on boot and start them:
For sysvinit/upstart:
$ sudo update-rc.d cmon defaults $ sudo update-rc.d cmon-ssh defaults $ sudo update-rc.d cmon-events defaults $ sudo update-rc.d cmon-cloud defaults $ service cmon start $ service cmon-ssh start $ service cmon-events start $ service cmon-cloud start
For systemd:
-
Create
ccsetup
user for registration new account.$ export S9S_USER_CONFIG=/tmp/ccsetup.conf $ s9s user --create --new-password=admin --group=admins --email-address="{your_email_address}" --controller="https://localhost:9501" ccsetup $ unset S9S_USER_CONFIG
Note
The email
{your_email_address}
is used to register a new account. -
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. Please use the repository template in ClusterControl host for the database server and load balancer server.
-
Generate an SSH key on the ClusterControl node:
-
Setup passwordless SSH to ClusterControl and database nodes:
Repeat step 2 for all database hosts that you are going to manage (including the ClusterControl node itself).
Offline installation With Temporary Internet Access
ClusterControl provides a script to install and configure ClusterControl packages in an Internetless environment, available at this URL using the OFFLINE=1
parameter.
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.
-
Setup the webserver on the repo server to serve up packages to the yum package manager remotely:
-
Setup software required for repository server
-
Create directory for repo packages:
-
Configure the
nginx
in the Repository Server: -
Configure hostname
repo-server
in the/etc/hosts
on the Repository Server. -
Restart the
nginx
service: -
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
-
Adding Severalnines Repository to the Repo Server.
Import the public key:
Download the s9s-repo fom the Severalnines Repository
Edit the
s9s-repo.repo
and adds9s-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:
-
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:
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
-
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:
Perform repository syncing of MongoDB:
-
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:
Perform repository syncing of Percona MongoDB:
-
Adding Oracle MySQL Repository to the Repo Server.
Download the appropriate Oracle MySQL community release package
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:
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
-
Adding Percona MySQL Repository to the Repo Server.
Download the appropriate Percona MySQL release package
Enable the Percona Server for MSQL 8.0 (the latest version at the time of this writing):
Clear the repository cache and list out the repositories, make sure the newly added Percona Server repository is in the list:
Perform repository syncing of Percona MySQL:
-
Adding MariaDB Repository to the Repo Server.
Install the MariaDB repository by using the following script:
Clear the repository cache and list out the repositories, make sure the newly added MariaDB repository is in the list:
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
-
Creating Repository
-
Install the Apache Webserver.
-
Configure the directory for the repo path:
-
Install the
apt-mirror
package:
-
Copy the original file of
mirror.list
: -
Edit the file
/etc/apt/mirror.list
. Please uncomment the parameterset base_path
and adjust to the directory that we had created. We will the all the packages for the Ubuntu 22.04 (jammy) and some others repos as below:$ sudo vi /etc/apt/mirror.list ############# config ################## # # set base_path /var/spool/apt-mirror set base_path /var/www/html/ubuntu # # set mirror_path $base_path/mirror # set skel_path $base_path/skel # set var_path $base_path/var # set cleanscript $var_path/clean.sh # set defaultarch # set postmirror_script $var_path/postmirror.sh # set run_postmirror 0 set nthreads 20 set _tilde 0 # ############# end config ############## deb http://archive.ubuntu.com/ubuntu {os_code} main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {os_code}-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {os_code}-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {os_code}-proposed main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu {os_code}-backports main restricted universe multiverse #deb-src http://archive.ubuntu.com/ubuntu {os_code} main restricted universe multiverse #deb-src http://archive.ubuntu.com/ubuntu {os_code}-security main restricted universe multiverse #deb-src http://archive.ubuntu.com/ubuntu {os_code}-updates main restricted universe multiverse ##deb-src http://archive.ubuntu.com/ubuntu {os_code}-proposed main restricted universe multiverse ##deb-src http://archive.ubuntu.com/ubuntu {os_code}-backports main restricted universe multiverse
Note
Replace the
{os_code}
for each version of Operating System;jammy
,focal
,bionic
,noble
. -
Create the directory for the
postmirror
file and copy the file into the directory -
Execute the
apt-mirror
command, it will download all the packages into the repository server. -
Download all the Severalnines Repos and Databases Repositories by add the following into
/etc/apt/mirror.list
$ sudo vi /etc/apt/mirror.list ### Severalnines & DB's Repository additions deb [arch=amd64] http://repo.severalnines.com/deb ubuntu main deb http://repo.severalnines.com/s9s-tools/{os_code}/ ./ deb http://apt.postgresql.org/pub/repos/apt/ {os_code}-pgdg main deb http://repo.mysql.com/apt/ubuntu/ {os_code} mysql-apt-config deb http://repo.mysql.com/apt/ubuntu/ {os_code} mysql-8.0 deb http://repo.percona.com/ps-80/apt {os_code} main deb-src http://repo.percona.com/ps-80/apt {os_code} main deb http://repo.percona.com/pxc-80/apt {os_code} main deb-src http://repo.percona.com/pxc-80/apt {os_code} main deb http://repo.percona.com/tools/apt {os_code} main deb-src http://repo.percona.com/tools/apt {os_code} main deb http://repo.percona.com/percona/apt {os_code} main deb https://repo.mongodb.org/apt/ubuntu {os_code}/mongodb-org/4.4 multiverse deb https://repo.mongodb.org/apt/ubuntu {os_code}/mongodb-org/5.0 multiverse deb https://repo.mongodb.org/apt/ubuntu {os_code}/mongodb-org/6.0 multiverse deb https://repo.mongodb.org/apt/ubuntu {os_code}/mongodb-org/7.0 multiverse deb [arch=amd64,arm64] https://dlm.mariadb.com/repo/mariadb-server/10.6/repo/ubuntu {os_code} main deb [arch=amd64,arm64] https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/ubuntu {os_code} main deb [arch=amd64,arm64] https://dlm.mariadb.com/repo/mariadb-server/10.6/repo/ubuntu {os_code} main/debug deb [arch=amd64,arm64] https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/ubuntu {os_code} main/debug deb [arch=amd64,arm64] https://dlm.mariadb.com/repo/maxscale/latest/apt {os_code} main deb [arch=amd64] http://downloads.mariadb.com/Tools/ubuntu {os_code} main
-
Execute the
apt-mirror
command again, it will download all the Severalnines and Databases packages into the repository server.
Performing Offline Installation
-
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:
-
Configure MySQL root password for the newly installed MySQL server:
-
Move the default repository to the backup.
-
Create the repository pointing to the Repo Server in the ClusterControl host. You can use the following template:
[appstream] name=AlmaLinux $releasever - AppStream baseurl=http://repo-server/appstream/ enabled=1 gpgcheck=0 [baseos] name=AlmaLinux $releasever - BaseOS baseurl=http://repo-server/baseos/ enabled=1 gpgcheck=0 [crb] name=AlmaLinux $releasever - CRB baseurl=http://repo-server/crb/ enabled=1 gpgcheck=0 [extras] name=AlmaLinux $releasever - Extras baseurl=http://repo-server/extras/ enabled=1 gpgcheck=0 [epel] name=AlmaLinux $releasever - Epel baseurl=http://repo-server/epel/ enabled=1 gpgcheck=0 [mysql80-community] name=MySQL 8.0 Community Server baseurl=http://repo-server/mysql80-community/ enabled=1 gpgcheck=0 [mysql-tools-community] name=MySQL Tools Community baseurl=http://repo-server/mysql-tools-community/ enabled=1 gpgcheck=0 [pgdg-common] name=PostgreSQL common RPMs for RHEL / Rocky / AlmaLinux $releasever - $basearch baseurl=http://repo-server/pgdg-common/ enabled=1 gpgcheck=0 [pgdg15] name=PostgreSQL 16 for RHEL / Rocky / AlmaLinux $releasever - $basearch baseurl=http://repo-server/pgdg16/ enabled=1 gpgcheck=0 [pgdg15] name=PostgreSQL 15 for RHEL / Rocky / AlmaLinux $releasever - $basearch baseurl=http://repo-server/pgdg15/ enabled=1 gpgcheck=0 [pgdg14] name=PostgreSQL 15 for RHEL / Rocky / AlmaLinux $releasever - $basearch baseurl=http://repo-server/pgdg14/ enabled=1 gpgcheck=0 [s9s-repo] name = Severalnines Release Repository baseurl=http://repo-server/s9s-repo/ enabled=1 gpgcheck=0 [s9s-tools] name = Severalnines Tools Repository baseurl=http://repo-server/s9s-tools/ enabled=1 gpgcheck=0
-
Add the alias of
repo-server
in ClusterControl host/etc/hosts
:Note
You should change the
ip_repository_server
with the correct IP Address of the Repo Server. -
Download the
install-cc
script and put the file into ClusterControl hosts. Give execute permission to the file. -
Execute
install-cc
script to install ClusterControl and follow the installation wizard accordingly:$ $ S9S_ADMIN_EMAIL="[email protected]" OFFLINE=1 S9S_ROOT_PASSWORD="XXX" S9S_CMON_PASSWORD="YYY" ./install-cc
Note
Fill the
S9S_ADMIN_EMAIL
using your email,S9S_ROOT_PASSWORD
with the correct password andS9S_CMON_PASSWORD
you defined. -
Open the browser and navigate to
https://ClusterControl_host/
. 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.
-
Backup the
/etc/apt/source.list
file before we made the changes. -
Edit the file
/etc/apt/source.list
and adjust the hostnamerepo-server-ubuntu22_04
with the correct IP Address of your repository server.:$ sudo vi /etc/apt/source.list # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code} main restricted # deb-src http://us.archive.ubuntu.com/ubuntu {os_code} main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code}-updates main restricted # deb-src http://us.archive.ubuntu.com/ubuntu {os_code}-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code} universe # deb-src http://us.archive.ubuntu.com/ubuntu {os_code} universe deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code}-updates universe # deb-src http://us.archive.ubuntu.com/ubuntu {os_code}-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code} multiverse deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code}-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code}-backports main restricted universe multiverse deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code}-security main restricted deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code}-security universe deb http://repo-server-ubuntu22_04/ubuntu/mirror/archive.ubuntu.com/ubuntu {os_code}-security multiverse # Severalnines Repository deb [arch=amd64] http://repo-server-ubuntu22_04/ubuntu/mirror/repo.severalnines.com/deb ubuntu main deb http://repo-server-ubuntu22_04/ubuntu/mirror/repo.severalnines.com/s9s-tools/{os_code}/ ./ # PostgreSQL Repository deb http://repo-server-ubuntu22_04/ubuntu/mirror/apt.postgresql.org/pub/repos/apt/ {os_code}-pgdg main # Oracle Repository deb http://repo-server-ubuntu22_04/ubuntu/mirror/repo.mysql.com/apt/ubuntu/ {os_code} mysql-apt-config deb http://repo-server-ubuntu22_04/ubuntu/mirror/repo.mysql.com/apt/ubuntu/ {os_code} mysql-8.0 # Percona MySQL deb http://repo-server-ubuntu22_04/ubuntu/mirror/repo.percona.com/ps-80/apt {os_code} main #deb-src http://repo-server-ubuntu22_04/ubuntu/mirror/repo.percona.com/ps-80/apt {os_code} main deb http://repo-server-ubuntu22_04/ubuntu/mirror/repo.percona.com/pxc-80/apt {os_code} main #deb-src http://repo-server-ubuntu22_04/ubuntu/mirror/repo.percona.com/pxc-80/apt {os_code} main deb http://repo-server-ubuntu22_04/ubuntu/mirror/repo.percona.com/tools/apt {os_code} main #deb-src http://repo-server-ubuntu22_04/ubuntu/mirror/repo.percona.com/tools/apt {os_code} main # include the main repository as well deb http://repo-server-ubuntu22_04/ubuntu/mirror/repo.percona.com/percona/apt {os_code} main # MongoDB Repository deb https://repo-server-ubuntu22_04/ubuntu/mirror/repo.mongodb.org/apt/ubuntu {os_code}/mongodb-org/4.4 multiverse deb https://repo-server-ubuntu22_04/ubuntu/mirror/repo.mongodb.org/apt/ubuntu {os_code}/mongodb-org/5.0 multiverse deb https://repo-server-ubuntu22_04/ubuntu/mirror/repo.mongodb.org/apt/ubuntu {os_code}/mongodb-org/6.0 multiverse deb https://repo-server-ubuntu22_04/ubuntu/mirror/repo.mongodb.org/apt/ubuntu {os_code}/mongodb-org/7.0 multiverse
Note
Replace the
{os_code}
for each version of Operating System;jammy
,focal
,bionic
,noble
. -
Install MySQL on the host and enable it on boot:
-
Configure MySQL root password for the newly installed MySQL server:
-
Download the
install-cc
script and put the file into ClusterControl hosts. Give execute permission to the file. -
Execute
install-cc
script to install ClusterControl and follow the installation wizard accordingly:$ $ S9S_ADMIN_EMAIL="[email protected]" OFFLINE=1 S9S_ROOT_PASSWORD="XXX" S9S_CMON_PASSWORD="YYY" ./install-cc
Note
Fill the
S9S_ADMIN_EMAIL
using your email,S9S_ROOT_PASSWORD
with the correct password andS9S_CMON_PASSWORD
you defined. -
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. Please use the repository template in ClusterControl host for the database server and load balancer server.
-
Generate an SSH key on the ClusterControl node:
-
Setup passwordless SSH to ClusterControl and database nodes:
Repeat step 2 for all database hosts that you are going to manage (including the ClusterControl node itself).