LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-30-2014, 09:11 AM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
How to move lampp to another server


I have a very old server running a website through lampp. This server is having problems, so I wanted to try to move the lampp setup into a virtual CentOS machine to see how easy or difficult it is to move this website for when we replace the server.

Only problem is, I'm not sure where to start. I have a .tgz of the /opt/lampp directory from the current server. Do I just need to extract that to the same location on the new server and everything should work?
 
Old 07-30-2014, 09:17 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Usually, you will need:

A copy of the /var/www/html directory (or whereever your php/html files are stored)
A copy of /etc/php.ini
A copy of /etc/httpd
A copy of rpm -qa output to know what programs and versions you have installed (in case you need ruby, php-mysql or something)
A dump of your database (mysqldump --all-databases > db.sql)

Last edited by szboardstretcher; 07-30-2014 at 09:19 AM.
 
1 members found this post helpful.
Old 07-30-2014, 09:22 AM   #3
shardik
LQ Newbie
 
Registered: Jul 2014
Posts: 6

Rep: Reputation: Disabled
^^ what he said +
don't forget about the database if the site uses one.
also, don't remove anything on the old server untill the complete site is fully functional (and tested) on it's new location.
 
1 members found this post helpful.
Old 07-30-2014, 09:24 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
I had a web application at a car company that made flash files,.. and it needed:
  • Mysql
  • Postgres
  • Exim
  • Postfix
  • C
  • C++
  • Ruby
  • Ruby-on-rails
  • Passenger
  • Php4
  • Php5
  • Erlang
  • Java

I never successfully re-installed an environment for it to work in. I just ended up making an image of the horrible thing.
 
1 members found this post helpful.
Old 07-30-2014, 10:55 AM   #5
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Thanks everybody.

Looks like all the actual html files and stuff are in opt/lampp/htdocs, and /var/www/html is empty too.

I'll grab a copy of /etc/php.ini and the folder /etc/httpd, and save off a rpm -qa

As far as any databases, I don't believe any are still being used off this server, but what's the best way to confirm that? I see a bunch of old stuff contained in opt/lampp/var/mysql but the time stamps are all very old.

I'm hoping to avoid the have to clone it because I can't get it to work scenario, but that is exactly why I made this post haha.
 
Old 07-30-2014, 11:12 AM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
On a smaller scale site you can grep through the php/html code to find references to mysql. From those results you should be able to see whether it is actively using mysql locally or remotely.

If it is a remote mysql instance, you will probably have to update the 'user'@'location' permissions in mysql.
 
1 members found this post helpful.
Old 07-31-2014, 09:59 AM   #7
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
what would be something I could grep for that would show me that though? just an @ sign for the credential part?
 
Old 07-31-2014, 10:14 AM   #8
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Literally mysql...

Code:
cd /var/www/html (or wherever your site files are)
grep -Ri mysql .
Read through the results and see if it is being used. If so, where? and so on...
 
1 members found this post helpful.
Old 07-31-2014, 10:49 AM   #9
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
oh, literally, thanks haha.

ok, i'll give it a shot and see what I can come up with.
 
Old 08-04-2014, 03:29 PM   #10
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
I'm not having much luck. I copied over the php.ini and httpd folder to my test virtual server. I extracted the tgz of my lampp directory into opt just like it is on the working server.

So now I tried a /opt/lampp/lampp start and get the following errors
Code:
/opt/lampp/share/lampp/phpstatus: /opt/lampp/bin/php: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
XAMPP: Starting Apache with SSL ...
XAMPP: Error 126! Couldn't start Apache!
XAMPP: Another MySQL daemon is already running
XAMPP for Linux started.
So I noticed it said MySQL was already running, so I tried to do an /etc/init.d/mysqld stop, then I stop lampp and start it, and I then get the same 126 stuff for Apache and then
Code:
/opt/lampp/bin/mysql.server: /opt/lampp/bin/my_print_defaults: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
/opt/lampp/bin/mysqld_safe: .bin/my_print_defaults: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
/opt/lampp/bin/mysqld_safe: .bin/my_print_defaults: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
nohup: redirecting stderr to stdout
I haven't even done anything yet and I'm fearing the worst haha
 
Old 08-04-2014, 04:08 PM   #11
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
As I mentioned, you would need:

Quote:
A copy of rpm -qa output to know what programs and versions you have installed (in case you need ruby, php-mysql or something)
In other words you have to install any programs that you need onto your new server. Using the above will give you a list of what was installed on your previous server, excluding anything that you might have built from source. From there you should be able to replicate your old environment.
 
Old 08-04-2014, 04:17 PM   #12
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
I do have that. But from those errors how can I tell what I need? Do the versions even have to match up? The server I'm going from is probably 10 years old, and I'm trying to un-tgz it onto a CentOS 6.5 machine.

Also, just for my knowledge, the way it was explained to me (which i'm starting to doubt was ever right) was that the whole point of using LAMPP was so everything was self-contained in LAMPP and worked independent of outside installs or server software, since everything was in LAMPP.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Joomla on a LAMPP server rubberducky Linux - Server 2 03-31-2014 12:10 PM
[SOLVED] How to install LAMPP so it shows up in /opt/lampp anon091 Linux - Newbie 3 09-24-2009 05:13 PM
Needing root privs to start LAMPP server paul2463 Fedora 1 08-13-2006 07:00 AM
Lampp for a production server? xpucto Linux - Newbie 9 06-10-2006 02:42 AM
seting up mail server on lampp (linux) ziggis-soft Linux - Software 5 05-24-2005 04:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration