Monday, December 17, 2007

OpenBSD post install Tips & Tricks :)

After the initial install of OpenBSD , its a good idea to get the latest ports and to point your PKG_PATH to a good mirror that has pre-compiled packages.

In my case, I point to : ftp5.usa.openbsd.org.
Another good trick is to save the names of all the packages into a file so that you can easily search for pre-compiled packages.

TO GET THE LATEST PORTS:

$shell> ftp ftp.openbsd.org
$shell> get pub/OpenBSD/4.2/port.tar.gz


Decompress the ports.tar.gz file to /usr

$shell> tar –zxvf ports.tar.gz

PLAYING WITH PACKAGES:

First thing to do is to get the names of all the packages into a file. This will help us in searching for a particular package:

$shell> ftp ftp.openbsd.orgcd /pub/OpenBSD/4.2/packages/i386
$shell> mdir *

GIVE THE FILENAME: packages.lst

Unless you specified a path , package.lst should be in your home directory.

Now point your PKG_PATH to a good fast mirror:

$shell> vi ~/.profile

add the following lines:

PKG_PATH=ftp://ftp5.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386/
export PKG_PATH

Now since we have names of all the packages in a text file : packages.lst.
Whenever we want to look for package that is pre-compiled , just do :

$shell> grep package-name packages.lst

I get the name of the package if it exists and then i can just do:

$shell> pkg_add -v package-name


Simple trick eh??:)

3 comments:

Jeff Sites said...

thanks a bunch! worked like a charm :D.

I had been trying again and again to get this to work so that I could use OpenBSD, and have only been able to now that I've read your post.

Thanks again!

DaynRegz said...

Hi, Just like to tell you that this piece of info is one quick to the point, no nonsense, workable and effective way as fast as possible. It worked for me and thank you for the effort. Keep up the good work.

Parvinder Bhasin said...

Thanks Regina. Appreciate your nice comments.