Initial Setup
Applies to CentOS Stream 9 & 10 / AlmaLinux 9.x & 10.x / Rocky Linux 9.x & 10.x
After the system installation is complete, follow these steps to finish the initial configuration and bring the system to a secure, usable state.
What You Will Accomplish
Section titled “What You Will Accomplish”- Set the timezone and hostname
- Update the system to the latest version
- Install commonly used essential tools
- Configure basic security settings
Prerequisites
Section titled “Prerequisites”- Completed system installation
- Logged into the system (locally or via SSH)
- Have sudo privileges
Set the Timezone
Section titled “Set the Timezone”-
Check the current timezone
Terminal window $ timedatectl -
Set the timezone
Terminal window $ sudo timedatectl set-timezone Asia/Shanghai -
Enable NTP time synchronization
Terminal window $ sudo timedatectl set-ntp yes -
Verify
Terminal window $ timedatectlConfirm that
Time zoneshowsAsia/ShanghaiandNTP serviceisactive.
Set the Hostname
Section titled “Set the Hostname”$ sudo hostnamectl set-hostname my-server$ hostnamectlUpdate the System
Section titled “Update the System”$ sudo dnf update -y$ sudo rebootInstall Essential Tools
Section titled “Install Essential Tools”$ sudo dnf install -y \ vim-enhanced \ wget \ curl \ tar \ bash-completion \ net-tools \ bind-utils \ lsof \ tmux# htop is not in BaseOS/AppStream; it comes from EPEL: dnf install -y epel-release firstsudo dnf install -y htopDisable Unnecessary Services
Section titled “Disable Unnecessary Services”Review running services and disable any that are not needed:
$ systemctl list-units --type=service --state=runningCommon services that can be disabled (depending on your actual needs):
$ sudo systemctl disable --now bluetoothNext Steps
Section titled “Next Steps”- SSH Remote Access — Configure remote access
- DNF Package Management — Learn software package management