WebSphere mq6.0 for redhat4.6 setup

Source: Internet
Author: User
Tags gtk

WebSphere mq6.0 for redhat4.6 setup

Category:
WebSphere
Read by 650
Comment (0)
Favorites
Report websphereredhatmanageribm message middleware statistics

WebSphere MQ is IBM's commercial messaging middleware (middleware ). WebSphere MQ provides a secure and reliable message transmission system with industrial standards. Its function is to control and manage an integrated commercial application, so that multiple Branch Programs (modules) that constitute this commercial application can complete the entire workflow by passing messages. WebSphere MQ is basically composed of a message transmission system and an application interface. Its resources are messaging and queuing ).
Message: a message is an information unit. It can be a request message, a reply message, or a report message) or a message (datainmessge ). A message contains two factors: Message description (used to define a message transmission target) and data message (such as application data or database query ). Communication between programs is performed by passing messages rather than directly calling programs.
Queue: a secure place where messages are stored. messages are stored in sequence, and messages are sent and received in stages. Because messages are stored in queues, applications can run independently of each other at different speeds at different times and in different locations.
Message transmission system: used to ensure that messages are provided between queues, including messages provided between remote queues on different systems in the network. And ensure the recovery after network failure or shutdown.
Application Interface: The interfaces implemented by WebSphere MQ APIs between applications and message systems are consistent across all WebSphere MQ platforms. There are only 14 API calls and two key verbs: Put and get ).
IBM WebSphere MQ ensures reliable message transmission and only once delivery.
Installation environment
WebSphere MQ does not support hostnames containing spaces. If you install MQ on a host whose hostnames contain spaces, MQ cannot create a queue manager (queue managers)
Hardware requirements
WebSphere MQ for Linux, version 6.0 (x86 Platform) supports hosts of any x86 Platform Architecture
Minimum requirements
512 MB RAM
1 GHz CPU
1G hard disk space
1024*768 display
Supported Operating Systems
Currently, Red Hat Enterprise Linux as V3.0 v4.0 is supported.
SuSE Linux Enterprise Server (sles) V8 SP3, V9
Note: currently, suse8 does not support MQ explorer graphical interfaces.
Hard Disk Space Requirements
The space required by MQ is customized based on the number of installed components and the length of queue message storage.
For example:
It takes about 50 MB to install common components such as runtime, server, client, sample programs, and SDK.
The basic software IBMJava2-SDK-1.4.2-0.0 and gsk7bas-7.0-x.x of MQ software requires 91 MB Space

Install SSL support
G ++ environment required
Install the libstdc ++ 5 rpm package in the RedHat environment.
IBM Global Security kit V7 is required
This package has been RPM package provided in the MQ installation media package

Operating system environment requirements
C/C ++ compiling environment
Run
[MQM @ myserver12 bin] $ gcc-V
Reading specs from/usr/lib/GCC/i386-redhat-linux/3.4.3/specs
Configured :.. /configure -- prefix =/usr -- Mandir =/usr/share/man -- infodir =/usr/share/info -- enable-shared -- enable-threads = POSIX -- disable-checking -- with-system-zlib -- enable-_ cxa_atexit -- disable-libunwind-exceptions -- enable-Java-AWT = GTK -- Host = i386-redhat-linux
Thread model: POSIX
GCC version 3.4.3 20041212 (Red Hat 3.4.3-9. EL4)
It indicates that GCC 3.4 has been installed.
Currently, MQ supports gcc/g ++ 2.9.5, 3.2, 3.3, and 3.4.
WebSphere server installation settings
Create installation directory
Mkdir-P/opt/MQM
Mkdir-P/var/MQM/{log, errors}
Note: The installation directory and working directory of MQM must be the above directory. If the space of the above directory is not enough, you can create a link directory as follows:
Mkdir-P/bigger/MQM
Ln-S/bigger/MQM/opt/MQM
Create user group
Groupadd-G 911 MQM
Useradd-G 911-D/var/MQM-u 911-S/bin/bash MQM
Change directory permissions
Chown-r MQM: MQM/opt/MQM
Chown-r MQM: MQM/var/MQM
NOTE: If other users want to have MQ administrator permissions, such as creating and starting the queue manager, add the user name to the MQM group.

Set language environment
$ Export lang = zh_cn
Note: The above settings are in Chinese. You need to install the relevant language RPM package in the MQ media package.

Kernel Parameter Modification
WebSphere MQ uses System v ipc resources, especially shared memory and semaphores
Modify the following resources:
/Proc/sys/kernel/shmmax-the maximum size of a shared memory segment.
/Proc/sys/kernel/shmmni-the maximum number of shared memory segments.
/Proc/sys/kernel/Shmall-the maximum amount of shared memory that may be allocated.
/Proc/sys/kernel/SEM-the maximum number and size of semaphore sets that may be allocated.

/Proc/sys/kernel/msgmnb-the maximum number of bytes on a message queue.
The modification method is as follows:
Echo 268435456>/proc/sys/kernel/shmmax
This means to change the size of the shared memory segment to 256 MB.
The following are settings on my machine:
Net. ipv4.ip _ forward = 0
Net. ipv4.conf. Default. rp_filter = 1
Net. ipv4.conf. Default. accept_source_route = 0
Kernel. sysrq = 0
Kernel. msgmnb = 128
Kernel. core_uses_pid = 1
Kernel. shmmax = 524288000
Kernel. SEM = 250 32000 100 128
FS. File-max = 65536
Kernel. shmmni = 4096
Net. ipv4.ip _ local_port_range = 1024 65000
Net. Core. rmem_default = 1048576
Net. Core. wmem_default = 262144
Net. Core. rmem_max = 1048576
Net. Core. wmem_max = 262144
Write the above values directly to/etc/sysctl. conf to ensure that the system will take effect after restart.

Install the WebSphere MQ Program
1. Log On As the root user.
Upload wmqv6023trial-x86_linux.tar.gz to/tmp
$ CD/tmp
$ Tar-xzvf WMQv6023Trial-x86_linux.tar.gz
2. Execute mqlicense. Sh to accept the Product License Agreement
$./Mqlicense. Sh-accept
3. Install the RPM package:
$ Rpm-IVH MQSeriesRuntime-6.0.2-3.i386.rpm
$ Rpm-IVH MQSeriesServer-6.0.2-3.i386.rpm
$ Rpm-IVH MQSeriesClient-6.0.2-3.i386.rpm
$ Rpm-IVH MQSeriesSamples-6.0.2-3.i386.rpm
$ Rpm-IVH MQSeriesMsg_Zh_CN-6.0.2-3.i386.rpm

Test mqserver
MQM User Logon Settings
Test Environment Settings
Create a queue management
$ Crtmqm-Q yql. queue. Manager

You will see messages telling you that the queue manager has been created, and that the default WebSphere MQ objects have been created
Start Queue Management
$ Strmqm

A message tells you when the queue manager has started

Enable mqsc
$ Runmqsc

An mqsc is started. Enter some statements to define a queue named oranager. queue.
Define qlocal (orange. Queue)
The message queue is successfully created.

Stop mqsc
End
The preceding commands create a queue manager named yql. queue. Manager and a queue named orange. queue.
Test
$ CD/opt/MQM/SAMP/bin
Upload information to the queue orange. queue in the queue manager yql. queue. Manager.
$./Amqsput orange. Queue yql. queue. Manager
The following information is displayed:
Sample amqsput0 start
Target queue is orange. Queue
Enter some text and press ENTER twice.
Example: jus one test
Obtain information from queue orange. queue in queue manager yql. queue. Manager.
$./Amqsget orange. Queue yql. queue. Manager
If a message is returned, the operation is successful.
Sample amqsget0 start
Message <jus one test>

WebSphere MQ client settings
Environment Settings
Create a queue manager
[MQM @ myserver12 bin] $ crtmqm-Q lyx. queue. Manager
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ Queue Manager created.
Creating or replacing default objects for lyx. queue. Manager.
Default objects statistics: 40 created. 0 replaced. 0 failed.
Completing setup.
Setup completed
Start the queue manager
[MQM @ myserver12 bin] $ strmqm lyx. queue. Manager
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ Queue Manager 'lyx. queue. Manager' starting.
5 log records accessed on queue manager 'lyx. queue. Manager' during the log replay phase.
Log replay for Queue Manager 'lyx. queue. Manager' complete.
Transaction Manager state recovered for Queue Manager 'lyx. queue. Manager '.
WebSphere MQ Queue Manager 'lyx. queue. Manager' started.
Set queue and connection channel and listener
[MQM @ myserver12 bin] $ runmqsc
5724-h72 (c) Copyright IBM Corp. 1994,200 5. All rights reserved.
Starting mqsc for Queue Manager lyx. queue. Manager.
Define a queue named remote_queue
Define qlocal (remote_queue)
1: Define qlocal (remote_queue)
Amq8006: WebSphere MQ queue created.
Define a remote connection channel2
Define channel (channel2) chltype (svrconn) trptype (TCP) mcauser ('mqm ')

2: Define channel (channel2) chltype (svrconn) trptype (TCP) mcauser ('mqm ')
Amq8014: WebSphere MQ channel created.
Define a listener for listener2 and listen for port 8899. If no port is specified, use the default 1414
Define listener (listener2) trptype (TCP) control (qmgr) Port (8899)
(3) define listener (listener2) trptype (TCP) control (qmgr) Port (8899)
Amq8626: WebSphere MQ listener created.
Start listening to listener2
Start listener (listener2)
4: Start listener (listener2)
Amq8021: request to start WebSphere MQ listener accepted.
End
End
5: End
4 mqsc commands read.
No commands have a syntax error.
All valid mqsc commands were processed.
Set Environment Variables
[MQM @ myserver12 bin] $ export mqserver = 'channel2/tcp/myserver12 (8899 )'
Test and verification
[MQM @ myserver12 bin] $./amqsput remote_queue lyx. queue. Manager
Sample amqsput0 start
Target queue is remote_queue
I love you !!!

Sample amqsput0 end
[MQM @ myserver12 bin] $./amqsget remote_queue lyx. queue. Manager
Sample amqsget0 start
Message <I love you!>
No more messages
Sample amqsget0 end

MQ queue management operations
1. Create
$ Crtmqm-Q lyx_queue_manager
2. Start
$ Strmq lyx_queue_manager
3. Stop
$ Endmqm lyx_queue_manager
4. Delete
$ Dltmqm lyx_queue_manager
5. View
[MQM @ myserver12 bin] $ dspmq
Qmname (VENUS. queue. Manager) status (running)
Qmname (Saturn. queue. Manager) status (running)
Qmname (yql. queue. Manager) status (running)
Qmname (WWF. queue. Manager) status (running)
Qmname (lyx. queue. Manager) status (running)

Conclusion: Try to use uppercase letters for defining queue names. Otherwise, amqsput/amqsget cannot read queue names.

WebSphere MQ is IBM's commercial messaging middleware (middleware ). WebSphere MQ provides a secure and reliable message transmission system with industrial standards. Its function is to control and manage an integrated commercial application, so that multiple Branch Programs (modules) that constitute this commercial application can complete the entire workflow by passing messages. WebSphere MQ is basically composed of a message transmission system and an application interface. Its resources are messaging and queuing ).
Message: a message is an information unit. It can be a request message, a reply message, or a report message) or a message (datainmessge ). A message contains two factors: Message description (used to define a message transmission target) and data message (such as application data or database query ). Communication between programs is performed by passing messages rather than directly calling programs.
Queue: a secure place where messages are stored. messages are stored in sequence, and messages are sent and received in stages. Because messages are stored in queues, applications can run independently of each other at different speeds at different times and in different locations.
Message transmission system: used to ensure that messages are provided between queues, including messages provided between remote queues on different systems in the network. And ensure the recovery after network failure or shutdown.
Application Interface: The interfaces implemented by WebSphere MQ APIs between applications and message systems are consistent across all WebSphere MQ platforms. There are only 14 API calls and two key verbs: Put and get ).
IBM WebSphere MQ ensures reliable message transmission and only once delivery.
Installation environment
WebSphere MQ does not support hostnames containing spaces. If you install MQ on a host whose hostnames contain spaces, MQ cannot create a queue manager (queue managers)
Hardware requirements
WebSphere MQ for Linux, version 6.0 (x86 Platform) supports hosts of any x86 Platform Architecture
Minimum requirements
512 MB RAM
1 GHz CPU
1G hard disk space
1024*768 display
Supported Operating Systems
Currently, Red Hat Enterprise Linux as V3.0 v4.0 is supported.
SuSE Linux Enterprise Server (sles) V8 SP3, V9
Note: currently, suse8 does not support MQ explorer graphical interfaces.
Hard Disk Space Requirements
The space required by MQ is customized based on the number of installed components and the length of queue message storage.
For example:
It takes about 50 MB to install common components such as runtime, server, client, sample programs, and SDK.
The basic software IBMJava2-SDK-1.4.2-0.0 and gsk7bas-7.0-x.x of MQ software requires 91 MB Space

