Arama Yap Mesaj Gönder
Biz Sizi Arayalım
+90
X
X
X
X

Knowledge Base

Homepage Knowledge Base General What is CentOS? Installation, Usage...

Bize Ulaşın

Konum Halkalı merkez mahallesi fatih cd ozgur apt no 46 , Küçükçekmece , İstanbul , 34303 , TR

What is CentOS? Installation, Usage, and Advantages

What is CentOS?

CentOS (Community ENTerprise Operating System) is a community-supported, free and open-source Linux distribution built from Red Hat Enterprise Linux (RHEL) source code. It is built on the stability and reliability of RHEL but is offered without commercial license fees. This makes CentOS a popular choice, especially for server operating systems.

  • Stability: It is a stable platform because it is built on the solid foundation of RHEL.
  • Free and Open Source: It can be used free of charge, and the source code is open to everyone.
  • Community Support: It is supported by a large community of users and developers.
  • Server-Oriented: It is specifically designed for server environments.

What are the Key Features of CentOS?

The key features of CentOS are:

  • High Performance: It is optimized for server workloads.
  • Security: It is protected with regular security updates and patches.
  • Long-Term Support: It usually offers long-term support for up to 10 years (but this has changed with CentOS Stream).
  • Wide Software Repository: It provides access to a wide variety of software.
  • Compatibility: It is compatible with RHEL, which means that applications running on RHEL can also run on CentOS.

Important Note: The CentOS project has transitioned to CentOS Stream. CentOS Stream is part of the RHEL development process and provides a preview of the next minor release of RHEL. This means that CentOS Stream is updated more frequently and has newer features, but it may not be as reliable as older CentOS versions in terms of stability.

How to Install CentOS?

The CentOS installation involves the following steps:

  1. Download the ISO Image: Download the appropriate ISO image from the official CentOS website (e.g., archive.kernel.org).
  2. Prepare the Installation Medium: Burn the downloaded ISO image to a DVD or create a bootable USB drive (e.g., using Rufus or Etcher).
  3. Boot the Computer from the Installation Medium: Boot your computer from the DVD or USB drive. You may need to change your BIOS settings for this.
  4. Start the Installation: The CentOS installation screen will appear. Select the "Install CentOS" option.
  5. Configure Language and Keyboard Settings: Select the installation language and keyboard layout.
  6. Select the Installation Destination: Select a disk for installation. You can use "Automatic partitioning" or "Custom partitioning" options to partition the disk. Custom partitioning provides more control.
  7. Configure Network Settings: Configure your network settings. If you are using DHCP, it will automatically obtain an IP address. If you want to use a static IP address, manually configure the IP address, network mask, gateway, and DNS servers.
  8. Set the Root Password: Set a password for the root user. This password is required for system administration.
  9. Create a User Account: Create a user account. This account will be used for daily use.
  10. Complete the Installation: After the installation is complete, restart your computer.

Example: Disk Partitioning (Custom Partitioning)

Using the custom partitioning option, you can create a configuration like the following:

  • /boot: 500 MB (for boot files)
  • / (root): 50 GB (for main system files)
  • /home: Remaining space (for user files)
  • swap: Equal to or twice the RAM size (for swap space)

How to Manage Packages in CentOS?

In CentOS, yum (Yellowdog Updater, Modified) or dnf (Dandified Yum) is used for package management. dnf has replaced yum and is a faster and more efficient package manager.

Basic Package Management Commands:

  • Package Search: dnf search package_name
  • Package Information: dnf info package_name
  • Package Installation: dnf install package_name
  • Package Update: dnf update package_name (specific package) or dnf update (all packages)
  • Package Removal: dnf remove package_name
  • System Update: dnf upgrade
  • Package Dependency Resolution: dnf automatically resolves dependencies.

Example: Apache Web Server Installation


sudo dnf install httpd
sudo systemctl start httpd
sudo systemctl enable httpd

These commands install, start, and enable the Apache web server to start automatically on system boot, respectively.

What are the Advantages and Disadvantages of CentOS?

The advantages and disadvantages of CentOS are summarized in the table below:

