Initial Server Setup Centos 8

Introduction

When you created a new Server. How to step for your Server. In this tutorial, I will configure your new Centos 8. Now, let’s go to Initial Server Setup Centos 8.

Create a Sudo User and Granting Administrative Privileges

useradd devopsroles
passwd devopsroles
usermod -aG wheel devopsroles
su - devopsroles

The output terminal as below

Initial Server Setup Centos 8

Open a new terminal window

ssh devopsroles@SERVER_IP_ADDRESS

Disable SSH Root Login

We have new account. so, I can secure our server by disabling remote SSH account to the root account.

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config_BK
sudo sed -i -e 's/PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config
sudo cat /etc/ssh/sshd_config | grep PermitRootLogin

The output terminal as below

Initial Server Setup Centos 8

we need to restart the SSH

sudo systemctl reload sshd

Changing the hostname

sudo hostnamectl set-hostname server1.devopsroles.com

Setting Up a Basic Firewall CentOS 8

Firewalld is a firewall management tool for Linux operating systems. you need to make sure that the server firewall allows web access.

sudo firewall-cmd --add-service=http --permanent
sudo systemctl enable firewalld
sudo systemctl start firewalld
sudo systemctl status firewalld

Update CentOS 8 System

sudo yum check-update
sudo yum upgrade -y
sudo yum clean all

Install System Utilities

sudo yum -y install bind-utils net-tools  psmisc traceroute tree vim-enhanced wget

Conclusion

At this point, You have Initial Server Setup Centos 8. I hope will this your helpful. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.