faq
search
add article
cool-stuff
how-to
main
tips
|
HOWTO: Install and Remove Programs |
 |
 |
 |
Posted by Jason on Monday March 26, @09:27PM
from the Source-Bin dept.
If you're new to FreeBSD and you've not installed an application yet, you're in for a treat. FreeBSD provides a wonderful and simple mechanism for installing and removing applications.
It's called The Ports Tree.
There are three basic ways to install applications on a FreeBSD system.
[1 - Ports Tree]
[2 - Binaries on CDROM]
[3 - Packages in .tgz files]
[1-Installing from Source using the Ports Tree]
The ports tree is a directory tree containing all the information about programs that have been ported to FreeBSD, where on the internet to download their source code, and how to install them.
If you have successfully installed your FreeBSD OS and it has access to the internet, you can install applications with a stroke of the keyboard.
If you wanted to install bash for instance, you just change to the appropriate directory under /usr/ports and type: make install. Your FreeBSD box will go out on the internet, download the source code for bash, compile it, and install it on your system. It's really simple! Here is how to do it.
Login: root
Password: ********
cd /usr/ports/shells/bash2
make install && make clean
The bash shell is now installed on your system. If you would like to remove bash from your system. Just type:
cd /usr/ports/shells/bash2
make deinstall
[2-Installing from Pre-Compiled Binaries on CDROM]
Another way to install applications is to install the pre-compiled binary files from your CDROM. To install bash in this manner, follow these steps.
Login: root
Password: ********
Insert CDROM (1) - Installation Boot, Essential Packages
Type:
/stand/sysinstall
Select:
Configure - Do Post-Install Configuration of FreeBSD
Packages
CDROM
Shells
Bash2
Install
[3-Installing from GZipped Packages]
To install an application in this manner, you need the app in a package file (usually in the form package_name-ver.tgz). You use the pkg_add. command:
pkg_add package_name-ver.tgz
To continue our bash shell example...
pkg_add bash-2.04.tar.gz
That's all there is to it. If you would like to see what programs are installed on your system type:
pkg_info
I like to pipe the output into the more command like so:
pkg_info | more
[4-Uninstalling/Removing Applications]
No matter what method you use to install an application, you can remove it from the system with the pkg_delete command:
pkg_delete package_name-ver
Back to our bash shell example...
pkg_delete bash-2.04
If you would like more information on this topic, consult the PORTS Section of the FreeBSD Handbook.
You can also use the man pages:
man ports
man pkg_add
man pkg_info
man pkg_delete
Important Stuff:
Note: Fields with bold titles are required.
Please try to keep posts on topic.
Try to reply to other people comments instead of starting new threads,
Read other people's messages before posting your own to
avoid simply duplicating what has already been said.
Use a clear subject that describes what your
message is about.
Please do not post offtopic, inflammatory, inappropriate, illegal,
or offensive comments. Repeat offenders will be sanctioned.
|