1

I have installed Linux Mint 18.1 Serena and I have XAMPP 5.6.28-1 on my computer. After I turn on my computer, I must run the XAMPP control panel and I must start Apache and MySQL manually.

Does anyone know how this can be done automatically? I don't want to turn on Apache and MySql every time when I start / restart my computer.

0

Instead of using XAMPP you should use apache2, mysql-server, mysql-client, php5, phpmyadmin applications from repository of your distro. They will start automatically
. sudo apt-get install apache2 sudo apt-get install php5 libapache2-mod-php5 sudo service apache2 restart
or just reboot your PC
sudo apt-get install mysql-server mysql-client sudo apt-get install phpmyadmin

  • above commands will install php 7 which I didn't wanted. I am web developer and I need specific php and mysql version installed. That's why I install xampp 5.6.28-1 And neither apache or mysql starts automatically. Any help? – user2417624 Jan 22 '17 at 14:38
  • Are you sure? Version of PHP is indicated in packages name, you couldn't get php7 if you are installing php5. – Areso Jan 22 '17 at 17:12
  • Well: Line 1: sudo apt-get install apache2 Answer: Package 'apache2' has no installation candidate – user2417624 Jan 22 '17 at 22:38
  • Line 2: sudo apt-get install php5 libapache2-mod-php5 Answer: libapache2-mod-php5 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source – user2417624 Jan 22 '17 at 22:39
  • As you can see, I was unable to install older version of php, so I install XAMPP – user2417624 Jan 22 '17 at 22:40
-1

For Auto-start on boot/reboot, the following process will worked for me in Ubuntu 13.04 and XAMPP 1.8.1.

  1. Create a script in init.d called lampp

sudo gedit /etc/init.d/lampp

  1. Paste this code on the script and save

#!/bin/bash /opt/lampp/lampp start

  1. Give -x permissions to the file

sudo chmod +x /etc/init.d/lampp

  1. Use update-rc.d to install init scripts to all runlevel by typing

sudo update-rc.d lampp defaults

  • As it is any value your answer might have is gone when (not if) the link dies. Please provide a self-contained answer. – Anthon Jan 23 '17 at 20:29

Your Answer

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