Posted on

Building “grep” and “jwhois” from source.

This is the second lab of the SBR600 course I am currently taking at Seneca.

It involves building software from source code. It sounded scary and advanced, but turned out to be pretty much the same thing as we did in OPS235. Don’t get me wrong, building *can* be a daunting process, but for this lab I used GNU software which is written to compile with as least problems as possible. The whole process was seamless, took about 5 minutes, and I will outline it now.

First, I went to this page http://gnu.mirror.vexxhost.com/ and chose 2 packages I already knew: “grep” and “jwhois”. Inside those archives, are files in ALL CAPS which contain manuals, authors, thanks, and other misc info. In both archives I downloaded, the INSTALL file outlined the building process being as simple as running the “configuration” file to adjust (I’m guessing the Makefile) for my system to avoid any system configuration issues when building. 

Building “grep” and “jwhois”

  • Downloaded and extracted the archives with “tar xfv”
  • Went into extracted directories
  • Ran ./configure then ran “make” with “time” preceeding it to see how long it takes to build.
  • Tested the binaries which resided in the “src” directory of the extracted archives.

The time it took

grep:
real 0m11.018s
user 0m3.310s
sys 0m.586s

jwhois:
real 0m4.029s
user 0m1.671s
sys 0m0.197s

Results

JWHOIS

[slava@localhost jwhois-4.0]$ ./src/jwhois andyskylights.com | less

Returned:

Domain Name: ANDYSKYLIGHTS.COM
Registrar: REGISTER.COM, INC.
Whois Server: whois.register.com
Referral URL: http://www.register.com
Name Server: DNS1.REGISTER.COM
Name Server: DNS2.REGISTER.COM
Status: clientTransferProhibited
Updated Date: 15-feb-2013
Creation Date: 01-mar-2010
Expiration Date: 01-mar-2014

GREP

[root@localhost grep-2.9]# cd src
[root@localhost src]# printf “1\n2\n3\n4\n5” > test
[root@localhost src]# ./grep 3 test
3
[root@localhost src]#

 

So as you can see both software packages compiled and worked with no issues. 

 

 

Advertisements

One response to “Building “grep” and “jwhois” from source.

  1. Chris ⋅

    Just because they *seem* to run, does not mean “no issues”. I’m guessing you probably didn’t build and install DBM-Devel first, so your whois program has been created with inbuilt caching disabled (a big issue, because most whois servers rate-limit queries and block you, so a cache is really useful)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s