Follow us on Twitter!
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 23
Guests Online: 21
Members Online: 2

Registered Members: 82825
Newest Member: bulmers
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 = CHANGE_THIS.FreeBSD.org
*default host = CHANGE_THIS.FreeBSD.org
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!

Comments
No Comments have been Posted.
Post Comment

Sorry.

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