Showing posts with label centos. Show all posts
Showing posts with label centos. Show all posts

Saturday, June 11, 2011

Compiling g++ for C++0x on CentOS

CentOS 5 (I don't recall the minor version I am using) includes g++ 4.1, however you cannot do C++0x development without g++ 4.4 or higher. Here's what I did:

Dependencies



First download the dependencies gmp-5.0.2, mpfr-3.0.1, mpc-0.9, ppl-0.11.2, cloog-ppl-0.15.11 (see http://gcc.gnu.org/install/prerequisites.html)

gmp


./configure --enable-cxx
make
make check
sudo make install


mpfr


./configure --with-gmp=/usr/local
make
make check
sudo make install


mpc


./configure --with-gmp=/usr/local
make
make check
sudo make install


ppl


./configure --with-gmp=/usr/local
make
make check
sudo make install

Grab some coffe, food, go for a stroll, etc. during make, this one takes a while (or at least it does in a VM)

cloog-ppl


./configure --with-gmp=/usr/local --with-ppl=/usr/local
make
make check
sudo make install


gcc



Download gcc (I used gcc-4.5.3), gcc-core, and g++

Then from the PARENT directory of where you extracted gcc:
mkdir gccbuild
cd gccbuild
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
../gcc-4.5.3/configure --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-ppl=/usr/local --with-cloog=/usr/local
make -j 2
# go to sleep
make check
make install

Saturday, March 12, 2011

Getting Started with WebSphere MQ 7 Broker 7 on Linux

I was interested in evaluating what it was like working with MQ7 and Broker 7, so I setup a Linux VM (CentOS 5, x64). My goal was to run MQ, Broker, and the Toolkit all locally.

Note: Not all of this is perfect or maybe even ideal, its just what I did. CentOS is not a supported distribution for these products. I know more about MQ6 and Broker 6.1 than 7.

Before I Started


  • Installed DB2 Express
  • yum install compat-libstdc++-33 (MQ needs this)


Installing MQ7


  • Download MQ7 Trial and extract it

  • ./mqlicense.sh -accept (after reading it of course)

  • rpm -ivh MQSeriesRuntime-7.0.1-3.x86_64.rpm MQSeriesServer-7.0.1-3.x86_64.rpm

  • rpm -ivh MQSeriesClient-7.0.1-3.x86_64.rpm

  • rpm -ivh MQSeriesSDK-7.0.1-3.x86_64.rpm

  • rpm -ivh MQSeriesJava-7.0.1-3.x86_64.rpm

  • rpm -ivh MQSeriesEclipseSDK33-7.0.1-3.x86_64.rpm

  • Update /opt/mqm/eclipseSDK33/eclipse/eclipse.ini add -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/firefox-3.6

  • rpm -ivh MQSeriesConfig-7.0.1-3.x86_64.rpm

  • usermod -a -G mqm craig (replace craig with your username)

  • usermod -a -G mqm root

  • usermod -a -G mqm mqm (for some reason the mqm user didn't have the group)



Installing Message Broker


  • Download and extract the WMB Trial

  • groupadd mqbrkrs

  • usermod -a -G mqbrkrs craig

  • usermod -a -G mqbrkrs root

  • ./setuplinuxx64 -console

  • Mostly just enter 1s or 0s until complete



Installing WMB Toolkit


  • Download and extract the WMB Toolkit Trial

  • In the IBMInstallationManager directory...

  • ./install -nosplash --launcher.suppressErrors -input mbtoolkit-silent.xml -silent


Create Broker


  • Since I'm going to do things the easy way instead of the right way (I'm doing everything as root instead of running under mqm), need to reboot here

  • . /opt/ibm/mqsi/7.0/bin/mqsiprofile (notice the ". " at start)

  • cd /opt/mqm/bin

  • ./crtmqm -u DLQ ESBBKL

  • ./strmqm ESBBKL

  • ./runmqlsr -m ESBBKL -t TCP &

  • mqsicreatebroker ESBBKLBKR -i craig -a <password> -q ESBBKL

  • mqsichangebroker ESBBKLBKR -i craig -a <password> -P 1414

  • mqsistart ESBBKLBKR

  • mqsichangeproperties ESBBKLBKR -b httplistener -o HTTPListener -n startListener -v true

  • mqsistop ESBBKLBKR

  • mqsistart ESBBKLBKR

  • mqsicreateexecutiongroup ESBBKLBKR -e default



Working in the Toolkit


  • In the Brokers view, connect to remote queue ESBBKL at localhost.localdomain port 1414

I know that ideally I could right click Brokers and create a new local broker instead of doing a lot of the above, but obviously something up there threw it off. Furthermore, you can't use localhost because it tells you to use a local broker.

NOTE: When I went through and did this again to verify I didn't miss any steps, the toolkit already had my local broker in it. You probably won't need to add it, however if it is not in the list, do the above.

Create Local Queues


  • Create file with the following contents

DEFINE QLOCAL ('REQ.MB.TEST_FLOW') +
REPLACE

DEFINE QLOCAL ('RESP.MB.TEST_FLOW') +
REPLACE

DEFINE QLOCAL ('DLQ') +
REPLACE


  • runmqsc ESBBKL < queuedefs.conf


Create flows, more queues, have fun!