Wednesday, November 11, 2009

FreeBSD - keep update with CVSUP

#cd /usr/ports/net/cvsup-without-gui
#make
#make install clean
#cp /usr/share/examples/cvsup/ports-supfile /root/ports-supfile
#nano /root/ports-supfile

content of ports-supfile
---------------------------------------------------
*default tag=.
*default host=cvsup3.tw.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_7
*default delete use-rel-suffix
*default compress
src-all
ports-all tag=.
---------------------------------------------------

save and exit.

#reboot

#cvsup -g -L 2 /root/ports-supfile

done.

If you add any of the ports or doc collections to this file, be sure to specify them with a "tag" value set to ".", like this:

ports-all tag=.
doc-all tag=.

If you leave out the "tag=." portion, CVSup will delete all of the files in your ports or doc tree. That is because the ports and doc collections do not use the same tags as the main part of the FreeBSD source tree.

For more explanation, please refer to /usr/share/examples/cvsup/stable-supfile file.

Tuesday, November 10, 2009

Rsync using ssh with different port number

rsync -avz -e "ssh -p 2222" user@hostname.com:/remote-path /local-path

Thursday, November 5, 2009

Put a process in background from SSH

to put a process/command in background , and still running although ssh connection terminated, give this command:

#nohup command &