Advantages Disadvantages
Free and open source Uncertainties about stability with the transition to CentOS Stream
Compatible with RHEL Community support may not be as fast as commercial support
Long-term support (for older versions) Software updates may be slower than RHEL (for older versions)
Wide software repository CentOS Stream can sometimes be unstable as it is part of RHEL's development process.
Stable and reliable (for older versions) The need to switch to CentOS Stream with the end of life of CentOS 8

What is CentOS Stream and What are the Differences from Classic CentOS?

CentOS Stream is a continuous distribution model that is part of Red Hat's RHEL development process. Classic CentOS was a rebuild of RHEL and was updated after RHEL was released. CentOS Stream, on the other hand, is an "upstream" part of RHEL's development process. This means that CentOS Stream provides a preview of the next minor version of RHEL.

Key Differences:

  • Development Model: Classic CentOS is a rebuild of RHEL; CentOS Stream is part of RHEL's development process.
  • Update Frequency: Classic CentOS was updated in sync with RHEL releases; CentOS Stream is continuously updated.
  • Stability: Classic CentOS inherited RHEL's stability; CentOS Stream may be less stable due to having newer features.
  • Purpose: Classic CentOS aimed to provide a stable platform for production environments; CentOS Stream aims to provide a platform for developers and testers to try out future versions of RHEL.

The following table summarizes these differences:

Feature Classic CentOS CentOS Stream
Development Model Rebuild of RHEL Part of RHEL Development Process (Upstream)
Update Frequency Synchronized with RHEL Releases Continuous Updates
Stability High Lower (Due to Newer Features)
Purpose Stable Platform for Production Environments Platform for Trying Future Versions of RHEL

When Should I Use CentOS?

CentOS (or CentOS Stream) can be used in the following cases:

  • Web Servers: Ideal for running web servers like Apache or Nginx.
  • Database Servers: Suitable for hosting databases such as MySQL, PostgreSQL, or MariaDB.
  • File Servers: Can be used for file sharing using Samba or NFS.
  • Development Environments: Developers can test their applications on CentOS.
  • Cloud Computing: Can be run on virtual machines on cloud platforms like AWS, Azure, or Google Cloud.
  • Containerization: Can be used with container technologies like Docker or Kubernetes.

Real-Life Example: Web Hosting Company

A web hosting company can use CentOS to host its customers' websites. The stability and reliability of CentOS ensure that websites are continuously accessible. Also, the fact that CentOS is free helps the hosting company reduce costs.

How to Ensure CentOS Security?

The following steps can be taken to ensure CentOS security:

  • Firewall: Configure a firewall using firewalld or iptables. Only open necessary ports.
  • Regular Updates: Regularly update the system and software packages. Use the dnf update command.
  • Strong Passwords: Use strong passwords for the root user and other users.
  • SSH Security: Restrict SSH access. Disable password-based authentication and use key-based authentication. Consider changing the SSH port.
  • SELinux: Enable SELinux and configure it correctly. SELinux is a security mechanism that controls access to system resources.
  • Log Monitoring: Regularly monitor system logs. Review the log files in the /var/log/ directory to detect potential security breaches.
  • Malware Scanning: Use a malware scanner such as ClamAV.
  • Two-Factor Authentication: Use two-factor authentication (2FA) for critical services.

Example: Enhancing SSH Security


# Edit the /etc/ssh/sshd_config file
sudo nano /etc/ssh/sshd_config

# Change or add the following lines
Port 2222 # Use a non-standard port
PermitRootLogin no # Prevent direct login of the root user
PasswordAuthentication no # Disable password-based authentication
PubkeyAuthentication yes # Enable key-based authentication

These changes will make SSH access more secure.

What are the Resources Related to CentOS?

To learn more about CentOS, you can refer to the following resources:

  • CentOS Wiki: The official wiki page of CentOS (wiki.centos.org).
  • CentOS Forums: Forums where CentOS users and developers discuss (forums.centos.org).
  • Red Hat Enterprise Linux Documentation: RHEL documentation may also apply to CentOS (access.redhat.com/documentation).
  • Various Blogs and Websites: There are many blogs and websites about CentOS. For example, sites like DigitalOcean and Linuxize offer educational articles about CentOS.

Important Note: With the transition to CentOS Stream, some resources may not be up to date. Therefore, it is important to follow the most up-to-date information from the official CentOS Stream website and community forums.

 

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(624 times viewed / 98 people found it helpful)

Call now to get more detailed information about our products and services.

Top