Archive for December, 2011


Fix “error while loading shared libraries: libidn.so.11: cannot open shared object file: No such file or directory”

I recently downloaded CentOS Enterprise 6.2 i386 and tried to install it as a Basic Server. After installation i have tried to update the server using yum command.

[root@linuxcentos01 ~]# yum update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

libidn.so.11: cannot open shared object file: No such file or directory

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Dec  7 2011, 20:38:36)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq 

I also tried the ping command and it doesnt work either.

[root@linuxcentos01 ~]# ping google.com
ping: error while loading shared libraries: libidn.so.11: cannot open shared object file: No such file or directory

To fix this issue, i tried to install that missing file called libidn. See below:

[root@linuxcentos01 ~]# wget ftp://ftp.muug.mb.ca/mirror/centos/6.1/os/x86_64/Packages/libidn-1.18-2.el6.i686.rpm
[root@linuxcentos01 ~]# rpm -ivh libidn-1.18-2.el6.i686.rpm

After installing libidn to my system everything is now working.


Problem:

device eth0 does not seem to be present, delaying initialization

Possible causes:

Caused:

  • New installed or replaced NIC Card
  • For virtual move hard disk to another guest OS with different NIC MAC address

For CenOS:

First you must edit the each network settings in your NIC card and removed this line or edit with your new NIC card Mac Address: HWADDR=01:23:45:67:89:AB

you can edit this by:

/etc/sysconfig/network-script/ifcfg-eth0<

Short term solution:

[root@centos6 ~]# cd /sys/class/net

[root@centos6 net]# ls -l

Will show you some symbolic link with new NIC number, what you can do was to:

[root@centos6 ~]# ip link set dev eth1 name eth0 (example that old nic was eth0 and new one was read as eth1

but problem on this solution was when you reboot all the setting will do back to the original.

Permanent Solution

[root@centos6 ~]# vi /etc/udev/rules.d/70-persistent-net.rules

You need to removed the old NIC card and replace the new nic card with the correct eth0

sample

# PCI device 0x1022:0x2000 (pcnet32) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:41:f6:73", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
(you must remove this bold line above)

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:b8:40:83", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
After removing the line from above change eth1 to eth0.

How to Setup RRDTool and Larrd on your BigBrother using CentOS

BigBrother-Trend02

Notes: must have the following installed 
pod2man cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel

[root@centos6 ~]# cd /usr/local/
[root@centos6 local]# wget https://dl.dropboxusercontent.com/u/21622770/rrdtool-1.4.5.tar.gz
[root@centos6 local]# tar -zxvf rrdtool-1.4.5.tar.gz
[root@centos6 local]# rm -f rrdtool-1.4.5.tar.gz
[root@centos6 local]# cd rrdtool-1.4.5
[root@centos6 rrdtool-1.4.5]# export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
[root@centos6 rrdtool-1.4.5]# ./configure
[root@centos6 rrdtool-1.4.5]# make
[root@centos6 rrdtool-1.4.5]# make install
[root@centos6 rrdtool-1.4.5]# make site-perl-install
[root@centos6 rrdtool-1.4.5]# cd /usr/local/
[root@centos6 local]# ln -s rrdtool-1.4.5 rrdtool
[root@centos6 local]# wget https://dl.dropboxusercontent.com/u/21622770/larrd-0.43e.tar.gz
[root@centos6 local]# tar -zxvf larrd-0.43e.tar.gz
[root@centos6 local]# rm -f larrd-0.43e.tar.gz
[root@centos6 local]# ln -s larrd-0.43e larrd
[root@centos6 local]# ln -s /home/bbuser/bb19c bb
[root@centos6 local]# ln -s /home/bbuser/bbvar bbvar
[root@centos6 local]# chown -R bbuser:apache larrd-0.43e
[root@centos6 local]# cd larrd
[root@centos6 larrd]# perl install -R –bbhome /home/bbuser/bb –larrdhome /usr/local/larrd –bbcgi /var/www/cgi-bin
[root@centos6 larrd]# cd cgi
[root@centos6 cgi]# mv -f larrd-graphs.cgi /var/www/cgi-bin/
[root@centos6 cgi]# mv -f larrd-grapher.cgi /var/www/cgi-bin/
[root@centos6 cgi]# ln -s /var/www/cgi-bin/larrd-grapher.cgi larrd-grapher.cgi
[root@centos6 cgi]# ln -s /var/www/cgi-bin/larrd-graphs.cgi larrd-graphs.cgi
[root@centos6 cgi]# vi /var/www/cgi-bin/larrd-graphs.cgi

Here are the list of changes you have to made:

line: 1
#!/usr/bin/perl

line:70
open(BBDEF,"<$ENV{'BBHOME'}/etc/bbdef-server.sh") or file_error("$ENV{'BBHOME'}/etc/bbdef-server.sh","$!");

change to
open(BBDEF,"<$ENV{'BBHOME'}/etc/bbdef.sh") or file_error("$ENV{'BBHOME'}/etc/bbdef.sh","$!");


line: 83
open(BBINC,"grep \"^BBSKIN=\" $ENV{'BBHOME'}/etc/bbinc-server.sh |") or file_error("$ENV{'BBHOME'}/etc/bbinc-server.sh","$!");

change to
open(BBINC,"grep \"^BBSKIN=\" $ENV{'BBHOME'}/etc/bbinc.sh |") or file_error("$ENV{'BBHOME'}/etc/bbinc.sh","$!");

[root@centos6 cgi]# vi /var/www/cgi-bin/larrd-grapher.cgi

Here are the list of changes you have to made:
line: 1
#!/usr/bin/perl


line: 89
$date =~ s/:/\\:/g;

change to:
$date =~ s/:/-/g; (for newer versions of rrd)

To Fix the error: “ERROR: Expected some arguments after ‘COMMENT:’”

line 338, 388, 439, 489, and 540

qq{COMMENT:$comment},

change to
qq{COMMENT:\\n},

[root@centos6 cgi]# cd /usr/local/larrd
[root@centos6 larrd]# vi larrd-config.pl

Here are the list of changes you have to made:
on line: 55
@DATALIST=("la","disk","bbnet","vmstat","netstat","procs","users","up","WebApp");

@DATALIST=("la","disk","bbnet","vmstat","netstat","procs","users","up","WebApp","apache","memory");


on line: 64
$ENV{'BBLOGSTATUS'}=DYNAMIC;

change to
$ENV{'BBLOGSTATUS'}=STATIC;

line: 69
$ENV{'LARRDHOSTSVC'}="/usr/local/apache2/htdocs/bb/bin/bb-hostsvc.sh";

change to
$ENV{'LARRDHOSTSVC'}="/var/www/cgi-bin/bb-hostsvc.sh";


-- Optional --

Line 77
# $ENV{'LARRDCOMM'}="STATUS";
$ENV{'LARRDCOMM'}="STATUS";


line: 90 and 92
# Messages that will not prevent larrd from functioning properly 

(noisy)
$ENV{'WARN'} = 0;
# Messages that tell you a little about what larrd is doing (very 

noisy)
$ENV{'DEBUG'} = 0;

Check /usr/local/larrd/tmp permission:
drwxrwxrwx 2 bbuser apache 4096 Feb 6 2008 tmp

[root@centos6 larrd]# mkdir /home/bbuser/bbvar/rrd
[root@centos6 larrd]# chown -R bbuser:apache /home/bbuser/bbvar/
[root@centos6 larrd]# ln -s /usr/local/larrd /home/bbuser/bb19c/ext/larrd
[root@centos6 larrd]# mv apache-larrd.pl 043e.apache-larrd.pl
[root@centos6 larrd]# mv memory-larrd.pl 043e.memory-larrd.pl
[root@centos6 larrd]# cp 043c.apache-larrd.pl apache-larrd.pl
[root@centos6 larrd]# cp 043c.memory-larrd.sh memory-larrd.sh
[root@centos6 larrd]# chown bbuser:apache memory-larrd.sh
[root@centos6 larrd]# chown bbuser:apache apache-larrd.pl

[root@centos6 larrd]# vi apache-larrd.pl

Here are the list of changes you have to made:
Line: 1
#!/usr/bin/perl

line: 18
Uncomment it leave till line 20

line: 59
'your-domain.dom' => {    changed to: 'centos6' => { 

[root@centos6 larrd]# vi /etc/httpd/conf/httpd.conf

line: 228 - Uncomment the entry
ExtendedStatus On

line: 921 to 926 uncomment everything

    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from xxx.xxx.xxx.xxx (changed to your allowed network to access this as it may be security rick if you allowed all.

Switch User bbuser

[bbuser@centos6 ~]$ vi /home/bbuser/bb19c/etc/bb-bbexttab

Add this line at the bottom:
localhost :  : larrd/larrd-html.pl
localhost :  : larrd/larrd.pl
localhost :  : larrd/apache-larrd.sh
localhost :  : larrd/bf-larrd.sh

Network Monitoring Plug-in

Checks for downed interfaces, collisions, errors etc. (Tested: Solaris).
Provided by Cook IT Services

BigBrother-net2

Note: ksh - must be installed

Login as bbuser:

[bbuser@centos6 ~]$ wget https://dl.dropboxusercontent.com/u/21622770/network2-3_5.tar.gz
[bbuser@centos6 ~]$ tar zxvf network2-3_5.tar.gz
network2.sh
[bbuser@centos6 ~]$ rm network2-3_5.tar.gz
[bbuser@centos6 ~]$ cp /home/bbuser/bb19c/etc/bb-bbexttab.DIST /home/bbuser/bb19c/etc/bb-bbexttab (create a bb-bbexttab, where you will add new plug-in entries)
[bbuser@centos6 ~]$ vi /home/bbuser/bb19c/etc/bb-bbexttab

Uncomment everything then create a new line like this:

localhost :  : network2.sh

[root@centos6 ~]$ vi /home/bbuser/bb19c/etc/bbsys.local

Add the following line below:

#
# Start of lines to put in bbsys.local (without the "#")
#
FSTAB="/etc/mtab"      #Original entry: FSTAB="/etc/mnttab" (commonly used by Solaris)
SHARE_TAB="/etc/dfs/sharetab"
IFCONFIG="/sbin/ifconfig"
NETSTAT="/bin/netstat"	#Original entry NETSTAT="/usr/bin/netstat"
YPWHICH="/usr/bin/ypwhich"
LDAP_CACHEMGR="/usr/lib/ldap/ldap_cachemgr"
export FSTAB SHARE_TAB IFCONFIG NETSTAT YPWHICH LDAP_CACHEMGR
#
# End of lines to put in bbsys.local
#

[bbuser@centos6 ~]$ mv network2.sh /home/bbuser/bb19c/ext/
[bbuser@centos6 ~]$ chmod 775 /home/bbuser/bb19c/ext/network2.sh

———————————————————————-

Memory Usage Monitoring Plug-in

Extension script for monitoring memory and swap on Unix- and Windows-based Big Brother clients. Based on bb-memory 2.0.1, with additional improvements from various people and enhanced Win32 support. 3.1 fixes a bug in HP-UX memory support, and adds collection of “netstat” data for Win32 systems.

BigBrother-Memory

[bbuser@centos6 ~]$ wget https://dl.dropboxusercontent.com/u/21622770/bb-memory-3.1.tar.gz

[bbuser@centos6 ~]$ tar zxvf bb-memory-3.1.tar.gz
bb-memory-3.1/
bb-memory-3.1/bb_memory.exe
bb-memory-3.1/README
bb-memory-3.1/Changes
bb-memory-3.1/bb-memory.sh
bb-memory-3.1/LICENSE.BEN
bb-memory-3.1/netstat-larrd-win32.patch
bb-memory-3.1/INSTALL.UNIX
bb-memory-3.1/source/
bb-memory-3.1/source/hpux/
bb-memory-3.1/source/hpux/Makefile
bb-memory-3.1/source/hpux/bb-hp-memsz.c
bb-memory-3.1/source/win32/
bb-memory-3.1/source/win32/bb_memory.c
bb-memory-3.1/memory.html
bb-memory-3.1/INSTALL.WIN
[bbuser@centos6 ~]$ rm bb-memory-3.1.tar.gz (removed download file)
[bbuser@centos6 ~]$ mv /home/bbuser/bb-memory-3.1/bb-memory.sh /home/bbuser/bb19c/ext
[bbuser@centos6 ~]$ chmod 775 /home/bbuser/bb19c/ext/bb-memory.sh
[bbuser@centos6 ~]$ rm -rf bb-memory-3.1 (Since we will be using only linux/unix script the rest can be deleted)
[bbuser@centos6 ~]$ cp /home/bbuser/bb19c/etc/bb-bbexttab.DIST /home/bbuser/bb19c/etc/bb-bbexttab
[bbuser@centos6 ~]$ vi /home/bbuser/bb19c/etc/bb-bbexttab

localhost :  : bb-memory.sh

Restart BigBrother

———————————————————————-

Inode Monitoring Plug-in

bb-disk.sh from BigBrother 1.9c modified to check inode usage instead of space usage. Uses the same percentage parameters in bb-disktab as bb-disk.sh. Requires GNU df, or at least a df that has the -i option for inodes. Compatible with larrd-0.44.

BigBrother-inode

[bbuser@centos6 ~]$ wget https://dl.dropboxusercontent.com/u/21622770/bb-inode.tar.gz
[bbuser@centos6 ~]$ tar zxvf bb-inode.tar.gz
bb-inode.sh
[bbuser@centos6 ~]$ rm bb-inode.tar.gz
[bbuser@centos6 ~]$ mv /home/bbuser/bb-inode.sh /home/bbuser/bb19c/ext
[bbuser@centos6 ~]$ chmod 775 /home/bbuser/bb19c/ext/bb-inode.sh
[bbuser@centos6 ~]$ vi /home/bbuser/bb19c/etc/bb-bbexttab

localhost :  : bb-inode.sh

There will be an error such as:
bb-inode.sh /bin/sort: open failed: +4: No such file or directory

to resolve this you need to edit this lines:

on line 72:
eval "$DFCMD -i | $EGREP \"$DFUSE\" | $EGREP -v \"$DFEXCLUDE\" | $SORT \"+${DFSORT}\" > $BBTMP/DFOUT.$$"

change to:
eval "$DFCMD -i | $EGREP \"$DFUSE\" | $EGREP -v \"$DFEXCLUDE\" | $SORT \"-k${DFSORT}\" > $BBTMP/DFOUT.$$"

on line 87
wclen1=`eval "$DFCMD | $EGREP \"$DFUSE\" | $EGREP -v \"$DFEXCLUDE\" | $SORT \"+${DFSORT}\" | $WC"`

change to:
wclen1=`eval "$DFCMD | $EGREP \"$DFUSE\" | $EGREP -v \"$DFEXCLUDE\" | $SORT \"-k${DFSORT}\" | $WC"`

[root@centos6 ~]# vi /home/bbuser/bb19c/etc/bbsys.local

Add entry:
DFUSE="^/dev"

to monitor non-local filesystem 

————————————————————————

NTP Monitoring Plug-In

Test NTP. Warns when time drifts too far. Provided by Cook IT Services

BigBrother-ntp

Note: you must have ntp-perl installed

[bbuser@centos6 ~]$ wget https://dl.dropboxusercontent.com/u/21622770/bb-ntp-1_5.sh.gz
[bbuser@centos6 ~]$ gunzip bb-ntp-1_5.sh.gz
[bbuser@centos6 ~]$ mv /home/bbuser/bb-ntp-1_5.sh /home/bbuser/bb19c/ext/bb-ntp.sh
[bbuser@centos6 ~]$ chmod 775 /home/bbuser/bb19c/ext/bb-ntp.sh
[bbuser@centos6 ~]$ vi /home/bbuser/bb19c/etc/bb-bbexttab

localhost :  : bb-ntp.sh

[root@centos6 ~]# vi /home/bbuser/bb19c/etc/bbsys.local

#
# Start of lines to put in bbsys.local
#
NTPTRACE="/usr/sbin/ntptrace"
NTPTRACE_HOST="-n "
export NTPTRACE NTPTRACE_OPT
#
# End of lines to put in bbsys.local
#

————————————————————————–

More to update…


How to add maintenance windows on BigBrother

BigBrother-Maintenance

In order for this to work make sure you have compiled your bbd with -DENABLE_DISABLE under CFLAGS.

Login as BBuser and download maint.pl script fro Quest Community:

[bbuser@centos6 ~]$ wget https://dl.dropboxusercontent.com/u/21622770/maint.pl.v2.11.tar.gz
[bbuser@centos6 ~]$ tar zxvf maint.pl.v2.11.tar.gz

after extracting the main tar file you will have this three files.

  • maint.pl
  • wrench.gif
  • add2header.txt

[bbuser@centos6 ~]$ rm maint.pl.v2.11.tar.gz (Removed the download tar file)
[bbuser@centos6 ~]$ mv /home/bbuser/wrench.gif /home/bbuser/bb19c/www/gifs (move the file from $BBSKIN directory)
[bbuser@centos6 web]$ cat /home/bbuser/add2header.txt

<A HREF="&CGIBINURL/maint.pl"><IMG SRC="&BBSKIN/wrench.gif" ALT="Maint"
TITLE="Maint" WIDTH="39" HEIGHT="27" BORDER=0></A>

Copy and paste the entry above since you will need to insert this line on the following

/home/bbuser/bb19c/web/bb2_header
/home/bbuser/bb19c/web/bb_header
/home/bbuser/bb19c/web/hist_header
/home/bbuser/bb19c/web/histlog_header
/home/bbuser/bb19c/web/hostsvc_header
/home/bbuser/bb19c/web/replog_header

add the line that you have copy from above on line 44:

Entry should look like this in all header file.

<TABLE SUMMARY="Navigation" WIDTH=100%><TR><TD VALIGN=TOP ALIGN=LEFT>
<A HREF="http://bb4.com"><IMG SRC="&BBSKIN/bb.gif" ALT="Get Big Brother"
        WIDTH="120" HEIGHT="24" BORDER=0></A><BR>
<A HREF="&BBWEB/help/bb-ack.html"><IMG SRC="&BBSKIN/bbnav1.gif"
        ALT="Contact" WIDTH="39" HEIGHT="27" BORDER=0></A>
<A HREF="&BBWEB/bb2.html"><IMG SRC="&BBSKIN/bbnav2.gif" ALT="Condensed view"
        WIDTH="39" HEIGHT="27" BORDER=0></A>
<A HREF="&BBWEB/help/bb-rep.html"><IMG SRC="&BBSKIN/bbnav4.gif" ALT="Report"
        WIDTH="39" HEIGHT="27" BORDER=0></A>
<A HREF="&BBWEB/help/bb-help.html"><IMG SRC="&BBSKIN/bbnav3.gif" ALT="Help"
        WIDTH="39" HEIGHT="27" BORDER=0></A>
<A HREF="&CGIBINURL/maint.pl"><IMG SRC="&BBSKIN/wrench.gif" ALT="Maint"
        TITLE="Maint" WIDTH="39" HEIGHT="27" BORDER=0></A>
</TD><TD VALIGN=TOP ALIGN=RIGHT>

[bbuser@centos6 ~]$ rm add2header.txt (when you have finish modifying all of the header file)

Switch to to user root since we need to move “maint.pl” over root ownership directory:

[root@centos6 ~]# mv /home/bbuser/maint.pl /var/www/cgi-bin
[root@centos6 cgi-bin]# chown root:root /var/www/cgi-bin/maint.pl (Change permission)

We need to fix some parts of the script in order for it to work:

[root@centos6 cgi-bin]# vi /var/www/cgi-bin/maint.pl

on line 1
#!/usr/local/bin/perl -wT
changed to:
#!/usr/bin/perl -wT

on line 162
my $BBHOME = “/usr/local/bb/bb“;
changed to:
my $BBHOME = “/home/bbuser/bb“;

on line 165
my $BBVAR = “/usr/local/bb/bbvar“;
changed to:
my $BBVAR = “/home/bbuser/bbvar“;

Start BigBrother

[bbuser@centos6 ~]$ /home/bbuser/bb19c/runbb.sh start

Starting the Big Brother System & Network monitor
Starting Big Brother Daemon (bbd)…
Starting Network tests (bb-network)…
Starting Display process (bb-display)…
Starting Local tests (bb-local)…
Big Brother 1.9c started

Put the server in maintenance mode using Command line:

go to: /home/bbuser/bb/bin

to disable: 
./bb <site server> "disable <unit>.<module or * for all> <duration (ie, 3d, 1h, 30m)> <comment -name>" to enable: ./bb <site server> "enable <unit>.<module or * for all>"

example:
./bb centos6 "disable centos6.* 1h testing -bbuser"

How to install BigBrother Monitoring on CentOS

This part of the tutorial only covers the installation of BigBrother Display Server. Client installation are not yet included, those topics are hopefully be included in my future post.

BigBrother

Before proceeding into the installation, please have the following installed on your machine:

  • httpd
  • gcc
  • SELinux should be disabled (if you are not familiar with SELinux)

Create a user for BigBrother called it as “bbuser” and set a password for that user.

[root@centos6 ~]# useradd bbuser
[root@centos6 ~]# passwd bbuser
Changing password for user bbuser.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Download and prepare BigBrother application. (Switch User to “bbuser”)

[root@centos6 ~]# su – bbuser
[bbuser@centos6 ~]$ wget http://bb4.org/dnld/bb-1.9c.tar.gz
[bbuser@centos6 ~]$ tar -zxvf bb-1.9c.tar.gz
[bbuser@centos6 ~]$ tar xvf bb19c.tar
[bbuser@centos6 ~]$ ln -s /home/bbuser/bb19c /home/bbuser/bb

Installation and configuration procedure: (Switch user to root)

[bbuser@centos6 ~]$ su – root
[bbuser@centos6 install]$ su – root
Password:

[root@centos6 ~]# ln -s /home/bbuser/bb19c/www /var/www/html (create a shortcut link from your BigBrother web toward Apache web)
[root@centos6 ~]# chgrp -R apache /home/bbuser/bb19c/www/rep (cgi-bin scripts could have access over $BBHome/www/rep directory)
[root@centos6 ~]# cd /home/bbuser/bb/install
[root@centos6 install]# ./bbconfig redhat

Do you agree to the terms of this license (y/n): y
Prevent the execution of BB as user ‘root’ (y/n) [y]: y
What will be the user ID of BB [bb]: bbuser
Old-style directory structure (y/n): [n]
Use FQDN (y/n): [y] n (if you have a Fully qualified domain name then select “y”)
What machine will be the BBDISPLAY [centos6]:
What machine will be the BBPAGER [centos6]:
Is this host a BBDISPLAY host (y/n): [y]
Is this host a BBPAGER host (y/n): [y]
Enter the default recipient: [root@localhost] youremail@yourdomain.com
Enter CGI directory [/home/www/httpd/cgi-bin]: /var/www/cgi-bin
Enter the base URL of the CGI scripts [/cgi-bin]:

Enter web server user id [nobody]: bbuser
Enter group name [bbuser]: bbuser

Before we proceed with the installation, lets have a quick fix on some errors you may encounter during and after installation

for error under msgs monitoring:

/var/log/messages is unreadable

[root@centos6 install]# chmod 604 /var/log/messages

for error under disk monitoring:

Filesystem of /home/bb/bbc4.40-bbpe/tmp is FULL

fix the output of df command:

[root@centos6 install]# cd /home/bbuser/bb19c/etc/
[root@centos6 install]# vi bbsys.local

Change
DF=”/bin/df –k” to DF=”/bin/df –hP

fix the script for bb-disk.sh

[root@centos6 install]# exit (Switch back to “bbuser” – you can exit or use su – bbuser command)[bbuser@centos6 install]$ vi /home/bbuser/bb19c/bin/bb-disk.sh

On line 62:
eval “$DFCMD | $EGREP \”$DFUSE\” | $EGREP -v \”$DFEXCLUDE\” | $SORT +{$DFSORT} > $BBTMP/DFOUT.$$”
change to:
eval “$DFCMD | $EGREP \”$DFUSE\” | $EGREP -v \”$DFEXCLUDE\” | $SORT \”-k${DFSORT}\” > $BBTMP/DFOUT.$$”

On line 77
wclen1=`eval “$DFCMD | $EGREP \”$DFUSE\” | $EGREP -v \”$DFEXCLUDE\” | $SORT +{$DFSORT} | $WC”`
change to:
wclen1=`eval “$DFCMD | $EGREP \”$DFUSE\” | $EGREP -v \”$DFEXCLUDE\” | $SORT \”-k${DFSORT}\” | $WC”`

For error during make process:

bbd.c: In function ‘main’: bbd.c:720: error: invalid storage class for function ‘bbd_timeout’ make: *** [bbd.o] Error 1

[bbuser@centos6 install]$ cd ../src (/home/bbuser/bb/src)
[bbuser@centos6 src]$ vi bbd.c

go to line 724
then changed “static void bbd_timeout()” to “void bbd_timeout()” (located on line 722)

Now when all things are fix we are now ready to compile BigBrother

Optional: if you want to put a maintenance page add -DENABLE_DISABLE, if you want to use vmstat on data trending add -DDATAMSG on your BigBrother

[root@centos6 ~]$ vi /home/bbuser/bb19c/src/Makefile (As a root edit Makefile)

On line: 38
CFLAGS=-O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH

add this entry in the end of the line
CFLAGS=-O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG

[bbuser@centos6 src]$ make

Output should look like this:
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o bb.o bb.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o bbsend.o bbsend.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o utils.o utils.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG -o bb bb.o bbsend.o utils.o
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o dohostsvc.o dohostsvc.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o bbd.o bbd.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o bbpage.o bbpage.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG -o bbd bbd.o dohostsvc.o bbpage.o bbsend.o utils.o
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o bbnet.o bbnet.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG -o bbnet bbnet.o utils.o
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o touchtime.o touchtime.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG -o touchtime touchtime.o
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o dumphostsvc.o dumphostsvc.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG -o dumphostsvc dumphostsvc.o dohostsvc.o utils.o
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o getipaddr.o getipaddr.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG -o getipaddr getipaddr.o utils.o
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o bbstat.o bbstat.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG -o bbstat bbstat.o
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG   -c -o bbrun.o bbrun.c
cc -O -DREDHAT -DGETTIMEOFDAY -DSIGSETJMP -DREGEXEC -DTIMEH -DENABLE_DISABLE -DDATAMSG -o bbrun bbrun.o utils.o

[bbuser@centos6 src]$ make install

rm -f *.o
mv bb bbd bbnet touchtime dumphostsvc getipaddr bbstat bbrun ../bin

After the installation has been completed, you to setup the server to act as BigBrother display server.

[bbuser@centos6 ~]$ cp /home/bbuser/bb19c/etc/bb-hosts /home/bbuser/bb19c/etc/bb-hosts.org
[bbuser@centos6 ~]$ vi /home/bbuser/bb19c/etc/bb-hosts

xxx.xxx.xxx.xxx centos6 # BBPAGER BBNET BBDISPLAY http://xxx.xxx.xxx.xxx/bb/
[—-IP—-] [hostname] [—— function——] [to be monitored]

How to start and stop BigBrother Monitoring

[bbuser@centos6 ~]$ cd /home/bbuser/bb/ (where runbb.sh script is located)

To start BigBrother Monitoring:

[bbuser@centos6 bb]$ ./runbb.sh start
Starting the Big Brother System & Network monitor
Starting Big Brother Daemon (bbd)...
Starting Network tests (bb-network)...
Starting Display process (bb-display)...
Starting Local tests (bb-local)...
Big Brother 1.9c started

To stop BigBrother Monitoring:

[bbuser@centos6 bb]$ ./runbb.sh stop
Stopping Big Brother...

Check your display server in your Browser: http:xxx.xxx.xxx.xxx/bb/

Note: This tutorial has been tested on CentOS 5.x and CentOS 6.1


Create a bootable USB using CMD under Windows 7

  1. On “Windows 7” Click Start then type in “CMD” then hit Enter.
  2. type “list disk” (This will show you all the storage device attached to your computer, so look for USB drive and you can determined it by its size.)
  3. type “select disk 1” (Remember this disk 1 is your USB drive based on the output of Disk ###)
  4. type “clean all
  5. type “create partition primary
  6. type “select partition 1″
  7. type “Active
  8. type “format fs=ntfs label=”WhateverOS” quick” or “format fs=fat32 label=”WhateverOS” quick” (should work either partition format)
  9. type “assign
  10. type “exit” (This will exit you from Diskpart)

When your done with the steps above you can either go to your “My Computer” then browse your CD/DVD drive then Copy all the contents and then paste it to your USB drive.

Another method if you are still in CMD, you can type in this commands.

Will assume your CD/DVD drive is Drive E: and Your USB drive F:

xcopy e:\*.* /s/e/f f:\

For Detailed tutorial please visit this link:

http://www.sevenforums.com/tutorials/2432-usb-windows-7-installation-key-drive-create.html