![]() |
Now serving 104 guides. |
|
Installing Applications General Information Coming from a Linux or Windows background, many people begin to wonder where to get and how to install applications on FreeBSD. Well, with FreeBSD most applications can be installed from the Internet so you don't have to find the tarballs. There are two different installation methods to choose from and they both do a great job dealing with dependancies.Requirements
Ports The ports tree is a collection of useful programs that have been ported to FreeBSD. These are not the binary packages, but the source to compile from. The advantage of ports is that you can compile a program tailored to your system, as apposed to somebody else's.Installation When users first install FreeBSD, many of them forget to install the ports tree. This is probably because they are new to the system and didn't know what the ports tree was. Install the ports tree if you haven't yet.
Configure -> Distributions -> Ports. Select OK and then the installation media you wish to use. I used the installation CD. Once your ports tree is installed, exit sysinstall and portsnap your tree to make sure it's up-to-date.Usage The ports tree is located at/usr/ports and it is organized by category/port. For instance, you will find Apache2 located in /usr/ports/www/apache2. If you know what you want to install but you don't know where it's located in the ports tree, you can issue:
/usr/ports/security/nmap and now I can install it. Once you know what you want to install and where it's located, let's install it.
make simply compiles the program from source. install tells make to install the package after it's compiled. Finally, clean tells make to clean up after itself as it creates files and directories during the compiling process. If there are missing dependancies, make will also grab and install them.Note: An alternate is to run Note: You can compile various ports with additional configuration options so it is a good idea to read the Makefile before you install the port. That's all there is to it. You will see a lot of compiling text scroll by and eventually your command prompt will return to you. At that time, you will know your package was installed and is ready to be used.Now you can just as easily uninstall your application, say nmap, using the ports tree.
Packages FreeBSD packages are the binary versions of the ports. This means somebody precompiled the application and so the installation goes by a lot quicker. There is no waiting for it to compile on your own system -- it just gets installed. This also means you cannot add or remove any special compiling options for the package, such as qmail.Usage Installation and removal is quite simple. To install a package, say nmap, and grab the tarball from the Internet you would just issue:
-r tells pkg_add to grab nmap from a remote location. It will do just that: grab the tarball from a remote site, unpackage it, and install it. If there are any missing dependancies, pkg_add will grab those as well.Now, if you are wanting to uninstall a package you once installed, say nmap, you will have to issue:
Note: You must specify the package with the version number as it appears in Author: Jon LaBass Find this guide useful?
Support the author: |
Copyright 2003 - 2008 BSD Guides. All rights reserved. |
About | Terms of Use | Privacy | Contact |

