Rocky Linux is an open-source, community-driven Linux distribution designed to be a bug-for-bug compatible downstream rebuild of Red Hat Enterprise Linux (RHEL). It aims to provide a stable, predictable, and enterprise-grade operating system, especially for servers and production workloads.
In this blog post we will document basic Rocky Linux operational procedures.
OS Update Procedure
cat /etc/rocky-release
# Refresh repository metadata (optional but recommended)
dnf clean all
dnf makecache
# Check available updates
dnf check-update
# Apply all updates
dnf update -y
# In Rocky Linux, dnf update = dnf upgrade (they behave the same).
# dnf upgrade -y
# Is Reboot required?
# it is part of yum-utils (yum install yum-utils)
needs-restarting -r
# Reboot if needed
reboot
Procedure to add user
useradd username
# Change password
passwd username
Procedure to change hostname
hostnamectl status
# Change hostname
sudo hostnamectl set-hostname rocky-template.example.com
Procedure to change IP Settings
nmcli connection show
# Show the current IP settings
ip a
# Modify the connection
nmcli connection modify ens192 ipv4.addresses 10.1.10.200/24
nmcli connection modify ens192 ipv4.gateway 10.1.10.254
nmcli connection modify ens192 ipv4.dns "1.1.1.1 8.8.8.8"
nmcli connection modify ens192 ipv4.method manual
# Restart Network Manager
sudo systemctl restart NetworkManager
# show all current IP settings including default gateway
Procedure to change DNS Settings
sudo nmcli connection modify ens192 ipv4.dns-search "int.example.com"
sudo nmcli connection modify ens192 ipv4.ignore-auto-dns yes
# Restart Network Manager
sudo systemctl restart NetworkManager
cat /etc/resolv.conf
Procedure to set Time Servers
To use above Time Servers, edit configuration file /etc/chrony.conf and ensure time servers are there.
# These servers could be used at the beginning of /etc/chrony.conf file
server time.cloudflare.com iburst
server time.google.com iburst
server ntp.cesnet.cz iburst
To enable and restart time service use
# Check and Verify NTP time servers
chronyc sources -v
Procedure to set Time Zone
Conclusion
Hope these basic operational procedures helps someone.
No comments:
Post a Comment