Thursday, December 6, 2012

Prerequisites to perform updates on IBM systems automatically for linux


I did a fresh install of a redhat linux server (on IBM hardware), and tried to perform an update of firmware using IBM tools. This applies to UpdateXpress Installer and to all the tools that exploit it to perform the upgrades, such as Flex System Manager, IBM Systems Director, etc.

I found out that a prerequisite is to have the libstdc++.so.5 package installed on your system. 

I just issued the following command as root 

yum install libstdc++.so.5

and the trick was done!

P.S: To configure yum please refer to the followin blog post: Update Redhat Enterprise Linux with yum using the base install CD as a repository


Access the Megaraid Storage Manager Utility using a domain account

Yesterday I was at a customer's site, he has IBM servers that use the MegaRAID family of adapters.
In order to manager the arrays we installed the Megaraid Storage Manager utility.
The utility requires authentication each time you try to manage a system.

And here we come to the issue: the server is a member server in an Active Directory Domain and the customer wanted to access the utility using a domain account.

We tried to use LDAP settings and everything without success.

We finally discovered that none of this is necessary.

You just need to open the Megaraid Storage Manager, click Login against the desired server,



and specify the credentials in this form:
username@yourdomain.com


BOOM! You're done!


How to find which files contain a string in LINUX

Say you want to find which files contain a certain string in linux. Here's how you do it.



find . | xargs grep 'string' -sl


The -s is for summary and won't display warning messages such as grep: ./directory-name: Is a directory
The -l is for list, so we get just the filename and not all instances of the match displayed in the results.

Also useful is, if you want to limit the files to be searched for. 

find . -iname '*.sh' | xargs grep 'string' -sl




Friday, November 30, 2012

Update Redhat Enterprise Linux with yum using the base install CD as a repository

I want yum, the update utility in Redhat Linux, to pick up files from the install CD. I find this simpler as I usually run Linux on virtual machines and the cd remains mapped and accessible. I am running redhat enterprise linux 6.2

Here's what I did:

  1. Create a directory to mount the cd into. Here's the command:
    mkdir /media/rhel62
  2. Mount RHEL 6 ISO to /media/rhel6 here's the command:
    mount -o loop RHEL6.2-20111117.0-Server-x86_64-DVD1.iso /media/rhel62
  3. Copy media.repo file from the RHEL ISO to /etc/yum.repos.d/ here's the command:
    cp /media/rhel62/media.repo /etc/yum.repos.d/rhel6.repo
  4. Configure the repo file to point to the /media/rhel6. To do so  open the file /etc/yum.repos.d/rhel6.repo and add following line
    baseurl=file:///media/rhel62/Server
    It is a good idea to change the repo name by changing the string contained in the [ ] at the beginning of the file
  5. Create the repository package. Here's the command:
    yum install createrepo
  6. Create a directory to store the repodata file into and create the repository. I used /repodata. So the commands are:
    mkdir /repodata
    cd /repodata
    createrepo .
  7. Finally clean up
    yum clean all 

From now on every yum install command will get the updates from the CD.
Don't forget to automount the iso image, so that your settings are preserved after a reboot.
To do so add the following line in /etc/fstab:

/tmp/RHEL6.2-20111117.0-Server-x86_64-DVD1.iso /media/rhel62     iso9660 loop,ro,auto    0       0



Please Note: if you want to use the same method for other features in Redhat linux such as HighAvailability , LoadBalancer , ResilientStorage and ScalableFileSystem then you 'll need to add more lines in the rhel6.repo file. Here's a link to the source of the information I presented:
https://access.redhat.com/knowledge/node/9743