Home‎ > ‎Server config‎ > ‎

Fixing /var/run problems on Centos/RHEL 7

On Centos 7 systems, /var/run (symlinked to /run) are mounted on tmpfs, therefore RAM disk based. Some of them, such as /var/run/mariadb and /var/run/httpd are not created by default, and are lost during shutdown, causing those services not to be auto started at boot.

This is a problem caused by systemd.

To fix this:

systemctl enable systemd-tmpfiles-setup.service
systemctl start systemd-tmpfiles-setup.service
Check status with: systemctl status systemd-tmpfiles-setup.service - may not read inactive
This is persistent after reboots and should fix the problem for good.