8 Essential RHEL7 Changes Every Sysadmin Should Master
This article summarizes eight common issues and their solutions when migrating from RHEL6 to RHEL7, covering service management, rc.local scripts, automatic file cleanup, time synchronization, hostname handling, MySQL deployment, network configuration, and log system upgrades.
Part.1 System Service Management Changes
RHEL6 used service and chkconfig to manage SysVinit services. In RHEL7 these commands manage only a few legacy services; most services are managed by systemd using systemctl. For example, the Apache service commands differ as follows:
Purpose
RHEL6
RHEL7
Start service
service httpd start systemctl start httpd(or httpd.service)
Stop service
service httpd stop systemctl stop httpdCheck status
service httpd status systemctl status httpdRestart service
service httpd restart systemctl restart httpdCheck enable status
chkconfig --list httpd systemctl is-enabled httpdEnable at boot
chkconfig httpd on systemctl enable httpdDisable at boot
chkconfig httpd off systemctl disable httpdPart.2 Custom Scripts in /etc/rc.local
In RHEL6 custom scripts placed in /etc/rc.local ran automatically at boot. RHEL7 keeps /etc/rc.local only for compatibility and disables it by default. To enable, run chmod +x /etc/rc.d/rc.local. Note that /etc/rc.local is a symlink to /etc/rc.d/rc.local, which has different permissions.
Part.3 Automatic File Cleanup Changes
RHEL6 used tmpwatch (configured in /etc/cron.daily/tmpwatch) to clean /tmp and /var/tmp. RHEL7 relies on systemd-tmpfiles-clean.service, with its timer at /usr/lib/systemd/system/systemd-tmpfiles-clean.timer and cleanup rules in /usr/lib/tmpfiles.d/tmp.conf. Important files should be stored outside the automatically cleaned directories.
Part.4 Time Synchronization Changes (timedatectl)
RHEL6 used NTP with /etc/ntp.conf and the ntpd service. RHEL7 switches to chrony (config file /etc/chrony.conf) while still supporting ntpdate. The new timedatectl command provides powerful time management, e.g.: timedatectl (or timedatectl status)
Show date, time and sync status timedatectl set-time "2019-07-01 12:00:00" Set system clock timedatectl list-timezones List available time zones timedatectl set-timezone Asia/Shanghai Configure time zone timedatectl set-ntp true Enable time synchronization service timedatectl set-local-rtc 0 Set hardware clock to UTC
Part.5 Hostname Modification Changes
RHEL6 required editing /etc/sysconfig/network after using hostname. RHEL7 introduces hostnamectl, which changes the hostname instantly and persists across reboots. It also supports graphical tools nmtui and nmtui-hostname. Hostnames can be static, pretty, or transient.
Part.6 MySQL Deployment on RHEL7
RHEL6 provided mysql-server via yum. RHEL7 defaults to MariaDB; install with yum install mariadb-server. MariaDB is a drop‑in replacement for MySQL, fully compatible.
Part.7 Network Interface Configuration Changes
RHEL6 used system-config-network or setup for GUI editing. RHEL7 replaces these with nmcli (CLI) and nmtui (TUI). The traditional ifconfig and route commands are deprecated in favor of ip addr and ip route.
Part.8 Log System Upgrade
RHEL6 used rsyslog. RHEL7 adds systemd-journald alongside rsyslog. The journalctl command provides powerful log queries, e.g.:
Show last 20 lines journalctl -n 20 Show logs of PID 1 journalctl _PID=1 Show ssh service logs journalctl _COMM=sshd Show logs from previous boot journalctl -b -1 Show error level logs journalctl -p err Show yesterday's logs journalctl --since yesterday Show logs in a time range
journalctl --since 9:00 --until 18:00Summary
Beyond the eight topics covered, RHEL7 also introduces other features such as firewalld replacing iptables. The core upgrade is the adoption of systemd for service management, along with new utilities like loginctl and coredumpctl for user sessions and crash analysis.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Sohu Smart Platform Tech Team
The Sohu News app's technical sharing hub, offering deep tech analyses, the latest industry news, and fun developer anecdotes. Follow us to discover the team's daily joys.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
