Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Sample Analysis of MQ7.0 installation Test on suse linux 10

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you a sample analysis of MQ7.0 installation testing on suse linux 10. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

This paper mainly introduces the installation and simple test of MQ 7. 0 (64-bit) on SUSE Linux 10. All operations are verified in the test environment, only this record.

one。 Create users and user groups

[root@localhost ~] # mkdir / var/mqm

[root@localhost ~] # groupadd mqm

[root@localhost] # useradd-g mqm-d / var/mqm mqm

[root@localhost ~] # passwd mqm

The home directory of mqm can also be set separately. It is recommended that the home directory of mqm be set to / var/mqm.

two。 Create a MQ file system

[root@localhost ~] # mkdir / opt/mqm

[root@localhost ~] # mkdir-p / var/mqm/ {log,errors,qmgrs}

[root@localhost ~] # chown mqm:mqm / opt/mqm

[root@localhost] # chown-R mqm:mqm / var/mqm

It is recommended that the MQ software be installed in the / opt/mqm directory and the business data stored in / var/mqm

three。 Install MQ

If you are installing a MQ server, you need to install at least two components, Runtime and Server, and select the other components as needed.

To install the MQ server, you need to log in as a root user and extract the installation package (tar-xvf mqv7.0.tar).

After the decompression is complete, go to the decompression directory and run the following command:

[root@localhost MQ7.0] #. / mqlicense.sh-text_only or (- accept)

Note:-- the test_only option is used as a test and has only a 90-day trial period. The accept option requires the purchase of license.

Some of the components of MQ are dependent on each other, so pay attention to the order when installing, or just install them all.

1) execute rpm-ivh MQSeriesRuntime-7.0.1-3.x86_64.rpm and install the Runtime package

2) execute rpm-ivh MQSeriesSDK-7.0.1-3.x86_64.rpm and install the MQSDK package

3) execute rpm-ivh MQSeriesServer-7.0.1-3.x86_64.rpm and install the Server package

4) execute rpm-ivh MQSeriesJRE-7.0.1-3.x86_64.rpm and install the MQJRE package

5) execute rpm-ivh MQSeriesEclipseSDK33-7.0.1-3.x86_64.rpm and install the EclipseSDK package

6) execute rpm-ivh MQSeriesJava-7.0.1-3.x86_64.rpm and install the Java package

7) execute rpm-ivh MQSeriesConfig-7.0.1-3.x86_64.rpm and install the MQExplorer package

8) execute rpm-ivh MQSeriesSamples-7.0.1-3.x86_64.rpm and install the Samples package

You can use the command to view the details of the components you installed:

[root@localhost ~] # rpm-qa | grep MQ

MQSeriesJava-7.0.1-3

MQSeriesServer-7.0.1-3

MQSeriesSDK-7.0.1-3

MQSeriesEclipseSDK33-7.0.1-3

MQSeriesConfig-7.0.1-3

MQSeriesRuntime-7.0.1-3

MQSeriesJRE-7.0.1-3

MQSeriesSamples-7.0.1-3

Start:

Su-mqm

Strmqm QM_KC2 (queue name)

Runmqlsr-r-m QM_KC2 (queue name)-t TCP

four。 Give mqm permission to root

If you need to perform MQ-related operations as root, you need to give permissions to the mqm user group of root. Execute the following command:

[root@localhost ~] # usermod-A mqm root

Note: re-login is required to take effect.

five。 Patch installation

The patch can be downloaded directly from the official website. The upgrade method is still the sub-component upgrade, which is the same as the installation of 7. 0, using the rpm-ivh MQSeries*.rpm mode. After all upgrades, use the dspmqver command to query the current version number and patch number.

# dspmqver

Name: WebSphere MQ

Version: 7.0.1.3

CMVC level: p701-103-100813

BuildType: IKAP-(Production)

six。 Verify installation

1. Log in to the system with mqm account

two。 Create queue managers and queues for testing

Crtmqm-Q sunkm.queue.manager # # create a default queue

Strmqm # # start the default queue manager if it is not followed by the name of the queue manager

If runmqsc # # is not followed by the name of the queue manager, enter the console of the default queue manager

Define qlocal (orange.queue)

End

3. Use the test program to send a message to queue orange.queue

Change to / opt/mqm/samp/bin directory

. / amqsput ORANGE.QUEUE # # not followed by the name of the queue manager indicates the queue operation in the default queue manager

When the screen outputs "Sample AMQSPUT0 start"

Enter the test message manually when "target queue is ORANGE.QUEUE":

This is a test

When the input is finished, press the enter key twice in a row, and the message is entered. The screen output "Sample AMQSPUT0 end" indicates that the message was sent successfully.

4. Read messages from the queue

Change to / opt/mqm/samp/bin directory

. / amqsget ORANGE.QUEUE # # not followed by the name of the queue manager indicates the queue operation in the default queue manager

When the screen outputs "Sample AMQSGET0 start"

Message ", pause for several seconds and the screen continues to output.

"no more messages

Sample AMQSGET0 end ", the message was read successfully.

Add:

The default listening port for the queue manager of MQ is 1414. If this port is DOWN, it will affect the sending and delivery of messages.

The port can be started on the command line (which can be used on a variety of systems) as follows:

Mqm@server1:~ > dspmq

QMNAME (sunkm.queue.manager) STATUS (Running)

Mqm@server1:~ > runmqlsr-m sunkm.queue.manager-t tcp-p 1414

If there is an error in execution, you can trace the analysis with the following command

Mqm@server1:~ > endmqtrc-m sunkm.queue.manager-e-a

Follow up.

Or telnet ip 1414

See if the port is enabled.

The above is the analysis of the example of MQ7.0 installation test on suse linux 10 shared by Xiaobian. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report