EPEL, CRB, and GlusterFS (supported by the CentOS SIG comunity) repositories to be installed on the systems.
Firewall configuration to allow GlusterFS service with Firewalld.
Create a cluster volume with 3 file replicas. It uses file replication, not block replication. Replicated volumes.
STEP 1) Install the additional repositories.
Three additional repositories should be installed – all of them are official from the CentOS community or Fedora official community, so there tend to be really stable and do not break the package integrity. Keep on reading!
CentOS Stream 9 CRB repository is the name of the repository, which replaces the old CentOS Stream 8 PowerTools repository.
The CRB is an official repository, which stands for CodeReady Linux Builder repository. It includes multiple important packages mainly for developer packages (those with “-devel” in the name). The CRB packages may be found here: https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/.
When installing packages from community official or other repositories they may depend on packages in CRB repositories, but because it is not enabled by default, there will be a nasty error of broken dependencies like:
Error:
Problem: cannot install the best candidate for the job
- nothing provides python3-pyxattr needed by glusterfs-server-11.0-2.el9s.x86_64 from centos-gluster11-test
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
The package glusterfs-server-11.0-2.el9s.x86_64 needs the package python3-pyxattr, which cannot be found in all the enabled repositories on the system, so it appears the system is broken.
So the python3-pyxattr is part of the CRB repository so just enabling it will solve the problem:
[root@srv ~]# dnf config-manager --set-enabled crb
[root@srv ~]# dnf install -y glusterfs-server
CentOS Stream 9 - BaseOS 198 kB/s | 9.5 kB 00:00
CentOS Stream 9 - AppStream 26 kB/s | 10 kB 00:00
CentOS Stream 9 - CRB 8.0 MB/s | 5.4 MB 00:00
Dependencies resolved.
=========================================================================================================================
Package Architecture Version Repository Size
=========================================================================================================================
Installing:
glusterfs-server x86_64 11.0-2.el9s centos-gluster11-test 1.2 M
Installing dependencies:
attr x86_64 2.5.1-3.el9 baseos 61 k
device-mapper-event x86_64 9:1.02.195-1.el9 baseos 33 k
device-mapper-event-libs x86_64 9:1.02.195-1.el9 baseos 32 k
device-mapper-persistent-data x86_64 0.9.0-13.el9 baseos 782 k
glusterfs-cli x86_64 11.0-2.el9s centos-gluster11-test 185 k
glusterfs-client-xlators x86_64 11.0-2.el9s centos-gluster11-test 785 k
glusterfs-fuse x86_64 11.0-2.el9s centos-gluster11-test 136 k
glusterfs-selinux noarch 2.0.1-1.el9s centos-gluster11 29 k
libaio x86_64 0.3.111-13.el9 baseos 24 k
libgfapi0 x86_64 11.0-2.el9s centos-gluster11-test 95 k
libgfchangelog0 x86_64 11.0-2.el9s centos-gluster11-test 34 k
lvm2 x86_64 9:2.03.21-1.el9 baseos 1.5 M
lvm2-libs x86_64 9:2.03.21-1.el9 baseos 1.0 M
python3-pyxattr x86_64 0.7.2-4.el9 crb 35 k
rpcbind x86_64 1.2.6-5.el9 baseos 58 k
Transaction Summary
=========================================================================================================================
Install 16 Packages
Total download size: 6.0 M
.....
.....
python3-pyxattr-0.7.2-4.el9.x86_64 rpcbind-1.2.6-5.el9.x86_64
Complete!
Listing packages of the CRB repository is simple enough.
[root@srv ~]# dnf repository-packages crb list
Last metadata expiration check: 1:26:16 ago on Mon 19 Jun 2023 12:50:59 PM UTC.
Installed Packages
python3-pyxattr.x86_64 0.7.2-4.el9 @crb
Available Packages
CUnit-devel.i686 2.1.3-25.el9 crb
CUnit-devel.x86_64 2.1.3-25.el9 crb
Judy-devel.i686 1.0.5-28.el9 crb
Judy-devel.x86_64 1.0.5-28.el9 crb
LibRaw-devel.i686 0.20.2-6.el9 crb
LibRaw-devel.x86_64 0.20.2-6.el9 crb
.....
.....
Apparently, CentOS Stream 9 installation should include EPEL and CRB repositories in addition to the base ones.
Almost half of the files are developments files (i.e. “-devel”) packages and others are additional libraries, mainly Python 3 and Perl modules, OpenJDK 17, 11, 1.8.0 slow debug and fast debug, and more.
Lately, dedicated servers come with Remote management consoles like IPMI KVM or iLO, or DRAC, but they are still slow to initiate the process of installing a system.
Consider a server (dedicated or not) should be installed in a remote colocation with the help of only the server’s network. The system administrator just receives an administrative shell access and nothing more and the server should be installed with the proper and secured software, in this case, the CentOS Stream 9. Using kexec the user can boot a new kernel from a different Linux Distribution and initiate automated network installation of the system and it is not needed any Remote management consoles. The only thing needed is the ability of the current system/kernel to be able to use kexec, which is pretty standard for 8 to 10 years old Linux systems. There is a good chance the colocations’ rescue CD/DVD/USB flash drives or the PXE rescue images support kexec, because they tend to upgrade their rescue systems, which the user may boot if he has problems.
Still, using kexec to initiate another kernel or Linux Distribution like CentOS Stream 9 with VNC installer, for example, it a powerful tool to safely replace a currently running system with only shell access.
This article has chosen to start the CentOS Stream 9VNC installer just for demonstration purposes. Booting a downloaded kernel may be used for just anything from booting a system over the network, booting an installer, booting an unattended automation installation, and so on. There are a couple of simple things to check before booting the new kernel.
This article will show just one use case – reinstalling a system with CentOS Stream 9 over the network using the CentOS VNC Install. The purpose is to show how simple, fast, and easy is to install a modern Linux system only by having console access. No scripts are required if manual installation is performed.
To boot a CentOS Stream 9VNC Installer the kexec command needs the following options.
The kexec commands need the following options:
Networking – device interface name,IP, netmask, gateway and DNS servers
Kernel options – these options will initiate scripts from the initramfs.
inst.vnc – a kernel option, which will start a VNC server with no password on the default port and network device. Using it with another inst.vncpassword=[PASSWORD] the VNC server will require the password – [PASSWORD]. The password should be a maximum of 8 characters because the VNC server will not start if it is with more!
inst.repo=[HTTP/HTTPS://repository] – a kernel option, which sets the CentOSHTTP/HTTPS repository.
The kexec command to boot the CentOS Stream 9VNC Installer is:
The kernel (i.e. vmlinuz) and the initramfs (i.e. initrd.img) should be downloaded in the current directory before executing the above command. The above line will order the kernel to load the new kernel, but to boot it another command must be executed:
All the LXC container configuration and root filesystem will be placed under /mnt/storage/servers/[container_name], which in the example above is /mnt/storage/servers/mycontainer
[root@srv ~]# ls -al /mnt/storage/servers/mycontainer
total 16
drwxrwx---. 3 root root 4096 Oct 14 13:38 .
drwxr-xr-x. 4 root root 4096 Oct 14 13:41 ..
-rw-r-----. 1 root root 780 Oct 14 13:38 config
drwxr-xr-x. 19 root root 4096 Oct 14 07:15 rootfs
It is better to use the “-P” and to change the LXC container location than only the filesystem path. In this case, a good practice is to make a symbolic link in /var/lib/lxc/[container-name] to the new location:
So all LXC tools will continue to work without explicitly adding an option for the new path of this container.
Change the SELinux file context to be container_var_lib_t of the LXC root filesystem
Add the file context container_var_lib_t to the container’s root filesystem path and change the SELinux labels.
First, verify all the needed tools are installed:
Here there are broken modules in the DNF package manager. It was a result of an upgrade, but it may occur if some unofficial repositories mess up with them:
On every DNF command, there are multiple problem-reporting lines about conflicts in different DNF modules.
[root@srv ~]# dnf info epel-release
Last metadata expiration check: 0:13:42 ago on Tue Oct 11 13:11:51 2022.
Modular dependency problems:
Problem 1: conflicting requests
- nothing provides module(platform:el8) needed by module httpd:2.4:8050020211112043353:b4937e53.x86_64
Problem 2: conflicting requests
- nothing provides module(platform:el8) needed by module nginx:1.14:8000020191007205758:55190bc5.x86_64
Problem 3: conflicting requests
- nothing provides module(platform:el8) needed by module nodejs:10:8030020210304194401:30b713e6.x86_64
Problem 4: conflicting requests
- nothing provides module(platform:el8) needed by module perl:5.26:8000020190628020724:55190bc5.x86_64
Problem 5: conflicting requests
- nothing provides module(platform:el8) needed by module perl-IO-Socket-SSL:2.066:8030020201222215140:1e4bbb35.x86_64
Problem 6: conflicting requests
- nothing provides module(platform:el8) needed by module perl-libwww-perl:6.34:8030020201223164340:b967a9a2.x86_64
Problem 7: conflicting requests
- nothing provides module(platform:el8) needed by module php:7.2:8020020200507003613:2c7ca891.x86_64
Problem 8: conflicting requests
- nothing provides module(platform:el8) needed by module satellite-5-client:1.0:8010020191114035551:cdc1202b.x86_64
Problem 9: conflicting requests
- nothing provides module(platform:el8) needed by module virt:rhel:8050020211221192853:b4937e53.x86_64
Installed Packages
Name : epel-release
Version : 9
Release : 4.el9
Architecture : noarch
Size : 25 k
Source : epel-release-9-4.el9.src.rpm
Repository : @System
From repo : epel
Summary : Extra Packages for Enterprise Linux repository configuration
URL : http://download.fedoraproject.org/pub/epel
License : GPLv2
Description : This package contains the Extra Packages for Enterprise Linux (EPEL) repository
: GPG key as well as configuration for yum.
The DNF package manager offers modules to group software. Each module may have one or multiple streams, representing the major version of the software it groups in a single entity. As can be seen above from the DNF output, the module name is httpd and the stream is 2.4. It is clear the module httpd is responsible for the installation of Apache Web server. More on the subject here – https://docs.fedoraproject.org/en-US/modularity/using-modules/
To fix the problems above and clear the errors just reset the modules to their initial default state with:
This article describes how to install a Web server with application back-end PHP and database back-end MySQL using MariaDB. In continuing the same topic, but with different software from the previous article – How To Install Linux, Nginx, MySQL (MariaDB), PHP-FPM (LEMP) Stack on CentOS Stream 9, where the Web server is Nginx with application back-end PHP-FPM, which is a sort of CGI (FastCGI). In this article, the Web server is Apache and the application is again PHP-FPM, because since the CentOS 8 the Apache mod_php is deprecated.
All the software installed throughout this article is from the CentOS Stream 9 official repositories including the EPEL repository. The machine is installed with a minimal installation of CentOS Stream 9 and there is a how-to here – Network installation of CentOS Stream 9 (20220606.0) – minimal server installation.
Here are the steps to perform:
STEP 1) Install, configure and start the database MariaDB.
First, install the MariaDB server by:
dnf install -y mariadb-server
To configure the MariaDB server, the main file is /etc/my.cnf, which just includes all files under the folder /etc/my.cnf.d/
[root@srv ~]# cat /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[root@srv ~]# ls -altr /etc/my.cnf.d/
total 32
-rw-r--r--. 1 root root 295 Mar 25 2022 client.cnf
-rw-r--r--. 1 root root 120 May 18 07:55 spider.cnf
-rw-r--r--. 1 root root 232 May 18 07:55 mysql-clients.cnf
-rw-r--r--. 1 root root 763 May 18 07:55 enable_encryption.preset
-rw-r--r--. 1 root root 1458 Jun 13 13:24 mariadb-server.cnf
-rw-r--r--. 1 root root 42 Jun 13 13:29 auth_gssapi.cnf
drwxr-xr-x. 2 root root 4096 Oct 6 06:34 .
drwxr-xr-x. 81 root root 4096 Oct 6 06:34 ..
The most important file for the MariaDB server is /etc/my.cnf.d/mariadb-server.cnf, where all the server options are included. Under section “[mysqld]” add options to tune the MariaDB server. Supported options could be found here: https://mariadb.com/kb/en/mysqld-options/
Add the following options under “[mysqld]” in /etc/my.cnf.d/mariadb-server.cnf Keep on reading!
This article presents how to install a Web server with application back-end PHP and database back-end MySQL using MariaDB. All the software installed throughout this article is from the CentOS Stream 9 official repositories including the EPEL repository. The machine is installed with a minimal installation of CentOS Stream 9 and there is a how-to here – Network installation of CentOS Stream 9 (20220606.0) – minimal server installation.
Here are the steps to perform:
STEP 1) Install, configure and start the database MariaDB.
First, install the MariaDB server by:
dnf install -y mariadb-server
To configure the MariaDB server, the main file is /etc/my.cnf, which just includes all files under the folder /etc/my.cnf.d/
[root@srv ~]# cat /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[root@srv ~]# ls -altr /etc/my.cnf.d/
total 32
-rw-r--r--. 1 root root 295 Mar 25 2022 client.cnf
-rw-r--r--. 1 root root 120 May 18 07:55 spider.cnf
-rw-r--r--. 1 root root 232 May 18 07:55 mysql-clients.cnf
-rw-r--r--. 1 root root 763 May 18 07:55 enable_encryption.preset
-rw-r--r--. 1 root root 1458 Jun 13 13:24 mariadb-server.cnf
-rw-r--r--. 1 root root 42 Jun 13 13:29 auth_gssapi.cnf
drwxr-xr-x. 2 root root 4096 Oct 6 06:34 .
drwxr-xr-x. 81 root root 4096 Oct 6 06:34 ..
The most important file for the MariaDB server is /etc/my.cnf.d/mariadb-server.cnf, where all the server options are included. Under section “[mysqld]” add options to tune the MariaDB server. Supported options could be found here: https://mariadb.com/kb/en/mysqld-options/
Add the following options under “[mysqld]” in /etc/my.cnf.d/mariadb-server.cnf Keep on reading!
This article will show how to update to CentOS Stream 9 from CentOS Stream 8.
If only official repositories are used it is fairly easy to upgrade to the new rolling based CentOS Stream 9 release, which follows the Red Hat Enterprise Linux 9. Using unofficial or users’ repositories CentOS Stream 8 may lead to unstable system or break user’s system following this tutorial. First, check out for CentOS Stream 9 compatibility issues the currently installed repositories if some specific or unofficial are used.
The following article uses a CentOS Stream 9 with only the official default repositories and in addition, the EPEL repository, which has a CentOS Stream 9 support.
How to install – Network installation of CentOS Stream 9 (20220606.0) – minimal server installation with additional information about important CentOS Stream 9 URLs and links and what kind of software the user can expect to have Software and technical details of CentOS Stream 9 minimal install. Camparing the packages of the two systems – a clean install of CentOS Stream 9 and an upgrade from CentOS Stream 8, the clean install has 377 packages installed and the upgrade has 387 packages installed. The strated processes are the same except the chronyd service is not started on boot. chronyd daemon offers a time synchronization.
STEP 1) All installed packages should be updated to the latest versions.
[root@srv ~]# dnf update -y
Last metadata expiration check: 0:09:08 ago on Tue Oct 4 12:12:07 2022.
Dependencies resolved.
Nothing to do.
Complete!
The DNF tool reports that all packages are up-to-date, because there is nothing to upgrade.
STEP 2) A cleanup of all packages, which are not required anymore.
Check orphan and leaves packages. Some of the packages here may be used by the user explicitly, so it is important to know the system. Remove the packages if not used by the system and they are showed as an output of the following commands and they are not used by the user of the system.
[root@srv ~]# dnf repoquery --unneeded
Last metadata expiration check: 0:12:56 ago on Tue Oct 4 12:12:07 2022.
NetworkManager-initscripts-updown-1:1.40.0-1.el8.noarch
grub2-tools-efi-1:2.02-129.el8.x86_64
libmetalink-0:0.1.3-7.el8.x86_64
pciutils-0:3.7.0-1.el8.x86_64
python3-configobj-0:5.0.6-11.el8.noarch
python3-schedutils-0:0.6-6.el8.x86_64
rdma-core-0:41.0-1.el8.x86_64
[root@srv ~]# dnf repoquery --extras
Last metadata expiration check: 0:00:12 ago on Tue Oct 4 12:34:17 2022.
Regenerating the vmlinuz and initramfs for the rescue kernel of currently installed kernel under CentOS Stream 9 is really simple. There is a package dracut-config-rescue, which delivers a bash script (/usr/lib/kernel/install.d/51-dracut-rescue.install) to help generate a rescue kernel.
STEP 1) Move the old rescue kernel in a backup directory.
Here are the valid arguments to generate the rescue kernel:
add – the command what to do the script.
kernel version – the kernel version, for which the script to generate the rescue kernel.
boot directory – the boot directory, where the rescue kernel will be saved.
kernel image – the kernel image against the script will produce the rescue kernel.
Bonus) Additional information.
It is interesting to mention, now, the script /usr/lib/kernel/install.d/51-dracut-rescue.install seems unfinished, because it does not include “USAGE” output and “remove” command is not implemented! The usage part is even stranger, because when the script is executed with wrong or without arguments it throws error for missing “usage command” (in fact, “usage” bash function):
[root@srv ~]# /usr/lib/kernel/install.d/51-dracut-rescue.install
/usr/lib/kernel/install.d/51-dracut-rescue.install: line 129: usage: command not found
The remove command is just not implemented and it exits the script with 0, which WILL NOT remove a kernel rescue entry.
This is the situation for the latest version at present:
[root@srv ~]# dnf info dracut-config-rescue
Last metadata expiration check: 1:35:30 ago on Wed 05 Oct 2022 09:06:59 AM UTC.
Installed Packages
Name : dracut-config-rescue
Version : 057
Release : 13.git20220816.el9
Architecture : x86_64
Size : 3.5 k
Source : dracut-057-13.git20220816.el9.src.rpm
Repository : @System
From repo : baseos
Summary : dracut configuration to turn on rescue image generation
URL : https://dracut.wiki.kernel.org/
License : GPLv2+ and LGPLv2+ and GPLv2
Description : This package provides the configuration to turn on the rescue initramfs
: generation with dracut.
lxc-templates uses template “download” to download different Linux distribution images from http://images.linuxcontainers.org/, which now redirects to http://uk.lxd.images.canonical.com/ (an Ubuntu lxd images mirror).
The container-selinux should be installed only if the host, i.e. the CentOS Stream 9 install, is with enabled SELinux. The packages offers additional SELinux rules or for the LXC and LXC tools like lxc-attach and more.
STEP 2) Create a Ubuntu 22.04 LTS with the help of LXC templates
In addition, there is a “–variant” option along with “--dist” and “--release” to specify which variant to install – default, cloud, desktop or other. There is a variant column in the table on the images’ page mentioned above. Keep on reading!
Manage Cookie Consent
We use technologies like cookies to store and/or access device information. We do this to improve browsing experience and to show (non-) personalized ads. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.