Autostarting XAMPP with systemd

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Autostarting XAMPP with systemd

Postby itguru64 » 27. March 2013 18:38

Most of the threads on here re autostarts are talking about the old initv system but I'm trying to get XAMPP 1.8.1 running automatically on a Fedora 18 XFCE system using systemd.

I've set up xampp as a service and it reports that it has started:-

Code: Select all
cat > /etc/systemd/system/xampp.service <<EOF
[Unit]
Description=Start XAMPP Web Server

[Service]
Type=oneshot
ExecStart=/bin/sh -c '/opt/lampp/lampp start'

[Install]
WantedBy=multi-user.target
EOF

systemctl enable xampp.service


systemctl reports that is has worked:-

# systemctl status xampp.service
xampp.service - Start XAMPP Web Server
Loaded: loaded (/etc/systemd/system/xampp.service; enabled)
Active: inactive (dead) since Wed 2013-03-27 17:10:39 GMT; 7min ago
Process: 845 ExecStart=/bin/sh -c /opt/lampp/lampp start (code=exited, status=0/SUCCESS)

Mar 27 17:10:25 Enterprise systemd[1]: Starting Start XAMPP Web Server...
Mar 27 17:10:31 Enterprise sh[845]: Starting XAMPP for Linux 1.8.1...
Mar 27 17:10:31 Enterprise sh[845]: XAMPP: Starting Apache...
Mar 27 17:10:35 Enterprise sh[845]: XAMPP: Starting MySQL...
Mar 27 17:10:38 Enterprise sh[845]: XAMPP: Starting TEST-Plugin...
Mar 27 17:10:38 Enterprise sh[845]: XAMPP for Linux started.
Mar 27 17:10:39 Enterprise systemd[1]: Started Start XAMPP Web Server.


but the service isn't running:-

# /opt/lampp/lampp status
Version: XAMPP for Linux 1.8.1
Apache is not running.
MySQL is not running.


the error logs show this but I don't know what it means

Code: Select all
[Wed Mar 27 17:10:36.125032 2013] [mpm_prefork:notice] [pid 1446] AH00163: Apache/2.4.3 (Unix) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Wed Mar 27 17:10:36.125080 2013] [core:notice] [pid 1446] AH00094: Command line: '/opt/lampp/bin/httpd -D PHP5 -E /opt/lampp/logs/error_log'
[Wed Mar 27 17:10:38.698153 2013] [mpm_prefork:notice] [pid 1446] AH00169: caught SIGTERM, shutting down


If I start it manually with /opt/lampp/lampp start it starts fine and stays up.

Any ideas?

PS I have VMWare running using https just thought I would mention that in case that is important.
itguru64
 
Posts: 1
Joined: 27. March 2013 18:26
Operating System: Fedora 18

Re: Autostarting XAMPP with systemd

Postby JonB » 27. March 2013 19:35

OR - you could use the approach we suggest - which was done on a Fedora box, running LXDE & Gnome (it should work on any desktop actually).

viewtopic.php?f=17&t=49647

Good luck
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 53 guests