3

I'm totally new to Ubuntu (Linux). I'm just installed Ubuntu 16.04 and install XAMPP (lampp, apache, mysql) on it. They are running well, but not started when I'm start/ restart the system.

To start Apache every time I've to run the command :

quleiss@quleiss:~$ sudo /opt/lampp/lampp start

My question is, is there any way that it will start automatically when I'm starting my system.

I'm googled for this but there are many solutions for how to install Apache ?, but not for how to make auto-start Apache ?.

I referred this question : Start script on system startup (Ubuntu 16.04.1)

After running sudo systemctl status apache2 command it will give this output :

apache2.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)

Any kind of help is appreciated, Thanks in advance.

15
  • Was there a requirement for the lampp stack provided by a 3rd party, rather than the standard apt-get install method? Just curious is all. If there was no specific requirement, then the standard is apt-get. Feb 25, 2017 at 5:24
  • Sorry I didn't get you. Please explain what you are suggesting. I'm totally new to Linux(Ubuntu). Feb 25, 2017 at 5:28
  • Please run: sudo systemctl status apache2 from the terminal and let me know what response you get, post into your question... Feb 25, 2017 at 5:55
  • After running sudo systemctl status apache2 command it will give this output : apache2.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) Feb 25, 2017 at 6:09
  • @ganesh - you've used a non standard method to install Apache/Mysql. LAMP is an acronym for Linux/Apache/MySQL/PHP. Installing applications on Ubuntu, is not as convoluted as Windows. Instead of having to download apps from 3rd party sites like VLC, you install then with apt. Apache can be installed like this apt-get install apache2, etc Feb 25, 2017 at 6:14

1 Answer 1

2

By default, one does not have to initialize or start apache,php and MySQL and related modules every time the system starts. These are started automatically when Ubuntu starts.

Under normal cases the user does not have to interfere and the webserver starts automatically.


In case this is not happening, the probable causes might be :

  • apache might be incorrectly configured (most likely).
  • php configuration has error ( any syntax error will cause php loading to fail), subsequently might affect apache.
  • If MySQL connection is needed for serving a page, and this connection fails (because of MySQL not running), then apache will fail to start. Important is to start apache after MySQL. Question on serverfault

You can try to reinstall LAMP stack and immediately test with a reboot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .