Here is a CentOS FAQ that addresses common questions related to CentOS:
CentOS (Community Enterprise Operating System) is a free, open-source Linux distribution derived from the sources of Red Hat Enterprise Linux (RHEL). It is widely used in enterprise and server environments due to its stability and long-term support.
In December 2020, Red Hat announced that CentOS 8 would be replaced by CentOS Stream. This move meant that CentOS would no longer follow RHEL releases but would instead serve as a rolling preview of the next RHEL version. Many users moved to alternatives like AlmaLinux and Rocky Linux to continue using a RHEL-compatible stable release.
CentOS Stream is a rolling-release Linux distribution, which means it receives continuous updates and sits upstream of RHEL. It’s meant for developers and those who want to test future features of RHEL. If you require stability for production environments, CentOS Stream might not be the best option, and you may want to explore alternatives like AlmaLinux or Rocky Linux.
To switch from CentOS 8 to CentOS Stream, follow these steps:
Install the CentOS Stream repository:
sudo dnf install centos-release-stream
Swap CentOS Linux repositories with CentOS Stream repositories:
sudo dnf swap centos-linux-repos centos-stream-repos
Update the system:
sudo dnf distro-sync
Software can be installed using YUM or DNF package managers. For example, to install the httpd package (Apache web server), run:
sudo yum install httpd # On CentOS 7 or older
sudo dnf install httpd # On CentOS 8 or CentOS Stream
CentOS uses systemd to manage services. You can enable, start, stop, and check the status of services using the following commands:
Enable a service to start at boot:
sudo systemctl enable service_name
Start a service immediately:
sudo systemctl start service_name
Check the status of a service:
sudo systemctl status service_name
EPEL (Extra Packages for Enterprise Linux): Provides additional packages for enterprise Linux distributions like CentOS.
sudo yum install epel-release # Enable EPEL on CentOS
Remi: Popular repository for updated versions of PHP, MySQL, and other software.
Nginx and PostgreSQL repositories also provide up-to-date versions for these services.
Since the shift to CentOS Stream, several alternatives have emerged to fill the gap left by traditional CentOS:
Both AlmaLinux and Rocky Linux are suitable for production environments where RHEL compatibility is required.
You can manage network settings using the nmcli or NetworkManager command-line tools. For example:
To check your current network connection:
nmcli device status
To configure a static IP address:
nmcli con mod "connection_name" ipv4.addresses "192.168.1.100/24"
nmcli con mod "connection_name" ipv4.gateway "192.168.1.1"
nmcli con mod "connection_name" ipv4.dns "8.8.8.8"
nmcli con up "connection_name"
The installation process for CentOS involves downloading an ISO image from the official website, creating a bootable USB, and following these steps:
SELinux (Security-Enhanced Linux) is a mandatory access control system that adds an extra layer of security to CentOS. It restricts access to files and processes based on security policies.
To check the current status of SELinux:
sudo sestatus
To disable SELinux temporarily:
sudo setenforce 0
SELinux is enabled by default and runs in enforcing mode on CentOS to protect critical system resources from unauthorized access.
There is no direct upgrade path from CentOS 7 to CentOS 8 or CentOS Stream. You will need to perform a fresh installation of CentOS 8/Stream. Backup your data and configurations before attempting a migration.
#centos on the Freenode network.