• Rob's side project: I recently started Gun-Forums.com and we currently have a $100 raffle - if you're into guns, join up and enter the raffle to win $100.00. Gun Forums

Setting up new box

clgarron

New Member
Hi all,
I am a beginner Linux user with an Ubuntu box (14.06) running as a backup server. I need to upgrade my hardware as I am running out of hard drive space on the old box.
What I am asking for are some instructions on installing the LAMP stack and moving my directories from the old to the new.
 


captain-sensible

Well-Known Member
hey @cigarron doesn't sound that your a beginner Linux user if you have a backup server. :^) . A beginner is someone who has windows and doesn't eve have linux ?

I have symfony 5, Codeigniter4 , and others running on apache via virtual host for dev but thats on slackware . I've seen command for ubuntu something like apt install php MySQL ..etc so guess its not that difficult . Approaches are going to be different and of course the database is going to be one problem.

So it depends whats on your sever; but say you have several directories in htdocs or equivalent, eg a directory containing a php framework inside a dir called "CI" , that connects to MySQL. Then you could do something like:

cd /var/www/htdocs/CI

zip -r symfony5Bk.zip .

Notice trailig "."

tha would zip everything inside CI, which could be extarcted to another dir later. Then using phpMyadmin you just do a full export of database , with data and schema.

Then when you install apache lamp , it would be a case (for php) of creating dirs, putting zipped files int othem and just importing database back via phpmyadmin
 

clgarron

New Member
captain-sensible, thank you for getting back to me so quickly and I will give this a try and let you know how it flies!!!
I am just beginning to get a handle on Linux as part of my job as a Systems Analyst. It's been mostly break and fix at the desktop support level, have to sharpen my skills for my new duties.
 

captain-sensible

Well-Known Member
well your welcome its just one approach ; others on here will have other ways. But of course you have nothing to loose by asking. in my own situation i just thought of something - i recently did a complete system upgrade and at a question choose : keep old config or new; i went for new. Which meant i had to manually edit config files. With apache the relevant config files for slackware were /etc/httpd/htddpd.conf and /etc/httpd/extra/httdp-vhosts.conf i'e now kept up backup for those files. one way of getting a copy is as normal user $ and using cat command.

$ cat /etc/httpd/httpd.conf > /home/andrew/Desktop/httpd_bk.txt

cat command opens up file and via > puts copy into user"andrew" Desktop into httpd_bk.txt
 
Last edited:


Staff online

Members online


Latest posts

Top