Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save indraAsLesmana/9fa2f5e496c2055c199882698564771e to your computer and use it in GitHub Desktop.
Save indraAsLesmana/9fa2f5e496c2055c199882698564771e to your computer and use it in GitHub Desktop.

Install Necessary Tools on CentOS

This guide provides a summary of the commands to install necessary tools and utilities on a CentOS server after a fresh installation.


1. Update and Upgrade the System

Keep the system updated to ensure you have the latest patches and features:

sudo yum update -y
sudo yum upgrade -y

2. Install Networking Tools

Install basic networking tools like ifconfig and modern utilities like ip:

sudo yum install -y net-tools
sudo yum install -y iproute

3. Enable the EPEL Repository

The EPEL repository provides additional packages:

sudo yum install -y epel-release

4. Install Basic Command-Line Tools

Add common utilities for file management and system interaction:

sudo yum install -y vim nano wget curl git unzip tar htop

5. Install Development Tools

Install a set of tools for compiling software and development:

sudo yum groupinstall -y "Development Tools"

6. Install System Monitoring Tools

Useful tools to monitor and debug system resources:

sudo yum install -y sysstat lsof iotop dstat

7. Install htop

Interactive process viewer for monitoring system performance:

  1. Enable the EPEL repository if not already enabled:
    sudo yum install -y epel-release
  2. Install htop:
    sudo yum install -y htop
  3. Run htop:
    htop

8. Install SSH

Install and configure the SSH server:

sudo yum install -y openssh-server
sudo systemctl start sshd
sudo systemctl enable sshd

9. Open SSH Port in Firewall

Allow SSH connections through the firewall (default port 22):

sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables-save > /etc/sysconfig/iptables

If using a custom port (e.g., 2222):

sudo iptables -A INPUT -p tcp --dport 2222 -j ACCEPT
sudo iptables-save > /etc/sysconfig/iptables

10. Install Docker (Optional)

Install Docker for container management:

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo systemctl enable docker
sudo systemctl start docker

11. Install Disk and File System Tools

Tools for managing disks and partitions:

sudo yum install -y parted fdisk gdisk

12. Verify and Test Installation

Verify Installed Commands

  • clear command: Ensure ncurses is installed:
    sudo yum install -y ncurses
  • ifconfig command: Check via:
    ifconfig
  • htop command: Run directly:
    htop
  • SSH connection: Test from another machine:
    ssh username@your_server_ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment