Formatting code for FreeBSDPorts


show source only

{{parent page="FreeBSD"}}
===Freebsd Ports===

===Ports downgrade===
Hot: http://www.rasyid.net/2008/04/15/downgrade-freebsd-ports/

=== Installing FreeBSD ports ===
%%
# mkdir /usr/ports
# cd /usr/ports
# ln -s /cdrom/ports/distfiles distfiles
# cd /usr/ports
# mkdir shells
# cp -R /cdrom/ports/shells/bash shells
# cd shells/bash
# make install

# Installing apache2.0
cd /usr/ports/www/apache20/
make install clean
%%

==Install precompiled ports from remote servers==
%%
export PACKAGEROOT=ftp://ftp.hk.freebsd.org
pkg_add -vr php5
%%

==Ports options==
Force install when package already installed.
%%
make PREFIX=/usr/local/zisquid install FORCE_PKG_REGISTER=yes
%%

=== Ports site ===
* http://www.daemonology.net/portsnap
* http://www.daemonology.net/freebsd-update
* http://dougbarton.us/portmaster.html
* http://www.freshports.org/sysutils/pkg_tree

=== Making ports package ===
http://www.onlamp.com/pub/a/bsd/2003/08/07/FreeBSD_Basics.html

1. Do a **make package** in the ports directory
2. It will install the port, and build a package under /usr/ports.packages
3. Copy the package over and install it with **pkg_add package.tbz**

===Installing FreeBSD packages===
The option -vr will attempt to download and install the named package for you.
%%
pkg_add -vr PACKAGE_NAME
OR
pkg_add downloaded_package.tbz
%%

=== Ports force install===
make FORCE_PKG_REGISTER=yes install clean

===Fetching a ports of a specific datetime===
Goto www.freshports.org, search for the package. then look for its release date using the PortsMon link
Then edit your supfile, add a date to the following tag, then do a cvsup or csup

%%
*default release=cvs date=2007.10.09.09.30.57
%%

==Ports disable vulnerability check==
%%
make DISABLE_VULNERABILITIES=yes
%%

===PortSnap===
One can use portsnap to update the freebsd ports tree, rather than the old shitty cvsup / csup.
%%
# Initial fetch
portsnap fetch
portsnap extract
# Periodic update
portsnap fetch update
%%


===PortUpgrade===
%%
portsnap fetch update
# extract new ports to /usr/port, pretty much like csup ports-all
portsnap extract
# update package db
pkgdb -F
# update index
portsdb -Uu
# upgrade all
portupgrade -a

# upgrade specific package
portupgrade -R package-name

# To see list of all outdated ports
portversion -l '<'
# or
portmaster -L

%%
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki