Donate to us!
Society leans ever heavily on computers, if you have the power to take out computers you can take out society. - cubeman372
Tuesday, October 16, 2018
 Need Help?
Members Online
Total Online: 119
Guests Online: 116
Members Online: 3

Registered Members: 107158
Newest Member: secidea
Latest Articles

TT1 *NIX 1: FreeBSD's Ports System

Arrow Image Software Installation on FreeBSD, easy as hell!

In FreeBSD, we have a system that makes installation software as easy as one command. In short, the ports are basically a giant collection of snapshots of different software packages, hidden away in /usr/ports, where only root can touch. As root, you cd to /usr/ports, find the category you want, then the directory for the software you want.

Specifically, the ports system is just a few files and a makefile, to download everything you need.

Let\'s say I want to grab CVSUP, and I\'ve never had it installed before.
# cd /usr/ports
# cd net (this is cvsup\'s category)
# cd cvsup (note that since we\'re in the category\'s directory, we could grep to find the port we want.)
Now heres the most important step-
# make install
And that\'s it. It\'s done. All installed, it autogets the dependencies and everything, just like that.
This makefile works for install, deinstall, reinstall, search, and whatnot.

Lets say we want to update our snapshot of the ports collection. Kinda weird that I use CVSUP for my example, eh?

Well once you have that done, you have a file in your /usr/share/examples/cvsup called ports-supfile. Edit the file with Vi, EE, Emacs, or whatever you choose, and theres two lines two lines of interest for you right now. First off, a supfile is a file that tells cvsup what to download, where to put it, and where to get it from. In the example file, all you need to change is the where from.

These two lins of interest are somthign along-
#*default host =
*default host =
The only difference is one is commented out. Big difference.
Find the latter of the two, and change CHANGE_THIS to cvsup. Save the file and exit your text editor.

Now, run this!
# cvsup -g -L 2 /usr/share/examples/cvsup/ports-supfile
And it\'ll grab all the updated ports collection for you.

Updates, says who?!
If your intelligent, you know that you always have to update your software for security, or new feautres. Whatever.
One option is running # portaudit -F before you install a package, to check the package you install for vulnerabilities.

Updating is as simple as # portupgrade. Check the man page for usage details, but basically portupgrade without flags is upgrade all ports iin your database, and adding a flag of a packagename is a specifc package upgrade.

Easy as Pie!

No Comments have been Posted.
Post Comment


You must have completed the challenge Basic 1 and have 100 points or more, to be able to post.