Open In App
Related Articles

Getting Started with CentOS

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

CentOS, short for Community ENTerprise Operating System, is a powerful and widely used Linux distribution known for its stability, security, and open-source nature. Derived from the source code of Red Hat Enterprise Linux (RHEL), CentOS has become a popular choice for server environments and enterprise-level applications. In this article, we will delve into the various aspects of CentOS, exploring its history, features, advantages, and use cases.

History and Origin of CentOS

CentOS was first released in 2004 and has since evolved into a robust and community-driven operating system. The distribution is developed by the CentOS Project, a community of open-source enthusiasts who work to maintain compatibility with RHEL while providing a freely available alternative. CentOS essentially aims to offer a binary-compatible, free version of RHEL, making it an attractive choice for users who prioritize stability and reliability in their computing environments

Choosing CentOS over Ubuntu

Choosing between CentOS and Ubuntu often depends on specific use cases, preferences, and requirements. Here are some considerations that might lead users to opt for CentOS:

Stability and Predictability:

CentOS is known for its stability and long-term support, making it a preferred choice for servers and enterprise environments where consistency and reliability are critical.

Compatibility with RHEL:

CentOS’s compatibility with Red Hat Enterprise Linux allows users to benefit from enterprise-level features without the associated costs. This makes it an attractive option for businesses seeking a stable and cost-effective solution.

Enterprise Focus:

CentOS is often favored in enterprise environments due to its focus on providing a platform suitable for business-critical applications and services.

Binary Compatibility:

CentOS’s binary compatibility with RHEL ensures that software developed and tested on CentOS can seamlessly run on RHEL and vice versa. This compatibility is crucial for organizations with mixed environments.

Community Support:

While both CentOS and Ubuntu have active communities, CentOS’s community is particularly strong in enterprise and server-related discussions, providing valuable support for users in these domains.

Hardware Requirements CentOS

Processor (CPU):

  • CentOS 7 requires a 32-bit or 64-bit processor with a minimum clock speed of 500 MHz.

Memory (RAM):

  • A minimum of 1 GB of RAM is required, though 2 GB or more is recommended for better performance.

Disk Space:

  • At least 10 GB of available hard disk space is required for a minimal installation.
  • For a more feature-rich installation, including additional software and services, it’s advisable to allocate more disk space.

Graphics Card:

  • A graphics card capable of a minimum resolution of 800×600 pixels is recommended.

Network Interface Card (NIC):

  • A network interface card is required for network connectivity.

Additional Considerations:

  • CentOS is designed to run on a variety of hardware, including both physical and virtual environments.
  • Users should ensure that their hardware components, such as storage controllers and network adapters, have compatible drivers with CentOS.

Graphical Installation of CentOS 7

We can install CentOS with an installation utility called Anaconda. CentOS installer, Anaconda, provides a simple graphical method to install CentOS. Anaconda is a tool that provides an interactive graphical interface for installing CentOS through which a user can easily install it. The graphical interface of Anaconda has a built-in help system that can guide users through installation steps. 

Most operating system installer programs follow a linear path of installation but Anaconda is different due to its parallel nature. We can customize and configure advanced installation options if required. While installing the OS, if the configuration of a certain option gets blocked due to a background task like network initialization or disk detection then in that case we can configure other options while waiting for the task to be over.

To install CentOS 7 Server with GUI follow the steps given below :

Step 1: First, we need to download CentOS’s Disk Image (ISO File) from their official website centos.org. 

 

Step 2: Now click on the available architectures according to your system.

 

Step 3: Choose any mirror to download the ISO File. Now once the downloading is over we can start the Disk Image installation. Click on the option Install CentOS 7” and wait till a new interface appears.

 

Step 4: Choose the language for the installation process.

 

Step 5: Now configure options such as date and time, software selection, installation path, network configuration, etc. 

 

Step 6: For demonstration, here we choose the environment as a Server with GUI having the following add-ons.

 

Step 7: Now click on the “Begin Installation” option to start the installation. Now, set up a root password and user account.

 

Step 8: Once the installation completes, reboot and accept the license agreement.

 

Step 9: Now use the password created before to log in to the user account for the system.

 

 

After completing the installation process we can do the following:

Common Commands and Examples in CentOS

 Example 1: Getting the IP address of the Server in CentOS

To get the IP address of the server we can use the ifconfigcommand.

ifconfig | grep 192


The above command will display the IP address of the host system.

 

We can also use the “ip addr” with grep to get the same result.

ip addr | grep 192


 

Example 2: Updating the Packages in CentOS

To check for any updates available for your installed packages, use the “yum” package manager. Type the command below on the terminal:

yum check-update


 

To update a single package to the latest available version, run the command below:

yum update [package name]


To update all packages to the latest available version, run the command below:

yum update -y


 

Example 3: Installing VIM in CentOS

To install the VIM editor on CentOS, type the command given below on the terminal.

sudo yum install vim-enhanced -y  


 

Nowadays, the VIM editor comes pre-installed with CentOS.

Example 4: Installing EPEL Repository in CentOS

We can use the “yum” package manager to install the EPEL repository. Connect to the server via SSH as the root user or open a terminal and type the command below 

sudo yum install epel-release

 

It will simply install all the required packages of EPEL. In this case, it is already installed.

Example 5: Install Byobu in CentOS

After installing the EPEL repository, we can also use the “yum” package manager to install the Byobu. Type the command below:

yum -y install byobu


 

One thing to keep in mind is that the EPEL repository should be enabled before installing Byobu. To enable the EPEL repository type the command below.

yum --enablerepo="epel"


To check whether the repository is enabled or not type the command below.

yum repolist enabled


 

Example 6: Permanently Disable SELinux in CentOS

To permanently disable SELinux and make it persist across reboots follow the steps below :

Open the SELinux configuration file on any editor.

nano /etc/selinux/config


 

  • Now change the SELINUX directive to either permissive or disabled.
  • Now just save and exit the configuration file and then reboot the system.

Example 7: Granting Users Sudo know in CentOS

To grant the superuser permission to the normal user account, type sudo su” and then type the root account password.

sudo su


Conclusion

In this article we discussed CentOS which stands as a formidable Linux distribution, celebrated for its stability, security, and open-source ethos. Derived from the robust foundation of Red Hat Enterprise Linux, CentOS has become a preferred choice for servers and enterprise-level applications. Its hardware flexibility, user-friendly graphical installer, and distinct advantages over other distributions, such as Ubuntu, showcase its versatility. With a commitment to stability, compatibility, and strong community support, CentOS continues to be a reliable and adaptable operating system, meeting the diverse needs of users across a wide array of computing environments.



Last Updated : 29 Jan, 2024
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads