geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


HOWTO: Install and Remove Programs
Ports and Packages Posted by Jason on Monday March 26, @10: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


<  |  >

 

Related Links
  • Articles on Ports and Packages
  • Also by Jason
  • Contact author

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: HOWTO: Install and Remove Programs
    by me on Friday April 12, @02:15AM
    no comments
    Click to download attachment 4dos.dat
    0KB (258 bytes)

    [ Add a Reply to this ]
    Re: HOWTO: Install and Remove Programs
    by Paul on Monday January 20, @08:43AM
    I think that `make clean` might prevent `make deinstall` for a given port.
    [ Add a Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]