Header Shadow Image


Enabling or disabling services using systemctl instead of chkconfig in RHEL 7 / CentOS 7 / Scientific Linux 7

This is a quick way to enable system services using systemctl instead of using chkconfig:

[root@mdskvm-p01 audit]# systemctl list-unit-files|grep -i ntp
ntpd.service                              disabled
ntpdate.service                           disabled
[root@mdskvm-p01 audit]# systemctl enable ntp
Failed to execute operation: Access denied
[root@mdskvm-p01 audit]# systemctl enable ntpd
Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.
[root@mdskvm-p01 audit]# systemctl list-unit-files|grep -i ntp
ntpd.service                              enabled
ntpdate.service                           disabled
[root@mdskvm-p01 audit]# systemctl enable ntpdate
Created symlink from /etc/systemd/system/multi-user.target.wants/ntpdate.service to /usr/lib/systemd/system/ntpdate.service.
[root@mdskvm-p01 audit]# systemctl list-unit-files|grep -i ntp
ntpd.service                              enabled
ntpdate.service                           enabled

[root@mdskvm-p01 audit]#

Cheers,
TK

 

Leave a Reply

You must be logged in to post a comment.


     
  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License