You are not logged in.

#1 2012-10-31 19:33:13

VInze
Member
From: Sneek
Registered: 2012-07-26
Posts: 19

XAMPP service systemd

Hi all,

After updating my installation to systemd I can't get XAMPP to autostart at boot.
Previously I used rc.local to execute the command: /opt/lampp/lampp start

Now I'm trying to create a service for starting XAMPP so I made the following file:
/etc/systemd/system/xampp.service

[Unit]
Description=XAMPP

[Service]
ExecStart=/opt/lampp/lampp start

Then I tried to enable this service by entering: sudo systemctl enable xampp.service
Which gives me the error:

The unit files have no [Install] section. They are not meant to be enabled using systemctl.

I was looking into other services, but I have no clue what I need to place in an install section.

Anyone who can help me out with this one?

Offline

#2 2012-10-31 19:49:49

kaszak696
Member
Registered: 2009-05-26
Posts: 543

Re: XAMPP service systemd

[Install]
WantedBy=multi-user.target

should be enough.

man 5 systemd.unit

if You want to know what it does.


'What can be asserted without evidence can also be dismissed without evidence.' - Christopher Hitchens
'There's no such thing as addiction, there's only things that you enjoy doing more than life.' - Doug Stanhope
GitHub Junkyard

Offline

#3 2012-10-31 19:52:08

VInze
Member
From: Sneek
Registered: 2012-07-26
Posts: 19

Re: XAMPP service systemd

Great! Thanks! smile

Offline

#4 2012-11-07 18:03:14

kryta
Member
Registered: 2012-11-07
Posts: 31

Re: XAMPP service systemd

Hello to everyone.

I create a service to start xampp in /etc/systemd/system/xampp.service

[jaume@R2D2 ~]$ sudo systemctl enable xampp.service
ln -s '/etc/systemd/system/xampp.service' '/etc/systemd/system/multi-user.target.wants/xampp.service'
[jaume@R2D2 ~]$ sudo systemctl start xampp.service
[jaume@R2D2 ~]$ cat /etc/systemd/system/xampp.service
[Unit]
Description=XAMPP

[Service]
ExecStart=/opt/lampp/lampp start

[Install]
WantedBy=multi-user.target
#Alias=xampp.service

[jaume@R2D2 ~]$

I don't know what happen, lampp don't start.... Some suggestion?

Thank you

Sorry for my English wink

Regards.

Last edited by kryta (2012-11-07 18:11:00)

Offline

#5 2012-11-13 16:06:00

kryta
Member
Registered: 2012-11-07
Posts: 31

Re: XAMPP service systemd

Do anyone know what happen?

Thank you so much.

Offline

#6 2012-12-28 17:24:40

superichy
Member
Registered: 2012-12-28
Posts: 1

Re: XAMPP service systemd

Hello people!

I created /etc/systemd/system/xampp.service with the following content:

[Unit]
Description=XAMPP

[Service]
ExecStart=/opt/lampp/lampp start

[Install]
WantedBy=multi-user.target

Then, I runned as Root $systemctl enable xampp.service without any error / problem...

Finally, I restarted the machine, and XAMPP does not auto start... It only starts if I run /opt/lampp/lampp start at the console



Any further help, please?

Thank you and have a great year

Offline

#7 2013-04-16 07:12:44

pst33l
Member
Registered: 2013-04-16
Posts: 2

Re: XAMPP service systemd

i have figured out a solution that worked for me (fedora 17)

type
nano /etc/systemd/system/xampp.service

then write the following:

[Unit]
Description=XAMPP

[Service]
ExecStart=/opt/lampp/lampp start
ExecStop=/opt/lampp/lampp stop
Type=forking

[Install]
WantedBy=multi-user.target

then

systemctl enable xampp.service

done smile

Offline

Board footer

Powered by FluxBB