copying services from centos 6 into centos 7

General support questions
Post Reply
Posts: 8
Joined: 2018/02/18 14:45:33

copying services from centos 6 into centos 7

Post by yonatanvi » 2018/03/13 13:38:16

hi guys,

i have a Centos 6.4 and i would like to upgrade it to 7.4.
i already created a new server and copied all the desired configuration.
the issue is i have a startup service that has to be running every startup.
i copied the service to the new server into /etc/systemd/system/ and when i try enabling it, it says:

Failed to execute operation: Bad message

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

Re: copying services from centos 6 into centos 7

Post by TrevorH » 2018/03/13 14:04:15

You cannot put old style initscripts directly into /usr/lib/systemd/system or /etc/systemd/system as those are expected to be unit files which have a different syntax altogether. You can still use /etc/init.d/ to contain old style initscripts though it is better to rewrite those to become unit files instead. Use apropos systemd to get a long list of all the man pages you can read, some of the more useful ones are systemd.exec, systemd.directives and systemd.service.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply