Saturday, July 6, 2024

How to Install & Secure CentOS 9 Stream

CentOS Stream 9 is an operating system that provides a stable, predictable and manageable platform for the development and deployment of modern applications.

Steps to Install CentOS 9 Stream

CentOS 9 Stream is a popular choice for a Linux server due to its robustness, stability, and open-source nature. This comprehensive guide will walk you through how to install and secure CentOS 9 Stream, ensuring you have a well-protected server environment.

Please note that while this guide aims to provide detailed instructions, it is still essential to understand your system’s configuration. Always ensure you back up data before making changes.

Download and Install CentOS 9 Stream

Embarking on the journey of installing a new operating system can be intimidating. However, with our easy-to-follow guide, installing CentOS 9 Stream, an enterprise-level open-source OS, becomes straightforward and stress-free. Let’s get you started on your CentOS journey.

Step 1: Download CentOS 9 Stream

The first step to installing CentOS 8 is to download the ISO file. Visit the official CentOS website at https://www.centos.org/download/. Choose the “CentOS Linux DVD ISO” option for a full installation, or “Minimal Install” if you’re looking for a streamlined version.

Step 2: Create a Bootable USB/DVD

Next, create a bootable USB stick or DVD using the ISO file you downloaded. Use Rufus, a reliable and free-to-use software available for download at https://rufus.ie/.

Step 3: Boot from the USB/DVD

After creating the bootable USB/DVD, restart your computer. During the startup process, access the BIOS or UEFI settings and set your computer to boot from the USB/DVD.

Step 4: Start the CentOS 9 Stream Installation

On the CentOS 8 Installer menu, select “Install CentOS Linux 8.0” and press enter. Then, follow the instructions that appear on the screen. You will choose the language, set the time zone, and configure the disk where CentOS will be installed.

Step 5: Begin Installation

After setting up your configuration, begin the installation. While installing, you can set the root password and create a new user if desired.

Step 6: Reboot System

Once the installation is complete, eject the bootable USB/DVD and reboot your system. Your computer should now boot into your new CentOS 8 system.

Remember, practice makes perfect. Don’t be discouraged if your first installation isn’t flawless; you’re gaining valuable hands-on experience.

Secure CentOS 9 Stream

Step 1: Update Your System

Immediately after the installation, update your CentOS 9 Stream server to get the latest security patches and updates. Use the following commands:

sudo dnf update -y
sudo dnf upgrade -y

Step 2: Set Up a Firewall

FirewallD comes pre-installed with CentOS 9 Stream. Enable and start it with the following commands:

sudo systemctl start firewalld
sudo systemctl enable firewalld

Remember to open necessary ports according to your requirements. Use the following command to open a specific port (replace port_number with your specific port):

sudo firewall-cmd --permanent --add-port=port_number/tcp

Then reload the firewall with:

sudo firewall-cmd --reload

Step 3: Secure SSH Access

Securing SSH access is essential. To do this, open the SSH configuration file with:

sudo nano /etc/ssh/sshd_config

Change the following lines in the file:

  • Change ‘PermitRootLogin’ to ‘no’ to prevent root login via SSH.
  • Change ‘PasswordAuthentication’ to ‘no’ to enable key-based authentication.

Save and close the file. Restart the SSHD service with:

sudo systemctl restart sshd

Step 4: Install and Configure Fail2ban

Fail2ban is a tool that helps protect your server from brute-force attacks. Install it using:

sudo dnf install fail2ban -y

Enable and start the service with:

sudo systemctl enable fail2ban
sudo systemctl start fail2ban

Conclusion on Installing and Securing CentOS 9 Stream

Congratulations! You have successfully installed and secured CentOS 9 Stream. Regularly update your server and monitor logs to ensure it remains secure.

This tutorial is provided as a general guideline. Depending on the server’s use case and architecture, additional steps may be needed for securing your specific setup.

Related Articles

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

Lavora con noi marketingz agency. For more information, please email florida steve or call him at.