automatic starting of services

Ed Greshko Ed.Greshko at greshko.com
Tue Apr 10 07:04:00 UTC 2012


On 04/10/2012 02:49 PM, Tommy Pham wrote:
> Thank you, Ed, for that excellent reading!  That explains a lot of
> things.  I'm only testing F17 to see what new features and
> enhancements I can look forward to.  I don't expect much stability and
> compatibility from non GA releases.  I do have additional questions :)

Not a surprise....  :-)

> 1) is network.target.wants equivalent to run level 2,
> multi-user.target.wants would be run level 3, and graphical is similar
> to run level 5 of chkconfig?  Thus, I need to put the service in the
> all the desired targets similar to turning on each run level of
> chkconfig, right?

Well, that isn't necessary......

If you installed mysql, for example, there will be a
/lib/systemd/system/mysqld.service file.  When mysql is installed it defaults to
being disabled, as shown in the output of the systemctl command below.

[egreshko at meimei system]$ systemctl status mysqld.service
mysqld.service - MySQL database server
          Loaded: loaded (/lib/systemd/system/mysqld.service; disabled)
          Active: inactive (dead)
          CGroup: name=systemd:/system/mysqld.service

To enable it on boot, just do

 systemctl enable mysqld.service

See....

http://fedoraproject.org/wiki/Systemd#What_is_the_tool_to_manage_services_with_systemd.3F

>
> 2) The wiki mention using .include but I didn't quite get that part.
> I was looking for a configuration of some kind to use but I ended up
> making a symlink like existing services in /etc/systemd/system.

No need to worry about all of that unless you are creating your own services.  i.e.
those not installed via rpm from fedora.

-- 
Never be afraid to laugh at yourself, after all, you could be missing out on the joke
of the century. -- Dame Edna Everage


More information about the users mailing list