Install SSL support
G ++ environment required
Install the libstdc ++ 5 rpm package in the RedHat environment.
IBM Global Security kit V7 is required
This package has been RPM package provided in the MQ installation media package

Operating system environment requirements
C/C ++ compiling environment
Run
[MQM @ myserver12 bin] $ gcc-V
Reading specs from/usr/lib/GCC/i386-redhat-linux/3.4.3/specs
Configured :.. /configure -- prefix =/usr -- Mandir =/usr/share/man -- infodir =/usr/share/info -- enable-shared -- enable-threads = POSIX -- disable-checking -- with-system-zlib -- enable-_ cxa_atexit -- disable-libunwind-exceptions -- enable-Java-AWT = GTK -- Host = i386-redhat-linux
Thread model: POSIX
GCC version 3.4.3 20041212 (Red Hat 3.4.3-9. EL4)
It indicates that GCC 3.4 has been installed.
Currently, MQ supports gcc/g ++ 2.9.5, 3.2, 3.3, and 3.4.
WebSphere server installation settings
Create installation directory
Mkdir-P/opt/MQM
Mkdir-P/var/MQM/{log, errors}
Note: The installation directory and working directory of MQM must be the above directory. If the space of the above directory is not enough, you can create a link directory as follows:
Mkdir-P/bigger/MQM
Ln-S/bigger/MQM/opt/MQM
Create user group
Groupadd-G 911 MQM
Useradd-G 911-D/var/MQM-u 911-S/bin/bash MQM
Change directory permissions
Chown-r MQM: MQM/opt/MQM
Chown-r MQM: MQM/var/MQM
NOTE: If other users want to have MQ administrator permissions, such as creating and starting the queue manager, add the user name to the MQM group.

Set language environment
$ Export lang = zh_cn
Note: The above settings are in Chinese. You need to install the relevant language RPM package in the MQ media package.

Kernel Parameter Modification
WebSphere MQ uses System v ipc resources, especially shared memory and semaphores
Modify the following resources:
/Proc/sys/kernel/shmmax-the maximum size of a shared memory segment.
/Proc/sys/kernel/shmmni-the maximum number of shared memory segments.
/Proc/sys/kernel/Shmall-the maximum amount of shared memory that may be allocated.
/Proc/sys/kernel/SEM-the maximum number and size of semaphore sets that may be allocated.

/Proc/sys/kernel/msgmnb-the maximum number of bytes on a message queue.
The modification method is as follows:
Echo 268435456>/proc/sys/kernel/shmmax
This means to change the size of the shared memory segment to 256 MB.
The following are settings on my machine:
Net. ipv4.ip _ forward = 0
Net. ipv4.conf. Default. rp_filter = 1
Net. ipv4.conf. Default. accept_source_route = 0
Kernel. sysrq = 0
Kernel. msgmnb = 128
Kernel. core_uses_pid = 1
Kernel. shmmax = 524288000
Kernel. SEM = 250 32000 100 128
FS. File-max = 65536
Kernel. shmmni = 4096
Net. ipv4.ip _ local_port_range = 1024 65000
Net. Core. rmem_default = 1048576
Net. Core. wmem_default = 262144
Net. Core. rmem_max = 1048576
Net. Core. wmem_max = 262144
Write the above values directly to/etc/sysctl. conf to ensure that the system will take effect after restart.

Install the WebSphere MQ Program
1. Log On As the root user.
Upload wmqv6023trial-x86_linux.tar.gz to/tmp
$ CD/tmp
$ Tar-xzvf WMQv6023Trial-x86_linux.tar.gz
2. Execute mqlicense. Sh to accept the Product License Agreement
$./Mqlicense. Sh-accept
3. Install the RPM package:
$ Rpm-IVH MQSeriesRuntime-6.0.2-3.i386.rpm
$ Rpm-IVH MQSeriesServer-6.0.2-3.i386.rpm
$ Rpm-IVH MQSeriesClient-6.0.2-3.i386.rpm
$ Rpm-IVH MQSeriesSamples-6.0.2-3.i386.rpm
$ Rpm-IVH MQSeriesMsg_Zh_CN-6.0.2-3.i386.rpm

Test mqserver
MQM User Logon Settings
Test Environment Settings
Create a queue management
$ Crtmqm-Q yql. queue. Manager

You will see messages telling you that the queue manager has been created, and that the default WebSphere MQ objects have been created
Start Queue Management
$ Strmqm

A message tells you when the queue manager has started

Enable mqsc
$ Runmqsc

An mqsc is started. Enter some statements to define a queue named oranager. queue.
Define qlocal (orange. Queue)
The message queue is successfully created.

Stop mqsc
End
The preceding commands create a queue manager named yql. queue. Manager and a queue named orange. queue.
Test
$ CD/opt/MQM/SAMP/bin
Upload information to the queue orange. queue in the queue manager yql. queue. Manager.
$./Amqsput orange. Queue yql. queue. Manager
The following information is displayed:
Sample amqsput0 start
Target queue is orange. Queue
Enter some text and press ENTER twice.
Example: jus one test
Obtain information from queue orange. queue in queue manager yql. queue. Manager.
$./Amqsget orange. Queue yql. queue. Manager
If a message is returned, the operation is successful.
Sample amqsget0 start
Message <jus one test>

WebSphere MQ client settings
Environment Settings
Create a queue manager
[MQM @ myserver12 bin] $ crtmqm-Q lyx. queue. Manager
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ Queue Manager created.
Creating or replacing default objects for lyx. queue. Manager.
Default objects statistics: 40 created. 0 replaced. 0 failed.
Completing setup.
Setup completed
Start the queue manager
[MQM @ myserver12 bin] $ strmqm lyx. queue. Manager
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ Queue Manager 'lyx. queue. Manager' starting.
5 log records accessed on queue manager 'lyx. queue. Manager' during the log replay phase.
Log replay for Queue Manager 'lyx. queue. Manager' complete.
Transaction Manager state recovered for Queue Manager 'lyx. queue. Manager '.
WebSphere MQ Queue Manager 'lyx. queue. Manager' started.
Set queue and connection channel and listener
[MQM @ myserver12 bin] $ runmqsc
5724-h72 (c) Copyright IBM Corp. 1994,200 5. All rights reserved.
Starting mqsc for Queue Manager lyx. queue. Manager.
Define a queue named remote_queue
Define qlocal (remote_queue)
1: Define qlocal (remote_queue)
Amq8006: WebSphere MQ queue created.
Define a remote connection channel2
Define channel (channel2) chltype (svrconn) trptype (TCP) mcauser ('mqm ')

2: Define channel (channel2) chltype (svrconn) trptype (TCP) mcauser ('mqm ')
Amq8014: WebSphere MQ channel created.
Define a listener for listener2 and listen for port 8899. If no port is specified, use the default 1414
Define listener (listener2) trptype (TCP) control (qmgr) Port (8899)
(3) define listener (listener2) trptype (TCP) control (qmgr) Port (8899)
Amq8626: WebSphere MQ listener created.
Start listening to listener2
Start listener (listener2)
4: Start listener (listener2)
Amq8021: request to start WebSphere MQ listener accepted.
End
End
5: End
4 mqsc commands read.
No commands have a syntax error.
All valid mqsc commands were processed.
Set Environment Variables
[MQM @ myserver12 bin] $ export mqserver = 'channel2/tcp/myserver12 (8899 )'
Test and verification
[MQM @ myserver12 bin] $./amqsput remote_queue lyx. queue. Manager
Sample amqsput0 start
Target queue is remote_queue
I love you !!!

Sample amqsput0 end
[MQM @ myserver12 bin] $./amqsget remote_queue lyx. queue. Manager
Sample amqsget0 start
Message <I love you!>
No more messages
Sample amqsget0 end

MQ queue management operations
1. Create
$ Crtmqm-Q lyx_queue_manager
2. Start
$ Strmq lyx_queue_manager
3. Stop
$ Endmqm lyx_queue_manager
4. Delete
$ Dltmqm lyx_queue_manager
5. View
[MQM @ myserver12 bin] $ dspmq
Qmname (VENUS. queue. Manager) status (running)
Qmname (Saturn. queue. Manager) status (running)
Qmname (yql. queue. Manager) status (running)
Qmname (WWF. queue. Manager) status (running)
Qmname (lyx. queue. Manager) status (running)

Conclusion: Try to use uppercase letters for defining queue names. Otherwise, amqsput/amqsget cannot read queue names.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.