Ports, Installing
m |
m (Add a few things and speak about pkg_deinstall) |
||
Line 29: | Line 29: | ||
> '''make distclean''' | > '''make distclean''' | ||
(same as clean but will remove the distfiles for the ports aswell) | (same as clean but will remove the distfiles for the ports aswell) | ||
+ | > '''make fetch''' | ||
+ | (this will just download the source tarball to "/usr/ports/distfiles") | ||
> '''make extract''' | > '''make extract''' | ||
− | (this will just extract the port to a ./work | + | (this will just extract the port to a ./work directory) |
+ | > '''make patch''' | ||
+ | (this will just patch the source files) | ||
> '''make depends''' | > '''make depends''' | ||
(this will install (or compile) all of the dependencies of the current port) | (this will install (or compile) all of the dependencies of the current port) | ||
Line 36: | Line 40: | ||
(commands can be written in sequence like this one to install a port then distclean) | (commands can be written in sequence like this one to install a port then distclean) | ||
− | Ports can also be deinstalled easily | + | Ports can also be deinstalled easily. A bad method is to do this |
> '''cd /usr/ports/shells/bash2''' | > '''cd /usr/ports/shells/bash2''' | ||
> '''make deinstall''' | > '''make deinstall''' | ||
+ | Avoid this since you can break down other ports. Instead use [[pkg_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]] | 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]] |
Revision as of 16:55, 9 July 2005
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 fetch (this will just download the source tarball to "/usr/ports/distfiles") > make extract (this will just extract the port to a ./work directory) > make patch (this will just patch the source files) > 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. A bad method is to do this
> cd /usr/ports/shells/bash2 > make deinstall
Avoid this since you can break down other ports. Instead use pkg_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