This guide provides a summary of the commands to install necessary tools and utilities on a CentOS server after a fresh installation.
Keep the system updated to ensure you have the latest patches and features:
sudo yum update -y
sudo yum upgrade -y
Install basic networking tools like ifconfig
and modern utilities like ip
:
sudo yum install -y net-tools
sudo yum install -y iproute
The EPEL repository provides additional packages:
sudo yum install -y epel-release
Add common utilities for file management and system interaction:
sudo yum install -y vim nano wget curl git unzip tar htop
Install a set of tools for compiling software and development:
sudo yum groupinstall -y "Development Tools"
Useful tools to monitor and debug system resources:
sudo yum install -y sysstat lsof iotop dstat
Interactive process viewer for monitoring system performance:
- Enable the EPEL repository if not already enabled:
sudo yum install -y epel-release
- Install
htop
:sudo yum install -y htop
- Run
htop
:htop
Install and configure the SSH server:
sudo yum install -y openssh-server
sudo systemctl start sshd
sudo systemctl enable sshd
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
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
Tools for managing disks and partitions:
sudo yum install -y parted fdisk gdisk
clear
command: Ensurencurses
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