Saturday, May 4, 2013

Ubuntu Clean Installation & moving data

1. Install lamp
   apt-get install tasksel
2. Moving /var/www
2. Moving database

     a. Stop mysql service
         sudo /etc/init.d/mysql stop
     b. Backup current database
         cp -Rp /var/lib/mysql /var/lib/mysql.backup
     c. Copy the database
         cp -Rp /mountpoint/var/lib/mysql /var/lib/mysql
     d. Start mysql service
         /etc/init.d/mysql start

    cp /etc/my.cnf  or /etc/mysql/my.cnf 

3. Install & moving FTP
    apt-get install vsftpd
mkdir /srv/ftp
usermod -d /srv/ftp ftp 
/etc/init.d/vsftpd restart
vi                 /etc/vsftpd.conf
touch /etc/vsftp.chroot_list 
vi /etc/vsftp.chroot_list

service vsftp restart
create user
useradd  it
usermod -d /home/it/ftp it
usermod -G ftp,it it
4. Moving vitualbox
 apt-get install virtualbox
cp /home/vm/xp_pro.vdi

5. Install Teamviewer

6. Moving Thunderbird
cp -Rp /home/fadabi/.thunderbird /home/new/

10.  Copy firefox
cp -Rp /home/fadabi/.mozila/firefox/*.default /home/fadabi/.mozila/firefox/
vi profiles

7. Moving Mysql database
/etc/init.d/mysql stop
cp -Rp /var/lib/mysql /home/newdb
rm /home/newdb (to remove file, leave only dir)
vi /etc/mysql/my.cnf  (chang to new datadir to /home/newdb)

8. Install teamviewer

9.Install virtual box
apt-get install virtualbox
cp -r /old/vmbox /new/vmbox

No comments: