3

How can I install XAMPP in another Linux path other than the default /opt/ which is I guess Ubuntu's OS drive folder.

In Windows, I have C drive for Windows and a D drive for XAMPP. Therefore if I mess up the OS, my database and htdocs are safe.

I have searched Google but not able to found how to install the complete XAMPP on another partition.

I know we can change the htdocs folder and set the path in httdp.conf file, but I also want to save the database folder in my XAMPP based drive.

Please guide, thanks.

SharpC
  • 115
Bsienn
  • 39
  • 1
    This is one of many reasons I would always suggest to use our native LAMPP stack. Is is pre-configured for Ubuntu and comes with sane defaults ( https://help.ubuntu.com/community/ApacheMySQLPHP ) – Rinzwind Oct 23 '13 at 13:39

3 Answers3

1

This is exactly what do you want:

open terminal using ctrl +alt +T

Change the root permission for that folder permanently :

sudo chown -R $LOGNAME /opt/lampp

Now you don't have to give permissions repeatedly for lampp directory. Move the xampp folder to your desired directory then create a symbolic link to that folder

sudo mv /opt/lampp yourDirectory
sudo ln -s yourDirectory /opt/lampp

Its all done.

But This doesn't seem anything natural to me. You can use the following instruction if you want to keep stick with Xampp. My suggesion is using bitnami lampp you can choose here location of your installation. so in this way you can install lamp in anywhere and doesn't need permissions everytime. https://bitnami.com/stack/lamp

To make bitnami lamp behave like Xampp do the following changes:
Track every changes instantly:

To disable PageSpeed, uncomment by removing '#' the following lines in your httpd.conf (installdir/apache2/conf/httpd.conf)

   #Include conf/pagespeed.conf
   #Include conf/pagespeed_libraries.conf

To disable OPCache, change opcache.enable in your php.ini file and set it to 0 (installdir/php/etc/php.ini

Do some other changes (such as showing error in php):

open installdir/php/etc/php.ini and change all values to devolopment values to do this read the comments in that file.

Default phpmyadmin username for bitnami lamp: root

1

which is I guess Ubuntu's OS drive folder.

No, it is defined by the Filesystem Hierarchy Standard. See: How to understand the Ubuntu file system layout? All installations that are foreign to the operating system should default their installation path to /opt.

How can I install XAMPP in another Linux path other than the default /opt/ ...?

You must install Xampp in /opt/lampp since this is hard coded in some binary files but nothing is stopping you from symlinking it though. Example:

ln -s /some/random/directory/lampp /opt/lampp
SharpC
  • 115
Rinzwind
  • 299,756
0

Dude, you can move the lampp folder to the root of the partition then mount the partition to the ubuntu's /opt folder like this in terminal: "mount /dev/sdb4 /opt" or if you have other software folders in /opt such as wine or whatever, you could move all the contents of the lampp folder to the root of your partition then create a folder in /opt called lampp and run the following in terminal: "mount /dev/sdb4 /opt/lampp".

wert
  • 1