FreeBSD 6.3 - Port collection usage =================================== Public domain ******************************************************************************** ### Updating ports collection using portsnap 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 ******************************************************************************** ### Port Installation example # 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 ******************************************************************************** ### Customizing port installation # make PREFIX=/usr/local/example install clean # make rmconfig # make config # make showconfig ******************************************************************************** ### Uninstalling ports # make deinstall or # pkg_delete wget-1.11.2 ******************************************************************************** ### Cleaning up # cd /usr/ports/ports-mgmt/portupgrade # make install clean && rehash # portsclean -C # portsclean -D # portsclean -DD ******************************************************************************** ### Updating ports # 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 ] ******************************************************************************** ### Port Collection Update script # 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_