Showing posts sorted by relevance for query centos. Sort by date Show all posts
Showing posts sorted by relevance for query centos. Sort by date Show all posts

Wednesday, 14 March 2012

Mountain mounting problems with Oracle VM VirtualBox on CentOS

I'm making more use of VirtualBox as a "free" virtualization tool on Linux, working alongside VMware Fusion that I use on the Mac.

My host OS is CentOS 6.2, and I'm using VirtualBox 4.1.8.

Having happily created VMs containing Windows Server 2003 R2 and Red Hat Enterprise Linux 5.5, I wanted to create a third VM running .... CentOS 6.2.

I went through the usual process to create the VM, and then added a new virtual CD/DVD drive to connect to the ISO that contains CentOS: -

CentOS-6.2-x86_64-LiveCD.iso

Sadly, however, VirtualBox through up a really useful ( NOT ) error message: -


Failed to open the CD/DVD image /media/LenovoExternal/Products/CentOS/CentOS-6.2-x86_64-LiveCD.iso.

The medium '/media/LenovoExternal/Products/CentOS/CentOS-6.2-x86_64-LiveCD.iso' can't be used as the requested device type.

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Medium
Interface: IMedium {53f9cc0c-e0fd-40a5-a404-a7a5272082cd}
Callee: IVirtualBox {c28be65f-1a8f-43b4-81f1-eb60cb516e66}


I did some digging around, but couldn't see anything obvious - I even tried re-running the setup script: -

$ sudo /etc/init.d/vboxdrv setup

but to no avail.

Knowing that this process had worked with other ISOs ( for W2K3 and RHEL ), I was pretty sure that the problem was with the ISO, rather than with VirtualBox.

I checked the permissions that I had to the ISO: -

$ ls -al /media/LenovoExternal/Products/CentOS/

total 714752
drwxr-xr-x. 1 nobody nobody         3 Jan 28 15:57 .
drwxrwxrwx. 1   1000   1000        63 Jan 28 15:57 ..
-rw-r-----. 1 nobody nobody 731906048 Dec 16 06:07 CentOS-6.2-x86_64-LiveCD.iso


I then compared this against the ISO for RHEL: -

$ ls -al /media/LenovoExternal/Products/RHEL/

total 6621424
drwxrwxrwx. 1 1000 1000          4 May 26  2010 .
drwxrwxrwx. 1 1000 1000         63 Jan 28 15:57 ..
-rwxrwxrwx. 1 1000 1000 3076845568 Jun 21  2009 RHEL5.2-Server-20080430.0-i386-DVD.iso
-rwxrwxrwx. 1 1000 1000 3703490560 May 25  2010 RHEL5.5-Server-20100322.0-x86_64-DVD.iso


Notice the difference ?

Yep, you guessed it - the permissions to the CentOS ISO were too restrictive e.g. the user that I'm running VirtualBox as - hayd - did not have access to the ISO.

I changed this as follows: -

$ chmod a+r CentOS-6.2-x86_64-LiveCD.iso

and VirtualBox popped into life.

Simple, now if only the VB message had been a BIT more revealing .....

Thursday, 29 December 2011

Creating a bootable USB key under Apple Mac OSX

I wanted to install a new (to me) Linux distribution - CentOS - onto my Thinkpad W500, and was looking to avoid finding and using a CD-ROM or DVD.

Having a spare USB thumb-drive kicking about, I was hoping that I could use that instead, and also "burn" the image from my Mac.

I'd already downloaded the CentOS ISO to my Mac Downloads folder, and had previously mounted it.

A quick Google search found me this MacRumours forum thread - how to "burn" an ISO to USB flash drive? - which provided a variety of answers, some positive, some not-so-positive.

Having said that, I scrolled to the very end of the thread, and found this post - Final Solution - from someone called Candlejack, which had the answer.

Basically, it's a bunch of Terminal commands :-) 

$ diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Hard Disk               319.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.3 GB     disk1
   1:                 DOS_FAT_32 DISK_IMG                8.3 GB     disk1s1
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            CentOS-6.2-x86_6       *731.9 MB   disk2

$  diskutil unmountDisk /dev/disk1

Unmount of all volumes on disk1 was successful

$  dd if=/dev/disk2 of=/dev/disk1 bs=1m

dd: /dev/disk2: Resource busy

$  diskutil unmountDisk /dev/disk2

Unmount of all volumes on disk2 was successful

$ dd if=/dev/disk2 of=/dev/disk1 bs=1m

698+0 records in
698+0 records out
731906048 bytes transferred in 206.409147 secs (3545899 bytes/sec)

Job done.

I was then able to boot the Thinkpad from the USB drive ( via the [F12] function key ) and install CentOS, far far quicker than I could've installed from a CD or DVD.

PS For the record, I've previously blogged about CentOS, with regard to installing IBM HTTP Server on it here.

Tuesday, 27 December 2011

Installing IBM HTTP Server 7 on CentOS Linux 6.2

Working with a friend to get IHS v7 working on CentOS 6.2, he ( and eventually I ) were hitting the following exception: -

(Dec 27, 2011 8:09:47 PM), 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: 15
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.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.Throwable.<init>(Throwable.java:67)
        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

In order to prove and, hopefully, resolve the issue, I downloaded CentOS ( CentOS-6.2-x86_64-LiveCD ) as a 700 MB ISO image. From this, I was able to quickly create a new virtual machine using VMware Fusion, and go through the IHS installation.

Given that I'm using a 64-bit version of CentOS, I also needed to install the corresponding package of IHS - for the record, IHS v7 is a 32-bit binary BUT is delivered in two packages; one 32-bit and one 64-bit.

( If you're looking for more detail, check out my other blog posts here and here )

I downloaded the x86-64 version of the product via this image: -

IBM WebSphere Application Server V7.0 Supplements (1 of 2) for Linux on x86-64 bit (IBM HTTP Server, Web Server Plug-ins and Update Installer) Multilingual (C1G00ML) - 246 MB

as detailed here: -


and unpacked the corresponding TAR file - C1G00ML.tar.gz.

$ cd /tmp
$ mkdir IHS
$ cd IHS
$ tar xvzf C1G00ML.tar.gz  

and ran the installation routine: -

$ ./IHS/install

This ran through, with me taking all the defaults, and completed BUT displayed the following message: -


When I looked at the log.txt file, I saw the exception referred to previously: -

<snip>
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
</snip>

When I attempted to manually run the htpasswd program: -

$ /opt/IBM/HTTPServer/htpasswd

it failed with: -

bash: /opt/IBM/HTTPServer/bin/htpasswd: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

A quick Google search threw up this hit which suggested that I was missing the ld-linux.so.2 library ( which actually ties up with the above error !! ) and, more importantly, showed me the way to go home …..

Simply put, I needed to install the library as follows: -

$ yum install ld-linux.so.2

which downloaded 4.4 MB of code: -

================================================================================
 Package                   Arch        Version                Repository   Size
================================================================================
Installing:
 glibc                     i686        2.12-1.47.el6          base        4.3 M
Installing for dependencies:
 nss-softokn-freebl        i686        3.12.9-11.el6          base        116 k

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


Having done that, htpasswd now runs perfectly: -

$ /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.


I removed and reinstalled IHS; I still see the "Partial Success" message, but no longer see any nasty exceptions relating to htpasswd and I'm able to start/stop/use IHS without problems.

:-)

Saturday, 14 April 2012

CentOS Linux - Reading AND Writing NTFS

I had a bit of an "Ooops" moment yesterday, when I had  an urgent need to share some virtual machines with a colleague; Active Directory 2003 and DB2 UDB /  IBM Tivoli Directory Integrator.

Having converted them from VirtualBox to VMware ( more on this in another post ), I went to write them to his USB drive ....

Ah, his drive is formatted with NTFS because he uses Windows .....

... and my USB drive is formatted with HFS+ because I use it with Linux and Mac ....

Thankfully, a quick Google search helped me add NTFS support to CentOS: -

RPMforge for CentOS 6.0

$ wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
$  rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
$ rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
$ rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
$ yum -y install ntfs-3g

I've used NTFS-3G and MacFUSE on the OSX Lion box, but this is the first time I've tried it with CentOS.

