The makers of FreeBSD have compiled a collection of
contributed applications (ports) that have been designed to easily install and
run on the FreeBSD operating system. The ports are located in the /usr/ports directory of your VPS v2 Virtual Server, and are sorted
by categories.
Although some ports may not be compatible with the VPS v2 Virtual Server
environment, many are. Popular programs available in the ports collection are
Webmin, Mutt, Curl, and various Apache modules.
Use the pkg_info
command to find out which ports you have installed, or get details about ports
available. Use the make install command to install a port you want to use.
Checking to see which Ports are Installed
To see a list of several ports, most of which are
installed by default on your VPS v2 Virtual Server, type:
# pkg_info
An example of the output of pkg_info appears in the following format:
automake14-1.4.5_9 GNU Standards-compliant Makefile
generator (legacy version
bash-2.05b.004 The GNU Bourne Again Shell
cvsup-16.1e A general network file distribution
system optimized for CV
gmake-3.80 GNU version of 'make' utility
gnupg-1.2.1 The GNU Privacy Guard
Obtaining Information about a Port
To obtain specific information about a port, type:
# pkg_info [package-name version]
Installing a Specific Port - Curl
After you have decided to install a specific port, you
must compile it, using the make command. (You must be the root user to install
ports.)
# cd /usr/ports/[packagegroup]/[package]
# make install
# make distclean
The following example builds and installs the curl
program.
# cd /usr/ports/ftp/curl
# make install
# make distclean
Make sure you are in the correct directory, or make will
not be able to find the Makefile that it requires. The make command on its own
will go through the first steps of checking dependencies (other required
programs), installing any that are not already there, and setting up the
environment and compiling the program. Once that is complete, make install
actually installs the program and sets up the initial configuration settings.
Finally, make distclean removes all the temporary files that were used during
the make and make install.
Note: Do not type make
install at /usr/ports or make will install
every port, thus filling your quota almost instantly. You do not want to do
that!
Owning your Own Ports Collection
If you would like to own your own ports collection, type
the following:
# rm /usr/ports (remove the symlink /usr/ports ->
/ports)
# relink /ports /usr/ports
Now you can have your own ports collection just like the
one in /skel. If you want to freeze a port, you can do it. If you modify a Makefile or any other source file, you own it,
and you own the responsibility for maintaining it.
If ever you want to make sure everything is up to date type:
# relink /ports /usr/ports
to freshen the ports, or:
# vunlink /usr/ports
# ln -s /ports /usr/ports
to put ports back the way they are at provisioning.
Removing a Contributed Package
To remove the contributed package, go to the port
directory and type
# pkg_delete [application].
The following example removes the counter.
# cd /usr/local/apache/cgi-bin
# pkg_delete counter
For more information on the FreeBSD Ports Collection, go
to:
|