systemd systemctl chconfig

General support questions
Post Reply
rr.01
Posts: 5
Joined: 2015/01/30 14:37:08
Location: London, UK

systemd systemctl chconfig

Post by rr.01 » 2015/01/30 14:46:00

Hello Everyone,

I am relatively new to Linux and am currently running CentOS on a VPS. I am trying to get a better understanding of services management systems such as systemd, systemctl, and chkconfig. Where can I find some layman documentation where I can learn how to use these facilities?

I am basically trying to get noip2 (which I have installed as root and is now under usr/local/bin) to run when I start the system. I have other applications that I would also like to run on startup and I believe that resolving the noip2 issue would also enable me to apply the same solution to the others.

Thank you in advance for your help.

Raul
Raul

User avatar
TrevorH
Forum Moderator
Posts: 25818
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: systemd systemctl chconfig

Post by TrevorH » 2015/01/30 15:53:24

The new init system on CentOS 7 is systemd. You control that with systemctl. There are aliases for the old service and chkconfig commands that translate them to to the equivalent systemctl commands but it's encouraged that you learn the systemctl version of chkconfig so you don't see the messages from chkconfig telling you that it's obsolete and being forwarded to systemd.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

rr.01
Posts: 5
Joined: 2015/01/30 14:37:08
Location: London, UK

Re: systemd systemctl chconfig

Post by rr.01 » 2015/01/30 17:27:37

TrevorH wrote:The new init system on CentOS 7 is systemd. You control that with systemctl. There are aliases for the old service and chkconfig commands that translate them to to the equivalent systemctl commands but it's encouraged that you learn the systemctl version of chkconfig so you don't see the messages from chkconfig telling you that it's obsolete and being forwarded to systemd.
Thanks Trevor.

I tried to launch some systemctl commands but I have the feeling it simply isn't installed on my system (6.5 32bit, coming with the VPS); I also tried to search through yum, but I couldn't find it. These are the system responses, am I doing something wrong or do I need to install it?

[root@c1106255-5691 ~]# systemctl enable /usr/local/bin/noip2.service
-bash: systemctl: command not found
You have new mail in /var/spool/mail/root
[root@c1106255-5691 ~]# systemctl --version
-bash: systemctl: command not found
[root@c1106255-5691 ~]# yum list systemd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.iweb.ca
* extras: centos.mirror.ca.planethoster.net
* rpmforge: mirror.us.leaseweb.net
* updates: less.cogeco.net
Error: No matching Packages to list


How can I install it in my system from a reliable source?
Raul

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: systemd systemctl chconfig

Post by gerald_clark » 2015/01/30 19:46:42

CentOS 6 does not use systemd.

rr.01
Posts: 5
Joined: 2015/01/30 14:37:08
Location: London, UK

Re: systemd systemctl chconfig

Post by rr.01 » 2015/01/30 21:53:56

gerald_clark wrote:CentOS 6 does not use systemd.
Thanks Gerald, this clarifies.
Raul

User avatar
TrevorH
Forum Moderator
Posts: 25818
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: systemd systemctl chconfig

Post by TrevorH » 2015/01/30 23:22:56

On CentOS 6 you need to use chkconfig to control when/if services are started/stopped automatically at boot. If you want to stop/start them manually then use the service command.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply