Monday, 4 June 2012

Red Hat Enterprise Linux 6.2 - Starting network interfaces at boot-up

As per my previous post, I've just started using Red Hat Enterprise Linux (RHEL) 6.2, having got used to using RHEL 5.x for the past few years.

I typically run my Linux servers without X11 started, as I tend to run most processes via command-line ( being an old OS/400 junkie at heart ).

To achieve this, I edit /etc/inittab and change: -

id:5:initdefault:

to: -

id:3:initdefault:

which means that Linux starts at run-level 3 ( Multi-User mode, console logins only ) rather than 5 ( Multi-User mode, with display manager as well as console logins [X11] ), as per Wikipedia below: -



This works perfectly in RHEL 5.x and also in 6.2.

However, I found that my network interface ( eth0 ) wasn't activating on boot-up, requiring me to run: -

$ ifup eth0

post-login, which was a pain.

A quick Google later, and I found this: -

 [SOLVED] 2 eth interfaces not coming up at boot

which said: -

The interfaces will come up on boot if you add the following line to your /etc/sysconfig/network-scripts/ifcfg-eth# files.

ONBOOT=yes


I checked, and lo and behold ....

$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
HWADDR="08:00:27:87:E2:DC"
NM_CONTROLLED="yes"
ONBOOT="no"


I changed this to read ONBOOT="yes", rebooted and .... c'est voila

Job done.


Friday, 1 June 2012

Following the script - installing IBM HTTP Server using a response file ( silent installation )

This is the first of a series of posts, as I get back up to speed with scripting installations. This is part of my preparation for an upcoming engagement to build a Collaboration Portal environment.

So here're the steps for IBM HTTP Server 7

(a) Unpack the code ( for me, IHS is part of the WAS ND )

$ cd /tmp
$ tar xvzf /mnt/WAS7/WAS7NDSupp64.tar.gz

(b) Create a response file ( your options may well vary ) : -

$ vi ~/responsefile.txt

-OPT silentInstallLicenseAcceptance="true"
-OPT allowNonRootSilentInstall=false
-OPT installLocation="/opt/IBM/HTTPServer"
-OPT httpPort="80"
-OPT adminPort="8008"
-OPT createAdminAuth="true"
-OPT disableOSPrereqChecking="true"
-OPT adminAuthUser="ihsadmin"
-OPT adminAuthPassword="passw0rd"
-OPT adminAuthPasswordConfirm="passw0rd"
-OPT runSetupAdmin="true"
-OPT createAdminUserGroup=true
-OPT setupAdminUser="ihsadmin"
-OPT setupAdminGroup="ihsadmins"
-OPT installPlugin="true"
-OPT webserverDefinition="webserver1"
-OPT washostname="wp8.uk.ibm.com"


(c) Perform the installation

$ ./install -options ~/responsefile.txt -silent

(d) Wait a bit - I timed it using the time command, and it took a little over 4 minutes

(e) Check the logs: -

$ cat /opt/IBM/HTTPServer/logs/install/log.txt

...
(01-Jun-2012 20:23:20), Process, com.ibm.ws.install.ni.ismp.actions.InstallNIFPackage, msg1, Running configuration command: GSKitPostInstall, percent complete: 100%
(01-Jun-2012 20:23:20), Process, com.installshield.wizardx.conditions.PlatformWizardBeanCondition, dbg.platform, target platform: name="Linux" version="2.6.32-220.el6.x86_64" arch="amd64"
(01-Jun-2012 20:23:20), Process, com.installshield.wizardx.conditions.PlatformWizardBeanCondition, dbg.platform, condition platform: name="Windows .*" version="." arch="."
(01-Jun-2012 20:23:20), Process, com.installshield.wizardx.conditions.PlatformWizardBeanCondition, dbg.platform, target platform: name="Linux" version="2.6.32-220.el6.x86_64" arch="amd64"
(01-Jun-2012 20:23:20), Process, com.installshield.wizardx.conditions.PlatformWizardBeanCondition, dbg.platform, condition platform: name="Windows .*" version="." arch="."
(01-Jun-2012 20:23:21), Process, com.installshield.wizardx.conditions.PlatformWizardBeanCondition, dbg.platform, target platform: name="Linux" version="2.6.32-220.el6.x86_64" arch="amd64"
(01-Jun-2012 20:23:21), Process, com.installshield.wizardx.conditions.PlatformWizardBeanCondition, dbg.platform, condition platform: name="Windows .*" version="." arch="."
(01-Jun-2012 20:23:21), Process, com.installshield.wizardx.conditions.PlatformWizardBeanCondition, dbg.platform, target platform: name="Linux" version="2.6.32-220.el6.x86_64" arch="amd64"
(01-Jun-2012 20:23:21), Process, com.installshield.wizardx.conditions.PlatformWizardBeanCondition, dbg.platform, condition platform: name="Windows .*" version="." arch="."
(01-Jun-2012 20:23:21), Process, com.ibm.ws.install.ni.ismp.actions.SettleNIFRegistryAction, msg1, Current install/uninstall process is successful. Process type is: install
(01-Jun-2012 20:23:21), Process, com.ibm.ws.install.ni.ismp.actions.SetExitCodeAction, msg1, CWUPI0000I: EXITCODE=0
(01-Jun-2012 20:23:21), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFSUCCESS

...

*** UPDATED - 7/6/2012 ***

(f) Check the WAS Plugin logs: -

$ cat /opt/IBM/HTTPServer/Plugins/logs/install/log.txt

...
(04-Jun-2012 16:54:44), Process, com.ibm.ws.install.ni.ismp.actions.SetExitCodeAction, msg1, CWUPI0000I: EXITCODE=0
(04-Jun-2012 16:54:44), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFSUCCESS
...

(g) Go and celebrate with a cup of tea

Next to do the same for Update Installer, WebSphere Application Server, WebSphere Portal, DB2 UDB and IBM Tivoli Directory Integrator ....


IBM HTTP Server 7.0 and Red Hat Enterprise Linux 6.2 - not so happy campers

Following my earlier post - Adding a local Yum repository to Red Hat Enterprise Linux 6.2 - I hit another road-block on my way to a completed silent installation of IBM HTTP Server 7.0 on Red Hat Enterprise Linux 6.2.

The installation mostly completes, but I see: -

$ cat /opt/IBM/HTTPServer/logs/install/log.txt 

...
(01-Jun-2012 19:17:27), Process, com.ibm.ws.install.ni.ismp.installtoolkitbridge.ISMPInstallToolkitBridgeForNIFramework, wrn, Config action failed: SetupAdm - /opt/IBM/HTTPServer/properties/version/nif/config/install/SetupAdm.ant
...
(01-Jun-2012 19:17:28), Process, com.ibm.ws.install.ni.ismp.actions.SetExitCodeAction, msg1, CWUPI0000I: EXITCODE=2
(01-Jun-2012 19:17:28), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFPARTIALSUCCESS
...

When I dig further into the logs: -

gunzip installconfig.log.gz
$ cat installconfig.log | grep -i fail

...
   <message>The exception message is: Execute failed: java.io.IOException: Cannot run program "/opt/IBM/HTTPServer/bin/setupadm" (in directory "/opt/IBM/HTTPServer/bin"): java.io.IOException: error=2, No such file or directory</message>
 <message>The translated exception message is: Execute failed: java.io.IOException: Cannot run program "/opt/IBM/HTTPServer/bin/setupadm" (in directory "/opt/IBM/HTTPServer/bin"): java.io.IOException: error=2, No such file or directory</message>
    <message>/opt/IBM/HTTPServer/properties/version/nif/config/install/SetupAdm.ant:198: Execute failed: java.io.IOException: Cannot run program "/opt/IBM/HTTPServer/bin/setupadm" (in directory "/opt/IBM/HTTPServer/bin"): java.io.IOException: error=2, No such file or directory

...

Hmmmm, looks familiar. What else did I forget to install ?

So I test the failing program: -

$ /opt/IBM/HTTPServer/bin/setupadm 

-bash: /opt/IBM/HTTPServer/bin/setupadm: /bin/ksh: bad interpreter: No such file or directory


Ooops

Time for a quick YUM: -

$ yum install ksh

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ksh.x86_64 0:20100621-12.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================
 Package       Arch             Version                     Repository        Size
===================================================================================
Installing:
 ksh           x86_64           20100621-12.el6             server           684 k

Transaction Summary
===================================================================================
Install       1 Package(s)

Total download size: 684 k
Installed size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : ksh-20100621-12.el6.x86_64                                      1/1 
Installed products updated.

Installed:
  ksh.x86_64 0:20100621-12.el6                                                     

Complete!

I re-run: -

/opt/IBM/HTTPServer/bin/setupadm 

and now see: -

......
EXECUTION MODE:

        COMMAND LINE Arguments:
                Run this script with command line arguments:
                -usr <userName> -grp <groupname> -cfg <IHS web server configfileNam
e>  
                -adm <IHS admin server configfilename> -plg <plugin-cfg.xml>(option
al)
ARGUMENTS:
       -silent:
                This allows this script to run without any messsage text.  
        -create:
  This  parameter  indicates that we will attempt to create 
a User and Group. You must be running as Root
......

which is much better.

Wil re-try my IHS installation now .....

Adding a local Yum repository to Red Hat Enterprise Linux 6.2

I'm indebted to this blog post: -

Creating A Local and HTTP RedHat Yum Repository

for much of my own post, as it helped me work out how I could set up Yellowdog Update Modified (YUM) on my own newly minted Red Hat Enterprise Linux 6.2 environment.

Having installed the 64-bit RHEL 6.2 VM this morning ( I'm running Oracle VirtualBox 4.1.2 on Ubuntu 12.04 ), I've been testing the automated deployment of IBM HTTP Server 7 ( that's another post for another day ).

During the installation of IHS, I hit a problem that I've seen before: -

(01-Jun-2012 13:00:35), Process, com.ibm.ws.install.ihs.ismp.actions.ExecWizardActionFromDirectory, err, java.io.IOException: Cannot run program "/opt/IBM/HTTPServer/bin/htpasswd" (in directory "/opt/IBM/HTTPServer"): java.io.IOException: error=2, No such file or directory
STACK_TRACE: 14
java.io.IOException: Cannot run program "/opt/IBM/HTTPServer/bin/htpasswd" (in directory "/opt/IBM/HTTPServer"): java.io.IOException: error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
        at java.lang.Runtime.exec(Runtime.java:604)
        at com.ibm.ws.install.ihs.ismp.actions.ExecWizardActionFromDirectory.executeProcess(ExecWizardActionFromDirectory.java:202)
        at com.ibm.ws.install.ihs.ismp.actions.ExecWizardActionFromDirectory.execute(ExecWizardActionFromDirectory.java:307)
        at com.installshield.wizard.StandardWizardListener.execute(StandardWizardListener.java:123)
        at com.installshield.wizard.StandardWizardListener.currentBeanChanged(StandardWizardListener.java:106)
        at com.installshield.wizard.Wizard$RunThread.run(Wizard.java:1569)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:197)
        at java.lang.ProcessImpl.start(ProcessImpl.java:101)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:463)
        ... 6 more


Last time out, I was running IHS on CentOS 6.2, so it was an easy solution; to install the ld-linux.so.2 library as follows: -

$ yum install ld-linux.so.2

which pulled the missing code straight off the 'net.

At the time, I blogged the problem and solution here.

This time around it was a little more complex, as I'm using RHEL for which one has to pay for access to the online repositories etc.

Whilst my company do have an internal Red Hat Network mirror, my PC wasn't hooked back in to the office network.

Given that I had the RHEL 6.2 DVD ( as an ISO image ), I wanted to see if/how I could install the missing library, plus any dependencies.

After some trial and a lot of error, I managed it, again thanks to the blog post mentioned previously.

*UPDATE* Before you can run step (c), it's necessary to install the createrepo RPM from the RHEL 6.2 DVD ( which I have mounted to /mnt ): -

$ rpm -ivh /mnt/Packages/deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
$ rpm -ivh /mnt/Packages/python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
$ rpm -ivh /mnt/Packages/createrepo-0.9.8-4.el6.noarch.rpm

Here's the shortened version: -

(a) Create a directory into which I'm going to copy the RHEL DVD: -

$ mkdir /var/repo
$ mkdir /var/repo/rhel6

(b) Copy the DVD contents ( where the ISO is mounted to /mnt ): -

$ cd /mnt
cp -r * /var/repo/rhel6/

(c) Create the YUM repository metadata ( this is created one level up from the DVD contents ): -

$ cd /var/repo
$ createrepo .

(d) Create the YUM repository pointing back at the newly created repository metadata

$ cd /etc/yum.repos.d/
vi server.repo

[server]
gpgcheck=1
name=Red Hat Enterprise Linux 6.2
baseurl=file:///var/repo


(e) Update YUM to have it pick up the new repository

$ yum clean

(f) Test by listing the available packages

$ yum list

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Installed Packages
ConsoleKit.x86_64                       0.4.1-3.el6                      @anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2
ConsoleKit-libs.x86_64                  0.4.1-3.el6                      @anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2
ConsoleKit-x11.x86_64                   0.4.1-3.el6                      @anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2
DeviceKit-power.x86_64                  014-3.el6                        @anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2
GConf2.x86_64                           2.28.0-6.el6                     @anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2
GConf2-devel.x86_64                     2.28.0-6.el6                     @anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2

...
                                             
