Well,
Since gotten my new fiber ( with the purchase of a new router ), i guess it's time to retire my old TP Link Router... But... Wait... What if i can make it be my downloader machine?
Lets go install openwrt!
And let's OPKG the following:
blkid - 2.21.2-1
block-mount - 0.2.0-9
kmod-fs-ext4 - 3.3.8-1
kmod-lib-crc16 - 3.3.8-1
kmod-scsi-core - 3.3.8-1
kmod-usb-storage - 3.3.8-1
libblkid - 2.21.2-1
libpcap - 1.1.1-2
libuuid - 2.21.2-1
swap-utils - 2.21.2-1
tcpdump - 4.2.1-3
Well, time to format my thumbdrive to ext4 and create a stupid script to fetch somewhere to download!
Sunday, September 14, 2014
Wednesday, September 10, 2014
Pushing mysqldump to another server!
Server 1 need to mysqldump to server 2.
HOW HOW HOW!
mysqldump DBNAME tablename | ssh root@remoteserver.com "mysql -D dbname"
Best to use the authorized keys to ssh! So no need password lah!
HOW HOW HOW!
mysqldump DBNAME tablename | ssh root@remoteserver.com "mysql -D dbname"
Best to use the authorized keys to ssh! So no need password lah!
SSH Login without password!
On server 1
ssh-keygen -t rsa
Leave password blank
Generating public/private rsa key pair. Enter file in which to save the key (/home/root/.ssh/id_rsa): Created directory '/home/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again:
Your identification has been saved in /home/root/.ssh/id_rsa. Your public key has been saved in /home/root/.ssh/id_rsa.pub. The key fingerprint is: XXXXXXX
SSH to server 2 and make directory
ssh root@server2 mkdir -p .ssh
Cat your server 1 key to there
cat .ssh/id_rsa.pub | ssh root@server2 'cat >> .ssh/authorized_keys'
To test on server 1
ssh root@server2
Subscribe to:
Posts (Atom)