이 블로그 검색

월요일, 6월 25, 2012

[Linux] mysql data migration

to find out where the mysql data located,
#vi /etc/my.cnf
datadir=/var/lib/mysql/

in order to backup the data,
#tar fvcz mysql.bak.tar.gz /var/lib/mysql

and go to the new server, on your directory or desired one,
#tar fvxz mysql.bak.tar.gz

doing this, all the mysql accounts will be transffered as well.
Check if you can connect to mysql with your credential you used to use on the old server.


일요일, 6월 17, 2012

[Linux]NFS

#apt-get install nfs-kernel-server nfs-common rpcbind

[Server side]
in /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync) hostname2(ro,sync)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt)
# /srv/nfs4/homes  gss/krb5i(rw,sync)
#
/home           192.168.0.101(rw,sync,no_root_squash)
/var/nfs        192.168.0.101(rw,sync)
 
(The no_root_squash option makes that /home will be accessed as root.)
Whenever we modify /etc/exports, we must run

#exportfs -a

afterwards to make the changes effective.

[Client side]
mkdir -p /mnt/nfs/home
mkdir -p /mnt/nfs/var/nfs
Afterwards, we can mount them as follows:
mount 192.168.0.100:/home /mnt/nfs/home
mount 192.168.0.100:/var/nfs /mnt/nfs/var/nfs

 

[MS Windows]Where putty stores its data

HKEY_CURRENT_USER\Software\SimonTatham\PuTTY