Common Issues and Solutions When Migrating to Red Hat Enterprise Linux 7
This article summarizes eight typical problems encountered when upgrading to RHEL 7—including service management, rc.local scripts, automatic file cleanup, time synchronization, hostname handling, MySQL installation, network configuration, and logging—providing command‑by‑command solutions and best‑practice recommendations.
Red Hat Enterprise Linux (RHEL) is widely used for its security, stability, performance and open‑source nature. The latest release, RHEL 7, introduces many changes compared with earlier versions, which can be confusing for existing users.
Part 1 – Service Management Changes
In RHEL 6 and earlier, services were managed with service and chkconfig . RHEL 7 replaces these with systemctl (systemd). The table below shows the equivalent commands for starting, stopping, checking status, restarting, and enabling/disabling services such as Apache ( httpd ).
Purpose
RHEL 6
RHEL 7
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 httpd restart systemctl restart httpdCheck if enabled at boot
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 RHEL 6 you could place custom startup scripts in /etc/rc.local . RHEL 7 keeps the file only for compatibility and disables it by default. To use it you must make it executable ( chmod +x /etc/rc.d/rc.local ) and note that /etc/rc.local is a symlink to /etc/rc.d/rc.local , which has different permissions.
Part 3 – Automatic File Cleanup
RHEL 6 relied on the tmpwatch utility (configured in /etc/cron.daily/tmpwatch ) to purge old files from /tmp and /var/tmp . RHEL 7 uses systemd‑tmpfiles‑clean.service with its timer ( /usr/lib/systemd/system/systemd-tmpfiles-clean.timer ) and configuration files ( /usr/lib/tmpfiles.d/tmp.conf ) to perform the same task.
Part 4 – Time Synchronization
RHEL 6 uses the traditional NTP daemon (configuration in /etc/ntp.conf ) and the ntpdate command. RHEL 7 switches to chrony as the default time‑sync service while still providing a compatible ntpdate command. The newer timedatectl tool can display status, set the system clock, change the time zone, and enable NTP synchronization.
timedatectl(or
timedatectl status)
Show date/time and NTP status
timedatectl set-time "2019-07-01 12:00:00"Set system date/time
timedatectl list-timezonesList available time zones
timedatectl set-timezone Asia/ShanghaiConfigure time zone
timedatectl set-ntp trueEnable time‑sync service
timedatectl set-local-rtc 0Set hardware clock to UTC
Part 5 – Hostname Modification
RHEL 6 required editing /etc/sysconfig/network after using the hostname command, which did not survive a reboot. RHEL 7 introduces hostnamectl , which changes the hostname instantly and persists across reboots. It also supports graphical tools nmtui and nmtui‑hostname . Hostnames are categorized as static, pretty, and transient.
Part 6 – Installing MySQL
In RHEL 6 you could install MySQL directly with yum install mysql‑server . RHEL 7 replaces the default MySQL package with MariaDB; you can install it via yum install mariadb‑server . MariaDB is a drop‑in replacement for MySQL, sharing the same origin.
Part 7 – Network Interface Configuration
RHEL 6 offered graphical tools such as system-config-network or setup . These are absent in RHEL 7, which uses nmcli (CLI) and nmtui (TUI) for network configuration. It is also recommended to replace legacy commands like ifconfig and route with the ip suite (e.g., ip addr , ip route ).
Part 8 – Logging System Upgrade
RHEL 6 relied on rsyslog . RHEL 7 adds systemd‑journald alongside rsyslog, providing the journalctl command for powerful log queries. Common examples include viewing the last 20 lines ( journalctl -n 20 ), filtering by PID, service, boot, priority, or time range.
Show last 20 lines
journalctl -n 20Show logs of PID 1
journalctl _PID=1Show sshd logs
journalctl _COMM=sshdShow previous boot
journalctl -b -1Show error‑level logs
journalctl -p errShow yesterday's logs
journalctl --since yesterdayShow logs in a time range
journalctl --since 09:00 --until 18:00Conclusion
Beyond the eight issues covered, RHEL 7 also introduces other features such as firewalld (replacing iptables) and various systemd utilities like loginctl and coredumpctl . Exploring these new tools can greatly improve system management and reliability.
Sohu Tech Products
A knowledge-sharing platform for Sohu's technology products. As a leading Chinese internet brand with media, video, search, and gaming services and over 700 million users, Sohu continuously drives tech innovation and practice. We’ll share practical insights and tech news here.
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.