Nice one :-)

Thursday, 29 December 2011

Mounting an Apple OSX HFS+ drive under CentOS Linux

Back in the day, I chose to format my USB external drives using the Apple Mac OSX Hierarchical File System (HFS) format, aka HFS+ or HFSPlus.

This is sometimes a pain when I need to share files with colleagues using Microsoft Windows, but c'est la vie - it's their choice for using such an obscure OS :-)

More importantly, I was somewhat dismayed to find that the CentOS distribution that I've just started to play with does NOT include HFS+ support out-of-the-box.

This compares to Ubuntu, which ( afaik ) has had HFS+ support for some time now.

However, it was an easy problem to solve - after a quick(ish) Google search, I found this thread on the www.centos.org site, which recommends adding the elrepo.org repository to CentOS: -

$ rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org

before downloading the required RPM file: -

$ rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm

and installing the HFS+ drivers: -


$ yum install kmod-hfsplus

As ever, job done - thanks, Internet, we love you :-)

Saturday, 1 August 2015

CentOS Linux - Setting up Yum

Following an earlier post: -


I've just gone through the same process with a freshly downloaded copy of CentOS 

mount /dev/cdrom  /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.9-22.el6.noarch.rpm 

rpm --import /mnt/RPM-GPG-KEY-CentOS-6 

mkdir /var/repo

mkdir /var/repo/centos66

cd /var/repo/centos66/

cp -R /mnt/Packages/* .

cd ..

createrepo .

cd /etc/yum.repos.d/

vi server.repo

[server]
gpgcheck=1
name=Centos66
baseurl=file:///var/repo

yum list

umount /mnt

yum install -y telnet

Saturday, 17 March 2012

Installing DB2 UDB 9.7 on CentOS Linux 6.2

More notes from the field ....

This time I'm installing DB2 UDB as a precursor for an IBM Connections and WebSphere Portal deployment.

I've unpacked DB2 as follows: -

$ cd /tmp
$ tar xvf /media/LenovoExternal/Products/DB297/db297linux64.tar

and then commenced the installation: -

$ ./db2setup

WARNING:
   The 32 bit library file libstdc++.so.6 is not found on the system.
   32-bit applications may be affected. 
DBI1190I  db2setup is preparing the DB2 Setup wizard which will guide
      you through the program setup process. Please wait.

Noting the WARNING re libstdc++, I've opened a new terminal window, and run: -

$ yum install libstdc++.so.6

which ties up with my other experiences of IBM software on CentOS: -

http://portal2portal.blogspot.co.uk/search?q=centos

Other than that, the DB2 installation has completed successfully.

I've then "logged in" as the DB2 instance owner - db2inst1: -

$ su - db2inst1

and attempted to create the sample database: -

$ db2sampl

  Creating database "SAMPLE"...
  Attempt to create the database "SAMPLE" failed.
  SQL0970N  The system attempted to write to a read-only file.  SQLSTATE=55009

  'db2sampl' processing complete.

Again I've seen this before: -

http://portal2portal.blogspot.co.uk/2009/06/sql0970n-when-running-db2sampl-on-unix.html

As before, look at the permissions for /tmp: -

$ ls -al /

drwxrwxr-x.  17 185101 330209  4096 Mar 17 04:24 tmp

and then change them: -

$ chmod 777 /tmp

Look again ...

$ ls -al /

drwxrwxrwx.  18 185101 330209  4096 Mar 17 04:25 tmp

$ db2sampl

  Creating database "SAMPLE"...
  Connecting to database "SAMPLE"...
  Creating tables and data in schema "DB2INST1"...
  Creating tables with XML columns and XML data in schema "DB2INST1"...

  'db2sampl' processing complete.

Job done :-)

Wednesday, 7 June 2017

Using Atom Text Editor on CentOS Linux

I've been recently converted to the Atom text editor on my Mac, so thought that I'd do the same on my newly minted Linux box, which is running CentOS: -

cat /etc/redhat-release

CentOS Linux release 7.3.1611 (Core)

Having downloaded Atom from here: -

https://atom.io/download/rpm

I ended up with the following RPM: -

-rw-rw-r--.  1 hayd hayd 99606115 Jun  7 11:10 atom.x86_64.rpm

and tried/failed to install it: -

sudo rpm -ivh atom.x86_64.rpm

error: Failed dependencies:
    libXss.so.1()(64bit) is needed by atom-1.17.2-0.1.x86_64

I assumed that the solution would be simple; merely install the missing library: -

sudo yum install -y libXss.so.1

Amongst other things, this installed

libXScrnSaver-1.2.2-6.1.el7.i686.rpm

However, when I retried the installation: -

sudo rpm -ivh atom.x86_64.rpm

it again failed with: -

error: Failed dependencies:
    libXss.so.1()(64bit) is needed by atom-1.17.2-0.1.x86_64

When I thought further, I realised that I'd merely installed the 32-bit version of libXScreenSaver ( i686 ), whereas I was trying to install the 64-bit version of Atom.

I re-ran my installation: -

sudo yum install -y libXss.so*

which pulled libXScrnSaver.x86_64 0:1.2.2-6.1.el7

This time around, I was able to happily install Atom: -

sudo rpm -ivh atom.x86_64.rpm

Preparing...                          ################################# [100%]
Updating / installing...
   1:atom-1.17.2-0.1                  ################################# [100%]

Thursday, 1 March 2012

IBM HTTP Server and CentOS Linux - Global Security Toolkit (GSK) not playing nicely

I'm breaking new ground, at least for me, with SSL certificates etc. within IBM HTTP Server on a current project, and have been expanding my knowledge of the Global Security Toolkit (GSK) on my own CentOS environment.

I've written about CentOS and IBM software before so this is merely a continuation of the series :-)

So when I saw an exception trying to run certain GSK commands such as gsk7cmd, I immediately assumed that I might be missing a shared library of some sort.

I confirmed this by running: -

$ cd /opt/IBM/HTTPServer/bin
$ ./gsk7ver 

which returned: -

/opt/IBM/HTTPServer/gsk7/bin/gsk7ver: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

I fixed this by running: -

$ yum install libstdc++.so.5

and was then able to re-run GSK commands, including gsk7ver.

More to come …...

Friday, 13 January 2012

CentOS Linux and IBM Software - The Story Continues ….

There's a great post here from Collaboration Ben about the joys of deploying IBM Tivoli Directory Integrator onto CentOS Linux.

He was seeing: -

"Bundled JRE is not binary compatible with the host OS/Arch or it is corrupt. Testing bundled JRE failed."

which is nice.

Want to know more ? Then check his post out ….

I'll be trying this myself in a few days, so it's very timely …..

PS My experiences thus far with CentOS are here.

Saturday, 25 February 2012

Installing Rational Software Architect 8.0.3 on CentOS Linux 6.2

More fun with CentOS, this time it's Rational Software Architect …

Initially, I saw the same sort of issues that I'd previously seen with IBM HTTP Server including: -

...
/bin/bash: /tmp/RSA803/RSA_SETUP/InstallerImage_linux_gtk_x86/install: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
…

...
libgcc_s.so.1 must be installed for pthread_cancel to work
…

which I resolved with: -

$ sudo yum install ld-linux.so.2

and

$ sudo yum install libgcc_s.so.1

respectively.

However, I was still struggling, with errors such as: -

$ ./InstallerImage_linux_gtk_x86/installc -acceptLicense

CRIMA9C35370BE ERROR: The package IBM® Rational® Software Architect requires system library libstdc++.so.5 or libstdc++.so.6. Make sure libstdc++.so.5 or libstdc++.so.6 is available in the system library path before installing this package.

which I resolved with: -

$ yum install libstdc++.so.6

and: -

$ ./InstallerImage_linux_gtk_x86/installc -acceptLicense

java.io.IOException: Cannot run program "lsb_release": java.io.IOException: error=2, No such file or directory

which I resolved with: -

$ sudo yum install redhat-lsb

Finally, I needed to use strace as follows to dig into the additional missing packages e.g. 

$ strace -o /tmp/output.txt ./InstallerImage_linux_gtk_x86/installc -acceptLicense

which led me to install these additional packages: -

$ sudo yum install libX11.so.6
$ sudo yum install libgdk-x11-2.0.so.0
$ sudo yum install libpk-gtk-module.so
$ sudo yum install libcanberra-gtk-module.so

Having done that, the RSA 803 installation took 5-10 minutes.

Job done :-)

Tuesday, 8 March 2016

Playing with Veertu on the Mac

I heard about Veertu on a recent British Tech Network Mac podcast and have been tinkering with it on and off since.

From their website: -

• Run Windows and Linux on your Mac.
• Fast, light and secure.
• The only virtualization solution approved by Apple App Store.

The free-to-use version only allows one to create VMs by downloading the "raw" ISOs from the internet: -



Therefore, I chose to download/install CentOS Linux.

One thing that caught me out was that, having chosen a minimal installation, I found that when I logged in, I was unable to get access to the most basic commands, specifically ifconfig.

As ever, a quick Google search took me here: -


which had me use: -

yum install net-tools

to install the net-tools package, which includes ifconfig, from the public CentOS mirror.

Of course,  had my VM not had network connectivity ……

:-)

I'll continue to tinker and post back in due course ….

Thursday, 8 June 2017

After Atom on Centos, Atom on Ubuntu is soooo much easier

After yesterday's post: -

Using Atom Text Editor on CentOS Linux

doing it on Ubuntu is SOO much easier: -

Download it

wget https://atom.io/download/deb

Install it

sudo dpkg --install /home/hayd/Downloads/atom-amd64.deb

Fix up the dependencies ( including Git )

sudo apt-get -f install

Use it

atom

Job's a good 'un

Tuesday, 24 June 2014

Installing and Using Oracle Java7 on Red Hat Enterprise Linux

So, having downloaded the latest Oracle JRE from here: -


I wanted to set it as the default JVM on my Red Hat Enterprise Linux Server release 6.5 (Santiago) box ( instead of the stock OpenJDK JVM ): -

$ java -version

java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (rhel-5.1.13.3.el6_5-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
[root@rhel6 ~]# /usr/sbin/update-alternatives --install /usr/java/latest
alternatives version 1.3.49.3 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.


Add the new JRE as an option

$ /usr/sbin/update-alternatives --install /usr/bin/java java7 /usr/java/latest/bin/java 2

Configure my chosen JRE

$ /usr/sbin/update-alternatives --config java7

There is 1 program that provides 'java7'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/java/latest/bin/java

Enter to keep the current selection[+], or type selection number: 1


Validate

$ java -version

java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)


Thanks to this blog post for sharing: -



Friday, 11 September 2015

"Network is unreachable" with Red Hat Enterprise Linux

I had a PEBCAK moment earlier this evening.

I was trying to work out why I was getting: -

Network is unreachable

when I was trying to contact ( ping ) a host external to my Red Hat Enterprise Linux VM.

The VM is running under VMware Fusion on my Mac, and I'm using Network Address Translation (NAT).

I have a static IP address that falls into the subnet of my Mac's external WiFi network, configured as follows: -

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

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.33.100
NETMASK=255.255.255.0
BROADCAST=192.168.33.255


I'd already checked the DNS configuration for my VM: -

cat /etc/resolv.conf 

; generated by /sbin/dhclient-script
search localdomain uk.ibm.com
nameserver 192.168.33.2


However, when I switched back to using DHCP: -

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

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp

I got an IP address in the same subnet.

So it's NOT the address, and it's not the DNS configuration.

So what can it be, I hear you cry ?

Yep, you've guessed it :-)

I'd FORGOTTEN to set the default gateway :-)

For a static IP address, this needs to be set in one of two places.

For me, I did it thusly: -

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

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.33.100
NETMASK=255.255.255.0
BROADCAST=192.168.33.255
GATEWAY=192.168.33.2

which sets it for that particular interface - eth0.

I could've set it globally as follows: -

cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=bpm856.uk.ibm.com
GATEWAY=192.168.33.2

Thanks to Google for pointing me in the right direction : -



Friday, 7 August 2015

CRIMA1002W WARNING: The following repositories are not connected

Recently, I've been creating some enablement materials to coach people new to IBM middleware to get up-to-speed with some of our products.

This included creating a document that takes one through the end-to-end process of installing the relevant binaries, having previously created a CentOS 6.6 Linux virtual machine, onto which the products are then installed.

One thing that was a little niggling was a warning message from IBM Installation Manager (IIM): -

CRIMA1002W WARNING: The following repositories are not connected:
-/Repository/IIM

Explanation: Failed to connect to one or more repositories. The repository might be unavailable for several reasons.

User Action: Check the following items:
Verify the repository location is correct.
For repositories that require credentials, verify that the credentials are correct. Credentials can be set in the Repositories preference.
Verify the network connection is available. 
For environments that use proxies, verify the proxy settings are correct. Proxy settings can be set in the HTTP/FTP preference.
Update offerings require that base offerings be available. Verify the base offering is available in a repository. Use the listAvailablePackages command to view the packages available in a repository.
If you are using the IBM Passport Advantage site, verify the connection to the site is correct. Verify the Passport Advantage connection in the Passport Advantage preference.
For environments that use firewalls, verify that access to the repository location is available.
WARNING: /Repository/IIM is not a repository. It is an install package for Installation Manager version 1.8.1 (internal version 1.8.1000.20141126_2002). Installation Manager version 1.8.1 (internal version 1.8.1000.20141126_2002) is already installed.


seen during the installation of products such as IBM HTTP Server, WebSphere Application Server, IBM Operational Decision Manager etc.

The reason that this occurs is that I'd created a response file to actually install IIM as the precursor to everything else.

This is the response file that I was using: -

/Repository/ResponseFiles/installIIM181.rsp 
<?xml version="1.0" encoding="UTF-8"?>
<agent-input>
<server>
<repository location='/Repository/IIM'/>
</server>
<profile id='IBM Installation Manager' installLocation='/opt/ibm/InstallationManager/eclipse' kind='self'>
<data key='eclipseLocation' value='/opt/ibm/InstallationManager/eclipse'/>
<data key='user.import.profile' value='false'/>
<data key='cic.selector.os' value='linux'/>
<data key='cic.selector.arch' value='x86_64'/>
<data key='cic.selector.ws' value='gtk'/>
<data key='cic.selector.nl' value='de,no,fi,ru,hr,fr,hu,sk,sl,sv,ko,el,en,pt_BR,it,iw,zh,es,cs,ar,zh_HK,zh_TW,th,ja,pl,da,tr,nl'/>
</profile>
<install modify='false'>
<offering id='com.ibm.cic.agent' version='1.8.1000.20141126_2002' profile='IBM Installation Manager' features='agent_core,agent_jre' installFixes='none'/>
</install>
<preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='/opt/ibm/IMShared'/>
<preference name='com.ibm.cic.common.core.preferences.connectTimeout' value='30'/>
<preference name='com.ibm.cic.common.core.preferences.readTimeout' value='45'/>
<preference name='com.ibm.cic.common.core.preferences.downloadAutoRetryCount' value='0'/>
<preference name='offering.service.repositories.areUsed' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.ssl.nonsecureMode' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication' value='false'/>
<preference name='http.ntlm.auth.kind' value='NTLM'/>
<preference name='http.ntlm.auth.enableIntegrated.win32' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.keepFetchedFiles' value='false'/>
<preference name='PassportAdvantageIsEnabled' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.searchForUpdates' value='false'/>
<preference name='com.ibm.cic.agent.ui.displayInternalVersion' value='false'/>
<preference name='com.ibm.cic.common.sharedUI.showErrorLog' value='true'/>
<preference name='com.ibm.cic.common.sharedUI.showWarningLog' value='true'/>
<preference name='com.ibm.cic.common.sharedUI.showNoteLog' value='true'/>
</agent-input>


which I installed thusly: -

/Repository/IIM/tools/imcl -input /Repository/ResponseFiles/installIIM181.rsp -acceptLicense

This causes IIM to install FROM the /Repository/IIM location into /opt/ibm/InstallationManager. More importantly, it also leaves /Repository/IIM in the list of repositories that IIM can use in the future; each new installation appends its own stuff to the list, which COULD become a problem down the line i.e. IF a repository is no longer accessible, IIM will whinge with the same warning :-)

However, that's the root of the warning message. As far as I can establish, the issue occurs because IIM cannot be installed using IIM once IIM is installed :-)

There are two solutions :-)

Firstly, one can use IIM in command-line mode to remove the errant repository: -

/opt/ibm/InstallationManager/eclipse/tools/imcl -c

( yes, I know that IIM does have GUI and web consoles, but I like CLI ! )

Secondly, one can avoid adding /Repository/IIM to the IIM repository list during the initial installation of IIM.

This is the better approach for the future, and could also be used for other products

It's a simple change to the original installIIM181.rsp response file: -

<?xml version="1.0" encoding="UTF-8"?>
<agent-input>
<server>
<repository location='/Repository/IIM' temporary='true'/>
</server>
<profile id='IBM Installation Manager' installLocation='/opt/ibm/InstallationManager/eclipse' kind='self'>
<data key='eclipseLocation' value='/opt/ibm/InstallationManager/eclipse'/>
<data key='user.import.profile' value='false'/>
<data key='cic.selector.os' value='linux'/>
<data key='cic.selector.arch' value='x86_64'/>
<data key='cic.selector.ws' value='gtk'/>
<data key='cic.selector.nl' value='de,no,fi,ru,hr,fr,hu,sk,sl,sv,ko,el,en,pt_BR,it,iw,zh,es,cs,ar,zh_HK,zh_TW,th,ja,pl,da,tr,nl'/>
</profile>
<install modify='false'>
<offering id='com.ibm.cic.agent' version='1.8.1000.20141126_2002' profile='IBM Installation Manager' features='agent_core,agent_jre' installFixes='none'/>
</install>
<preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='/opt/ibm/IMShared'/>
<preference name='com.ibm.cic.common.core.preferences.connectTimeout' value='30'/>
<preference name='com.ibm.cic.common.core.preferences.readTimeout' value='45'/>
<preference name='com.ibm.cic.common.core.preferences.downloadAutoRetryCount' value='0'/>
<preference name='offering.service.repositories.areUsed' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.ssl.nonsecureMode' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication' value='false'/>
<preference name='http.ntlm.auth.kind' value='NTLM'/>
<preference name='http.ntlm.auth.enableIntegrated.win32' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.keepFetchedFiles' value='false'/>
<preference name='PassportAdvantageIsEnabled' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.searchForUpdates' value='false'/>
<preference name='com.ibm.cic.agent.ui.displayInternalVersion' value='false'/>
<preference name='com.ibm.cic.common.sharedUI.showErrorLog' value='true'/>
<preference name='com.ibm.cic.common.sharedUI.showWarningLog' value='true'/>
<preference name='com.ibm.cic.common.sharedUI.showNoteLog' value='true'/>
</agent-input>


This avoids IIM persisting IIM to IIM, which avoids the warning down the line.

I thank this post: -


on Jazz.net for inspiration.

Friday, 1 June 2012

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 :-)

Monday, 31 July 2017

Solved, WebSphere eats Linux - or, Linux reboots when WAS JVM starts up

So I've been working an interesting "bug" over the past few days.

The long story short is that we had a VM running Red Hat Enterprise Linux 6.6 ( with kernel 2.6.32-696.3.1.el6.x86_64 ), hosting WebSphere Application Server 8.5.5.8 and BPM Standard 8.5.7.0.

BPM is installed a single cluster, with all of the workload running in a single JVM - in this instance.

Whilst I could happily start the Deployment Manager and Node Agent, when I started the actual BPM JVM, after a minute or two, the box would reboot.

This was 100% reproducible.

I spent a happy day last week debugging this, looking at class paths, dependent JARs, auto starting EAR files etc. but to no avail.

I even wondered whether the fact that we were running slightly older versions of WAS and BPM was pertinent, even though I've used them a million times before.

Interestingly, nothing showed up in dmesg or /var/log/messages or /var/log/kernel.log and there was no obvious kernel panic messages therein.

Thankfully, with the help of a VMware SME, we did find this : -

tail -f /var/crash/127.0.0.1-2017-07-31-10:43:30

...
<2>kernel BUG at drivers/net/vmxnet3/vmxnet3_drv.c:1412!
<4>invalid opcode: 0000 [#1] SMP
<4>last sysfs file: /sys/devices/system/cpu/online

…

which tied up with this: -


which says, in part : -

<snip>
This issue affects all virtual machines running on ESXi 6.5 host (with virtual hardware version 13), the guest will freeze randomly (sometimes several minutes after power on, and sometimes freezes several hours from boot).

I got this kernel panic log several times, possibly this issue was caused by VMXNET3.

All kernel newer than 4.8.x are affected with this issue, if I downgrade the kernel version back to 4.4.x, the VMs will work like a charm.

(Guest OS is CentOS 7.3 with kernel-ml)

And this issue doesn't happen while virtual hardware version 11 with ESXi 6.5, only happen on virtual hardware version 13 + ESXi 6.5.
</snip>

My friendly VMware SME spotted this, and suggested that we switch the virtual Network Interface Card (vNIC) to use a different driver - namely e1000.

We did this and …. voila :-)

The BPM runtime starts happily and all is good.

This appears to be related to the specific version of VMware ESX ( aka vSphere ) and the fact that the Linux VM is newly created, using the most recent virtual hardware version.

So that's all good then ….

Monday, 4 December 2017

Running IBM HTTP Server via Linux scripts and sudo - an update

This updates a post that I wrote back in 2012, which was based around Red Hat Enterprise Linux 6.

I've had another go at this, testing on Red Hat Enterprise Linux 7.4, and have a different solution.

In essence, RHEL 7 is now using systemd rather than chkconfig, so here's an alternative: -

Create the Service - as root

vi /etc/systemd/system/ibmhttpd.service  

[Unit]
Description=IBM HTTP Server
After=network.target

[Service]
Type=forking
PIDFile=/opt/ibm/HTTPServer/MFP/logs/httpd.pid
User=wasadmin
ExecStart=/opt/ibm/HTTPServer/bin/apachectl -k start -f /opt/ibm/HTTPServer/MFP/conf/httpd.conf
ExecStop=/opt/ibm/HTTPServer/bin/apachectl -k stop -f /opt/ibm/HTTPServer/MFP/conf/httpd.conf
PrivateTmp=true
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

Reload systemd - as root

sudo systemctl daemon-reload

Start the service - as root

systemctl start ibmhttpd

Check the service status - as root

systemctl status ibmhttpd

Stop the service - as root

systemctl stop ibmhttpd

Register the service to auto-start - as root

systemctl enable ibmhttpd

This is somewhat simpler than the older chkconfig approach.

With thanks to this: -


and this: -


for inspiration.

Friday, 30 December 2016

Red Hat Enterprise Linux 7.3 - Setting up a YUM Repository

Well, I've done this for most other RH-based distros over the years: -

so here goes for RHEL 7.3: -

Mount the RHEL ISO

mount /dev/cdrom  /mnt

Install the required RPMs

rpm -ivh /mnt/Packages/deltarpm-3.6-3.el7.x86_64.rpm 

rpm -ivh /mnt/Packages/python-deltarpm-3.6-3.el7.x86_64.rpm 

rpm -ivh /mnt/Packages/createrepo-0.9.9-23.el7.noarch.rpm

Install the GPG Key

rpm --import /mnt/RPM-GPG-KEY-redhat-release

Setup the Target Directory

mkdir /var/repo
mkdir /var/repo/rhel72
cd /var/repo/rhel72/


Copy the RPMs from the ISO

cp -R /mnt/Packages/* .

Create the Repository

cd ..
createrepo .


Update YUM to reflect the newly added Respository

mv /etc/yum.repos.d /etc/yum.repos.original

mkdir /etc/yum.repos.d

cd /etc/yum.repos.d/

vi server.repo

inserting: -

[server]
gpgcheck=1
name=rhel72
baseurl=file:///var/repo


Unmount the ISO

umount /mnt

Validate the Repository

yum list

Install an RPM from the Repository

yum install -y telnet

Job done

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...