FreeBSD: How to upgrade the ports
Nessun commento » FreeBSD , Open Source , Tips & Tricks No Comments »
Before plunging headlong into the world of Debian GNU / Linux a few years I have worked almost exclusively with FreeBSD , I continue to use some of the servers hosting critical applications.
How to (almost) everyone knows, FreeBSD provides two distinct mechanisms for the installation of applications: the system of Packages for installation of prebuilt packages and the tree of Ports Installation autocompilante. The first method of package management resembles in all respects to those adopted by the major Linux distros. For those who normally work with Slackware similarities are particularly apparent, as evidenced by the screenshot of a page of `sysinstall` I reproduce below.
A different case of ports, which in a sense are the "real" instrument management software under FreeBSD. The management of ports allows you to download locally the tree, the tree that is full of instructions for preparation and installation, broken down by categories of software. In each port discharged into the local tree is a description of the dependencies and the skeleton code. Through a series of simple commands you can install, uninstall, reinstall, delete, update any installed program on the server, including the core operating system services.
For proper maintenance of the ports is good dell'alberatura establish a mechanism for updating the tree. First, make sure that the ports are installed on the server, otherwise think about us:
# pkg_add -r cvsup-without-gui
# mkdir /usr/ports
The first command will install CVSup, FreeBSD software with which you handle the versioning of the port.
Now proceed to the population of dell'alberatura updated ports:
# cvsup -L 2 -h cvsup9.FreeBSD.org /usr/share/examples/cvsup/ports-supfile
Often, after many seconds of inactivity, the command returns a connection error. Do not worry, in this case, wait a few seconds or try to change the repository by scaling from 9 - theoretically the least used - down:
# cvsup -L 2 -h cvsup8.FreeBSD.org /usr/share/examples/cvsup/ports-supfile
# cvsup -L 2 -h cvsup7.FreeBSD.org /usr/share/examples/cvsup/ports-supfile
# cvsup -L 2 -h cvsup6.FreeBSD.org /usr/share/examples/cvsup/ports-supfile
# cvsup -L 2 -h cvsup5.FreeBSD.org /usr/share/examples/cvsup/ports-supfile
# cvsup -L 2 -h cvsup4.FreeBSD.org /usr/share/examples/cvsup/ports-supfile
[...]
By repeating this simple procedure every time we want to make a full update of the ports we will always have updated software available for our FreeBSD server. If we, for example, install the latest version of `mutt`, the popular e-mail management program from the command line, proceed as follows:
# cd /usr/ports
# make search name=Mutt
# cd mail/mutt
# make install clean
Done ... ![]()








