Page 1 of 1

Installing in other places than /opt/

PostPosted: 06. December 2006 17:30
by kulgan
I have an external hard drive that I would like to use as the server - is it possible to install XAMPP in a different folder? Will the settings be changed according to the -C option used when untarring, or will I have to mount the hard drive to /opt to do this?

Thanks,
-K

PostPosted: 08. December 2006 06:08
by underdone
This should do it for you.
Code: Select all
tar xampp-linux-xx.xx.xx.tar.gz -C /pathtodirectory/
Just make sure that you keep the settings consistent for wherever you install it.

PostPosted: 08. December 2006 12:37
by kulgan
So I won't have to edit every single file after that?

Re: Installing in other places than /opt/

PostPosted: 10. December 2006 01:27
by Dave_L
kulgan wrote:external hard drive that I would like to use as the server


I think XAMPP needs to be installed in /opt.

But you can relocate the web document directory from /opt/lampp/htdocs to somewhere else. Just edit /opt/lampp/etc/httpd.conf and search for instances of "/opt/lampp/htdocs".

If you want to support other services such as FTP, you may need to change other config files.

PostPosted: 10. December 2006 19:41
by kulgan
I think I will just start mounting the usb drive as opt, then :/

Might have to move a couple things, but I'm planning a reformat soon anyway, so I guess it doesn't matter.

Thanks, y'guys.

PostPosted: 11. December 2006 03:37
by rickh57
With Linux, you can create a symbolic link from /opt to wherever you want to install XAMPP. That's how I have it set up.

PostPosted: 11. December 2006 17:40
by kulgan
doesn't that just do one file?

Code: Select all
ln -s target name


never worked for more than that with me - what should I be using?

Thanks :D

PostPosted: 11. December 2006 18:10
by rickh57
You just need to create a symbolic link to a directory somewhere. For example, if you want to have opt under the home directory, you'd create a directory called opt under /home.

Then, as root, you'd create the symbolic link to the new opt directory:
ln -s /home/opt /opt

PostPosted: 11. December 2006 18:28
by kulgan
Well, I did that, but it seems there are permission errors with copying stuff, so it didn't copy the right files to the right places :/

However, what you suggested did work - I guess that I just didn't use slashes or soemthing... :shock:

I'll try installing in /opt as usual, then moving.

PostPosted: 11. December 2006 18:36
by rickh57
If you create the /opt symbolic link BEFORE installing, you shouldn't need to move anything. All of the configuration files will look in /opt and the symbolic link will resolve to the correct location.

PostPosted: 11. December 2006 19:03
by kulgan
That's an interesting idea - I can't seem to be able to copy anything anyways - with nautilus or command line :/

so, before untarring,

ln -s /media/DATA/lampp /opt/lampp ?
and then
tar -zxvf xampp.... -C /opt ?

thanks

PostPosted: 11. December 2006 19:23
by kulgan
well, I figured it out -

ln -ls /media/DATA/lampp /opt
tar -zxvf /home/user/Desktop/xampp.tar.gz -C /opt

and it installed on the external hard drive.

However, it wouldn't copy some of the files (e.g.

"lampp/share/terminfo/x/xterm-8bit
tar: lampp/share/terminfo/x/xterm-8bit: Cannot open: No such file or directory"

, and now it won't start Apache...

PostPosted: 11. December 2006 19:35
by Dave_L
Did you perform the commands as root? Is the external drive partitioned as a linux file system such as ext3 or reiserfs (rather than fat32)?

Personally, when extracting a .tar, rather than figuring out how to make tar use a particular destination, I find it easier to extract into a temp directory, and then I move the extracted files where I want.

PostPosted: 11. December 2006 19:46
by kulgan
everything was done as root, there have been no problems prior to this with copying anything. The filesystem is vfat in the disk manager, and fat32 in gparted. Doesn't sound good :/

I will try the first way again...
It seems that it is the links making the problems. Does fat32 not use them, by any chance? Great... Just great...

PostPosted: 13. December 2006 00:34
by Kristian Marcroft
Hi,

Symlinks to FAT32 Partitions are not possible AFAIK.
And FAT32 does not support the permission management which is required on Linux. Please use a ext2/3 Partition.

Regards,
Kristian Marcroft