Public domain
First time initial :
# mkdir -p /usr/ports
# rm -rf /usr/ports/*
# mkdir -p /usr/ports/packages
# portsnap fetch
# portsnap extract
Doing update :
# portsnap fetch
# portsnap update
# cd /usr/ports/ftp/wget
# make install clean && rehash
# cd /usr/ports/www/links
# env BATCH="YES" make install clean && rehash
# cd /usr/ports/sysutils/screen
# cd /usr/ports/misc/gnu-watch/
# cd /usr/ports/net/tcptraceroute
# cd /usr/ports/net/mtr
# cd /usr/ports/security/nmap
# cd /usr/ports/ftp/ncftp3
# make PREFIX=/usr/local/example install clean
# make rmconfig
# make config
# make showconfig
# make deinstall
or
# pkg_delete wget-1.11.2
# cd /usr/ports/ports-mgmt/portupgrade
# make install clean && rehash
# portsclean -C
# portsclean -D
# portsclean -DD
# less /usr/ports/UPDATING
# pkg_version -v
# portversion -l "<"
# pkgdb -F
# portupgrade -airR
[ http://www.onlamp.com/pub/a/bsd/2003/08/07/FreeBSD_Basics.html ]
[ http://www.onlamp.com/pub/a/bsd/2003/08/28/FreeBSD_Basics.html ]
# cat /usr/local/sbin/port-update
#!/bin/sh
/usr/sbin/portsnap fetch # fetch can be Replace with cron
/usr/sbin/portsnap update
/usr/local/sbin/pkgdb -F
/usr/local/sbin/portversion -l "<"
env BATCH=yes /usr/local/sbin/portupgrade -avrRpP
/usr/local/sbin/portsclean -C
/usr/local/sbin/portsclean -D
/usr/local/sbin/portsclean -DD
BY: Pejman Moghadam
TAG: port-collection
DATE: 2007-07-25 11:10:17