yum-plugin-aliases.noarch                                                                      1.1.30-10.el6                                                                 server                                                
yum-plugin-changelog.noarch                                                                    1.1.30-10.el6                                                                 server                                                
yum-plugin-downloadonly.noarch                                                                 1.1.30-10.el6                                                                 server                                                
yum-plugin-tmprepo.noarch                                                                      1.1.30-10.el6                                                                 server                                                
yum-plugin-verify.noarch                                                                       1.1.30-10.el6                                                                 server                                                
yum-plugin-versionlock.noarch                                                                  1.1.30-10.el6                                                                 server                                                
yum-presto.noarch                                                                              0.6.2-1.el6                                                                   server                                                
zlib-devel.i686                                                                                1.2.3-27.el6                                                                  server                                                
zsh.x86_64                                                                                     4.3.10-4.1.el6                                                                server


(g) Install my package: -

$ yum install gtk2.i686

( this installs about 45 MB of code, including the missing ld-linux.so.2 )

(h) Test IHS

$ /opt/IBM/HTTPServer/bin/htpasswd

Usage:
        htpasswd [-cmdpsD] passwordfile username
        htpasswd -b[cmdpsD] passwordfile username password

        htpasswd -n[mdps] username
        htpasswd -nb[mdps] username password
 -c  Create a new file.
 -n  Don't update file; display results on stdout.
 -m  Force MD5 encryption of the password.
 -d  Force CRYPT encryption of the password (default).
 -p  Do not encrypt the password (plaintext).
 -s  Force SHA encryption of the password.
 -b  Use the password from the command line rather than prompting for it.
 -D  Delete the specified user.
On Windows, NetWare and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.


The job, as they say, is a good 'un.

Thanks, Rus, you're a star :-)

Thursday, 31 May 2012

Social Connections goes to Dublin. Will you be there ?

The third Social Connections event will take place on 22nd of June 2012 at IBM Dublin, Ireland.   

 For the third time since its creation in 2010 the Social Connections user group will be hosting an international IBM Connections User Group event. The next event will be hosted from the mothership of IBM Connections, the IBM Development labs: Dublin, Ireland. The event is aimed at anyone interested in, or working with IBM Connections, and aims to bring together the best of the best of Social Business. 

 Speakers from across the globe will travel to Dublin to present on topics that promise to engage people of all backgrounds interested in Social Business, collaboration and anything IBM Connections. Whether you're an Administrator, Developer, Manager, Educator, Student or just a Connections User, you'll find something that is sure to conjure new ideas, form new connections, and get you excited about current and future Social Business practice. So join us to connect, collaborate, exchange and learn! 

 Admission is free and includes access to all sessions by esteemed speakers, lunch and a reception at the Guinness Storehouse to follow the conference.

 Head to the Registration tab to register for the event (remember, it's free!) - we are over 85% full now so be quick!  If you're interested in being a sponsor, we have just a few slots left so get in touch ASAP!

 So don't delay, register today :-)

Tuesday, 29 May 2012

More on Mac keyboard shortcuts - navigating to the menu bar

Whilst helping a colleague work out how he could use his keyboard to change the colour of a piece of text in a Lotus Notes memo, I Googled across this rather useful blog post: -


Following his advice, I changed the keyboard shortcut for "Move focus to the menu bar" to [`][Alt][Cmd].

Now I can "simply" press: -

[`][Alt][Cmd]
t
[Return]
c
b


to select the colour blue.

Simple !!!

Saturday, 26 May 2012

SnappArchive for IBM Lotus Quickr (Domino)

Saw this on the Skype chat this AM, posted by the most excellent Rob Novak ( @LotusRockstar )

So to today's topic: what happens when you're finished with a Quickr place? Most will answer "nothing ." Some will say it gets archived, which is to say that it's copied (or they use qptool archive) as a Quickr place, only to be retrieved in the future if needed -- and if so, it must be reconstituted as a Quickr place (and potentially upgraded!). In either case, at the conclusion of a Quickr place's life on the Quickr server, all organizational knowledge and documents associated with that place go into a black hole! 

Today we're announcing a brand new solution to this problem, SnappArchiveTM for IBM Lotus Quickr (Domino). We have spent nearly a year of development to create three offerings - SaaS and two license types -- that perform a task that's simple in concept but so complex in execution that nobody's really done it at scale in Quickr's >13 year history. 


If you use Quickr Domino, you should definitely take a look at this, as it may well fill a gap .....

I'll be suggesting to one of my QD customers as soon as I finish writing this blog post ....

Note to self - Firefox and local connections

 Whilst trying to hit my NAS from Firefox on my Mac, I kept seeing errors such as:- Unable to connect Firefox can’t establish a connection t...