Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
^^ 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.
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.
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.