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.

  • 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. – ThatGuy Feb 25 '17 at 5:24
  • Sorry I didn't get you. Please explain what you are suggesting. I'm totally new to Linux(Ubuntu). – Ganesh Aher Feb 25 '17 at 5:28
  • Please run: sudo systemctl status apache2 from the terminal and let me know what response you get, post into your question... – George Udosen Feb 25 '17 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) – Ganesh Aher Feb 25 '17 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 – ThatGuy Feb 25 '17 at 6:14
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.