pavement

Ports, Installing

From FreeBSDwiki
Revision as of 00:37, 20 January 2005 by Nvrmnd (Talk | contribs)
Jump to: navigation, search

See also: Ports

Installing software in FreeBSD is very easy if you use the ports tree. To use the ports tree you will first need to install it. If you have the ports tree installed on your system you should try and keep it updated with the most recent software.

Remember you can always get help with ports by typing:

> man ports

To install a specific program you can search the ports tree to see if there is a port.

> cd /usr/ports/
> make search name=bash
(listing of all the ports that have 'bash' in their name)
> make search key=bash
(listing of all the ports that have 'bash' anywhere in the description)

The top command will return a number of results that look something like:

Port:   bash-2.05b.007_2
Path:   /usr/ports/shells/bash2
Info:   The GNU Bourne Again Shell
Maint:  obrien@FreeBSD.org
B-deps: 
R-deps:

This listing tells you where the port you want to install is, in this case it is in shells/bash2. Now there are a number of things you can do to install a port such as

> cd /usr/ports/shells/bash2
> make install
(this will download, compile, and install the port and all of its dependencies)
> make clean
(this will clean up the port directory as well as dependencies after an install)
> make distclean
(same as clean but will remove the distfiles for the ports aswell)
> make extract
(this will just extract the port to a ./work drectory)
> make depends
(this will install (or compile) all of the dependencies of the current port)
> make install distclean
(commands can be written in sequence like this one to install a port then distclean)

Ports can also be deinstalled easily

> cd /usr/ports/shells/bash2
> make deinstall

If a port can't be deinstalled or installed, verify that it is a port and not a Package. If it's a port or you're having other problems, see Port Install Troubleshooting

External Links

FreeBSD Handbook

Personal tools