Differences
This shows you the differences between two versions of the page.
freebsd_ports [2013/07/11 14:24] |
freebsd_ports [2013/07/11 14:24] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== FreeBSD Ports ====== | ||
+ | * [[FreeBSD]] | ||
+ | * [[FreeBSD Knobs]] | ||
+ | * [[FreeBSD Packages]] | ||
+ | * [[FreeBSD Ports Upgrades]] | ||
+ | |||
+ | * [[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html|Using the ports system]] | ||
+ | |||
+ | == Download ports tree == | ||
+ | |||
+ | <code> | ||
+ | portsnap fetch | ||
+ | portsnap extract | ||
+ | </code> | ||
+ | |||
+ | == Update ports tree == | ||
+ | |||
+ | <code> | ||
+ | portsnap fetch | ||
+ | portsnap update | ||
+ | </code> | ||
+ | |||
+ | == Upgrading packages installed with ports == | ||
+ | |||
+ | List outdated ports: | ||
+ | |||
+ | <code> | ||
+ | pkg_version -v | ||
+ | pkg_version -vIL= | ||
+ | </code> | ||
+ | |||
+ | Install portmaster. Portmaster is designed to use the base system of FreeBSD. | ||
+ | |||
+ | <code> | ||
+ | cd /usr/ports/ports-mgmt/portmaster | ||
+ | make install | ||
+ | </code> | ||
+ | |||
+ | List all installed software and search for updates: | ||
+ | |||
+ | <code> | ||
+ | portmaster -L | ||
+ | </code> | ||
+ | |||
+ | Upgrade all ports at once: | ||
+ | |||
+ | <code> | ||
+ | portmaster -a | ||
+ | </code> | ||
+ | |||
+ | Use portmaster to install a package, and upgrade all dependencies if necessary: | ||
+ | |||
+ | <code> | ||
+ | portmaster shells/bash | ||
+ | </code> | ||
+ | |||
+ | == Find the location of a port == | ||
+ | |||
+ | <code> | ||
+ | whereis name | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
+ | ls /usr/ports/*/name | ||
+ | </code> | ||
+ | |||
+ | == Download port distfiles == | ||
+ | |||
+ | <code> | ||
+ | make fetch | ||
+ | </code> | ||
+ | |||
+ | == Uninstall a port == | ||
+ | |||
+ | <code> | ||
+ | make deinstall | ||
+ | </code> | ||
+ | |||
+ | == Reinstall a port after it's been built == | ||
+ | |||
+ | <code> | ||
+ | make reinstall | ||
+ | </code> | ||
+ | |||
+ | == Create a list of all ports == | ||
+ | |||
+ | <code> | ||
+ | find /usr/ports/ -type d -mindepth 2 -maxdepth 2 | grep -v CVS | grep -v Tools | sed -e 's/\/usr\/ports\///g' > ~/all-ports | ||
+ | </code> | ||
+ | |||
+ | == List installed packages == | ||
+ | |||
+ | <code> | ||
+ | pkg_info | ||
+ | </code> | ||
+ | |||
+ | == Update search ports index == | ||
+ | |||
+ | <code> | ||
+ | cd /usr/ports && make index | ||
+ | </code> | ||
+ | |||
+ | == Search ports == | ||
+ | |||
+ | <code> | ||
+ | cd /usr/ports | ||
+ | make search name=<name> | ||
+ | make search key=<key> | ||
+ | </code> | ||
+ | |||
+ | == Display out of date packages == | ||
+ | |||
+ | <code> | ||
+ | pkg_version -v | ||
+ | </code> | ||
+ | |||
+ | == Package configuration == | ||
+ | |||
+ | Modify configuration: | ||
+ | |||
+ | <code> | ||
+ | make config | ||
+ | </code> | ||
+ | |||
+ | Output configuration settings: | ||
+ | |||
+ | <code> | ||
+ | make showconfig | ||
+ | </code> | ||
+ | |||
+ | Reset configuration: | ||
+ | |||
+ | <code> | ||
+ | make rmconfig | ||
+ | </code> | ||
+ | |||
+ | == Build with default options == | ||
+ | |||
+ | <code> | ||
+ | make -DBATCH | ||
+ | </code> | ||
+ | |||
+ | == Build with specific options == | ||
+ | |||
+ | <code> | ||
+ | make -DBATCH -DWITHOUT_FOO -DWITH_BAR | ||
+ | </code> | ||
+ | |||
+ | == Install Kernel Sources == | ||
+ | |||
+ | <code> | ||
+ | cd /usr/ports/devel/subversion && make install | ||
+ | svn checkout http://svn.freebsd.org/base/stable/9 /usr/src | ||
+ | </code> | ||
+ | |||
+ | == cron == | ||
+ | |||
+ | Tell cron to check for release updates nightly. The system will send an email if there are any to apply. | ||
+ | |||
+ | <code> | ||
+ | echo "# Security updates" >> /etc/crontab | ||
+ | echo "@daily root freebsd-update cron" >> /etc/crontab | ||
+ | </code> | ||
+ | |||
+ | == Run make clean on all dependencies == | ||
+ | |||
+ | <code> | ||
+ | make clean-depends | ||
+ | </code> |