Tips:
/usr/ports/UPDATING
file before upgrading. There might be some significant changes in programs you use or in their configuration which will break your current setup.portsnap fetch
portsnap extract
portsnap update
0 3 * * * root /usr/sbin/portsnap cron
cd /usr/ports
svnlite checkout https://svnweb.freebsd.org/ports/head .
FreeBSD Ports team freeze ports tree every 3 months. To get this ports tree you can use ports branches:
cd /usr/ports
svnlite checkout https://svnweb.freebsd.org/ports/branches/2016Q4 .
cd /usr/ports
fetch http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/11.0-RELEASE/ports.txz
tar xJvf ports.txz
git clone https://github.com/freebsd/freebsd-ports
cd /usr/ports
make search key=apache
cd /usr/ports
make search name=apache24
Official FreeBSD ports website (http://freshports.org/) give you a nice way to find ports and all information concerning it.
If you have found your software in the ports tree, now its the time to build it.
cd /usr/ports/www/apache24
make
make install
cd /usr/ports/www/apache24
make BATCH=yes
make install
If you want custom configuration from ports, you can configure it before building it make config
. All ports configuration are stored in /var/db/ports/${CATEGORY_NAME}/options
as makefile.
www/apache24
cd /usr/ports/www/apache24
make config
make
make install
This configuration will be saved in /var/db/ports/www_apache24/options
.
You can make your own package based on ports.
cd /usr/ports/www/apache24
make package BATCH=yes
This command will store your package in /usr/ports/packages/All
.
poudriere
poudriere
is currently the official package builder for FreeBSD.
pkg install poudriere
# or
cd /usr/ports/ports-mgmt/poudriere
make
make install
poudriere
configuration is stored in /usr/local/etc/poudriere.conf
and /usr/local/etc/poudriere.d
poudriere jail -c -j myjail
poudriere jail -u -j myjail
poudriere ports -c -p myports
poudriere ports -u -p myports
poudriere bulk -j myjail -p myports www/apache24