• Rahul

What to do after installing the CentOS | Computercooltricks

Updated: Mar 12


darkworldhacker.com

CentOS is a community-driven free-based distribution and most important CentOS is the capable alternative to Red Hat Enterprise Linux.

CenOS stands for Community Enterprise Operating system and based on Linux Distributions started by Gregory Kurtzer it gives us enterprise-class free and open-source Operating system which is also compatible with Red Hat Enterprise Linux (RHEL), Basically CenOS developers use the RHEl source code and create almost similar to it. Support only via community and web portals.


Architecture


CentOS comes with the same architecture its means it supports both 32bit and 64-bit machines-


1. Static IP setup on the server


The first thing we will do the setup of Static IP address, Route, and DNS in the CenOS server.


Edit the config file from this path



/etc/sysconfig/network-scripts/ directory:  


# vi /etc/sysconfig/network-scripts/ifcfg-eth016
IPADDR =[Enter your static IP here]GATEWAY =[Enter your Default Gateway]DNS1 =[Your Domain Name System 1]DNS2 =[Your Domain Name System 2]”

# systemctl stop NetworkManager        --------->stop NetworkManager
# systemctl disable NetworkManager        --------->not needed on server

# service network restart            --------->restart network service

2. Upgrade CenOS along with Kernel


Here we will upgrade the installed packages to the latest version along with the latest security updates.


yum update kernel
yum update && yum upgrade

3. Setup HostName for Sever



# echo $HOSTNAME --------->check current HOSTNAME
# vi /etc/hostname ` --------->edit and add new hostname 
hostname with your own # echo $HOSTNAME --------->re login to pc

4.Install Command Line Web Browser


In case if we don't have GUI installed then you will need a command-line-based web browser for browsing the internet by using a terminal. We have two tools a) links b) elinks


# yum install links
Or
# yum install elinks

5) Instaling of wget and 7-zip


wget is a Linux based command-line tool that retrieves the content from the web servers. It is one of the most important tools we must have to retrieve web content or download any type of files by using wget command.

7zip is also helped that allow us to compress along with extract files use below commands for installing of wget and 7-zip


yum install wget
yum install p7zip  

6. Install Rootkit Hunter


Basically, RootKit Hunter is Linux based application that will scan rootkits and other potentially harmful exploits in Linux based system. for installing the Rootkit hunter you need to type the below command


yum install rkhunter

7.Install GCC & Java


GCC stands for GNU compiler collection is developed by the GNU project and supports various programming languages now comes with Java is a class-based object-oriented based programming language.

Commands for GCC and Java with the following command.

yum install gcc
yum install java

8. Installtoin of Apache HTTP Server


Basically, we need an HTTP server for many purposes for example to run the website, multimedia, script along with many other things, Run the below-mentioned command to install and configure Apache HTTP server in Linux.



# yum install httpd
# firewall-cmd --add-service=http
# firewall-cmd --reload
# systemctl restart httpd.service
# systemctl start httpd.service
# systemctl enable httpd.service

9) Install PHP


PHP is one of the most popular servers side scripting languages for web-based services. Type the below-mentioned command in the terminal for installing the PHP


# yum install php
# systemctl restart httpd.service

10. Enable iptables


Just we need to follow steps to install iptables

Step 1) Run this command to install the Iptables services package


$ sudo yum install iptables-services


Step 2) Once the iptables package is installed just type the below commands.



$ sudo systemctl start iptables
$ sudo systemctl start ip6tables

Step 3) Enable the iptables services for automatically on system boot:



$ sudo systemctl enable iptables
$ sudo systemctl enable ip6tables

Step 4) Status check of iptables service


$ sudo systemctl status iptables
$ sudo systemctl status ip6tables

Step 5) Command for check the rules iptables


sudo iptables -nvL
sudo ip6tables -nvL

Conclusion:


In this blog, we have tried to cover all the most important topics related to CentOS.

if you think we have left some topic just comments below we will surely help you.


#computercooltricks #darkworldhacker