NOTE: Before you install any programs from the Ports Collection, we encourage you to read our Installation Support Boundaries.
The Ports Collection, available only on Freedom 400x and above, provides access to source code and software patches for more than 3,000 applications. With a single command, the source code and patches are retrieved to your server from our private repository, the application is compiled and installed for you with little intervention, if any, required from you. Additionally, any other applications that are required for the selected application to function are also downloaded, built, and installed for you.
To access the Ports Collection and install an application from it, you must be logged into your Freedom server as the Superuser. The Ports Collection is contained in your /usr/ports directory. The applications are organized into categories, as can be seen by listing the contents of this directory:
%cd /usr/ports
%ls
INDEX editors packages
LEGAL emulators palm
Makefile french ports
Mk ftp print
README games pub
Templates german russian
Tools graphics security
YEAR2000 hebrew shells
archivers irc sysutils
astro japanese textproc
audio java vietnamese
benchmarks korean www
biology lang x11
cad mail x11-clocks
chinese math x11-fm
comms mbone x11-fonts
converters misc x11-servers
databases net x11-toolkits
deskutils newpreinstalled x11-wm
devel news
%
If you want to see if your favorite application is available in the Ports Collection, or you’re not certain what category the application you are interested in would be found, you can perform a search by keyword.
Suppose you are interested in installing an application to allow you to perform Zmodem file transfers through a Terminal emulation program like SecureCRT. You could perform a search for such an application as shown below:
%cd /usr/ports
%make search key=zmodem
Port: lrzsz-0.12.20
Path: /usr/ports/comms/lrzsz
Info: Receive/Send files via X/Y/ZMODEM protocol. (unrestrictive)
Maint: obrien@FreeBSD.org
Index: comms
B-deps:
R-deps:
Port: zmtx-zmrx-1.02
Path: /usr/ports/comms/zmtx-zmrx
Info: Receive/Send files via ZMODEM protocol. (unrestrictive)
Maint: obrien@FreeBSD.org
Index: comms
B-deps:
R-deps:
Port: ztelnet-1.0.p3
Path: /usr/ports/net/ztelnet
Info: Telnet program with zmodem transfer
Maint: cjh@FreeBSD.org
Index: net
B-deps:
R-deps:
In this example, three matches were found, and from the description, it appears that the “zmtz-zmrx-1.02” application would likely fit your needs.
To install this application, you would change into the /usr/ports/comms/zmtx-zmrx directory, as indicated by the Path statement in the search results, and then would start the installation with the make install command, as shown in the following example:
%cd /usr/ports/comms/zmtx-zmrx/
%make install
The following type of output appears:
>> zmtx-zmrx.shar.gz doesn't seem to exist in /usr/tmp/usr/ports/distfiles/.
>> Attempting to fetch from ftp://portserver1.lightrealm.com/distfiles/.
Receiving zmtx-zmrx.shar.gz (34990 bytes): 100%
34990 bytes transferred in 0.0 seconds (2.23 MBps)
===> Extracting for zmtx-zmrx-1.02
>> Checksum OK for zmtx-zmrx.shar.gz.
shar: Extracting "CREDITS" (213 characters)
shar: Extracting "VERSION" (5 characters)
shar: Extracting "crctab.c" (7950 characters)
shar: Extracting "crctab.h" (726 characters)
shar: Extracting "makefile" (336 characters)
shar: Extracting "opts.h" (259 characters)
shar: Extracting "readme" (5244 characters)
shar: Extracting "release.notes" (3496 characters)
shar: Extracting "version.h" (85 characters)
shar: Extracting "zmdm.c" (19033 characters)
shar: Extracting "zmdm.h" (1801 characters)
shar: Extracting "zmodem.doc" (37474 characters)
shar: Extracting "zmodem.h" (5734 characters)
shar: Extracting "zmrx.1" (953 characters)
shar: Extracting "zmrx.c" (10374 characters)
shar: Extracting "zmtx.1" (832 characters)
shar: Extracting "zmtx.c" (12268 characters)
shar: End of shell archive.
===> Patching for zmtx-zmrx-1.02
===> Applying FreeBSD patches for zmtx-zmrx-1.02
===> Configuring for zmtx-zmrx-1.02
===> Building for zmtx-zmrx-1.02
gcc -O -DSUNOS4 -c zmtx.c
gcc -O -DSUNOS4 -c zmdm.c
gcc -O -DSUNOS4 -c crctab.c
gcc -O -DSUNOS4 zmtx.o zmdm.o crctab.o -o zmtx
gcc -O -DSUNOS4 -c zmrx.c
gcc -O -DSUNOS4 zmrx.o zmdm.o crctab.o -o zmrx
===> Installing for zmtx-zmrx-1.02
install -c -s -o root -g wheel -m 555 /usr/tmp/usr/virtual/share/usr/ports/comms/zmtx-zmrx/work/zmrx /usr/local/bin
install -c -o root -g wheel -m 444 /usr/tmp/usr/virtual/share/usr/ports/comms/zmtx-zmrx/work/zmrx.1 /usr/local/man/man1
install -c -s -o root -g wheel -m 555 /usr/tmp/usr/virtual/share/usr/ports/comms/zmtx-zmrx/work/zmtx /usr/local/bin
install -c -o root -g wheel -m 444 /usr/tmp/usr/virtual/share/usr/ports/comms/zmtx-zmrx/work/zmtx.1 /usr/local/man/man1
===> Generating temporary packing list
MCS allows you to use and copy/modify this source under the following
conditions:
- MCS or Jacques Mattheij shall not be liable for any damages arising
from the use of this code
- the archive must be distributed as a whole leaving version numbers intact.
please do not distribute modifications; mail them back to us for inclusion
in the next release which should follow each other fairly quickly in
the beginning
- you will not use this software for commercial purposes.
(commercial licenses are available contact us for info)
/* contact us through (in order of preference) */
/* */
/* email: jacquesm@hacktic.nl */
/* mail: MCS */
/* Prinses Beatrixlaan 535 */
/* 2284 AT RIJSWIJK */
/* The Netherlands */
/* voice phone: 31+070-3936926 */
===> Compressing manual pages for zmtx-zmrx-1.02
===> Registering installation for zmtx-zmrx-1.02
%
The application is now installed. To verify that the package has been installed, you can type pkg_info, which displays a list of all the applications that have been installed through either the vinstall command or through the ports collection. The applications that were preinstalled when your Freedom server was originally ordered also appear in the list.
During installing, files are placed in a subdirectory of /usr/tmp, and should be removed after installation unless you have a specific need to keep them. To do so, type the following after performing an installation:
%make clean
===> Cleaning for zmtx-zmrx-1.02
%make distclean
===> Cleaning for zmtx-zmrx-1.02
===> Deleting distfiles for zmtx-zmrx-1.02
%
If you do not “clean up” after yourself in this way, you may eventually run out of space on your virtual disk after installing many applications.
There are two ways that can be used to remove an application that you have previously installed through the Ports Collection. You must be logged in as the Superuser to do so.
The first method is to use the pkg_delete command. You must tell pkg_delete the name of the application to delete, including the version number. This information can be obtained by viewing the installed package list with the pkg_info command. For example, to delete the zmtx-zmrx-1.02 application that was installed in this example, the following command can be given:
%pkg_delete zmtx-zmrx-1.02
If you have modified any of the files that were originally created in the installation, you will see a warning from pkg_delete and those files will need to be removed manually.
The second way of removing an installed application from your server is to move into the appropriate subdirectory of the /usr/ports directory, and type make deinstall. An example of this follows:
%make deinstall
===> Deinstalling for zmtx-zmrx-1.02
%
Note that from time to time, the contents of the Ports Collection may change, and the version of an application you may have installed previously may no longer exist. In this case, you should remove the application with the pkg_delete command as explained in the previous section.