June 2019
M T W T F S S
« May    
 12
3456789
10111213141516
17181920212223
24252627282930

Categories

WordPress Quotes

Happiness depends more on the inward disposition of mind than on outward circumstances.
Benjamin Franklin
June 2019
M T W T F S S
« May    
 12
3456789
10111213141516
17181920212223
24252627282930

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (36)
Ansibile (19)
Apache (134)
Asterisk (2)
cassandra (2)
Centos (211)
Centos RHEL 7 (267)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (30)
Eassy (11)
ELKS (1)
EXCHANGE (3)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
health (1)
horoscope (23)
Hyper-V (10)
IIS (15)
IPTABLES (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (6)
Ldap (5)
Linux (188)
Linux Commands (166)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (24)
MYSQL (84)
Nagios (5)
NaturalOil (13)
Nginx (35)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (35)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
SCALEIO (1)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (62)
Uncategorized (29)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)
ZIMBRA (17)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

11 visitors online now
4 guests, 7 bots, 0 members

Hit Counter provided by dental implants orange county

MQ 8 on CENTOS 6.8

MQ 8 on CENTOS 6.8

WebSphere MQ installation and validation

WebSphere MQ installation and validation
ready
1 Check the installation hardware and software requirements
2 Installation Notes
Single server installs MQ and authentication
1 Create a user and user group Optional step
2 Extract the downloaded MQ installation package
3 Check if the rpm package is installed
4 Review the license agreement and accept the required
5 Install the MQ Server components
6 Verify that the installation was successful
Dual-server installation of MQ and authentication
1 Preparation
2 Configure the B machine
3 Configure the A machine
4 Authentication
MQ client installation and validation
1 Preparation
2 Configure the MQ server B machine
3 Configure the MQ client C machine
4 Test the connectivity between the client and the server
Unload MQ
Other records

1. Preparation
1.1 Check the installation hardware and software requirements

Check MQ installation conditions, SUSE Linux 64-bit installation requirements are as follows: here to the latest 9.0, 8.0 example
– MQ 9.0 operating system requires SUSE Linux Enterprise Server 12 SP1 x86-64, 8.0 SUSE Linux 11 SP2
– The HyperVisor virtualization platform supports VMware ESXi 5.5 and above, and Hyper-V supports 2012, KVM
– Supported software: WAS, gcc4.8 or above, DB2 10.5.0.6, IBM JRE (most components only support built-JRE)
– Disk space requires 1GB (server component installation), memory recommended 3GB

Specific see the official website to provide the requirements of the various platforms, including version MQ 9.0, MQ 8.0
1.2 Installation Precautions

About the installation name

Determine the unique installation name, incremented by Installation1,2 by default, and Installation0 reserved for the 7.0.1 MQ installation name
The installation name can not be changed after successful installation
Names require upper and lower case letters and numbers, no spaces, case insensitive, up to 16 bytes
Installation description information, you can set a 64-byte description, allowing Chinese and English
Linux use crtmqinst command to set the installation name, setmqinst command to set the description information

Multiple copies are installed

MQ supports single mount multiple copies (multiple versions or different installations of the same version), differentiated by different installation locations
A single machine supports up to 128 copies of the installation
Multi-copy installation can set up a master copy, the system will create environment variables and symbolic links, part of the management script command function requires these settings;
Multi-copy installations that support MQ 7.0 fp6 later, for installations that require multiple copies 7.0.1 Must be the first installation and automatically a master installation copy
Prior to MQ 7, only one product instance could be installed on a single machine

Single copy installation
– Beginning with version 7.1, the first copy of the MQ installation on Windows defaults to the master copy. Linux needs to be configured manually (the setmqinst command)
– It is recommended that you set up a master installation copy so that MQ commands and libraries can be easily applied and create symbolic links under / usr / lib, / usr / bin /, / usr / include
– For non-primary installation copies, manually set the environment variables and the library path configuration, such as LD_INSTALLATION_PATH

Installation location
– Linux default installation location / opt / mqm, working data directory / var / mqm
– Linux path length up to 256 bytes, no spaces allowed
– The installation path can not have subdirectories and partial paths of the installed MQ path
– Typical installation paths: /opt/IBM/MQ and /opt/IBM/MQnew or /opt/IBM/MQ/installations/1 and /opt/IBM/MQ/installations/2

MQ Installation Components (Linux)
– Runtime (MQSeriesRuntime), the runtime environment, must be installed (both client and server)
– Server (MQSeriesServer), running the queue manager and providing message queue services, the server-side needs
– Client (MQSeriesClient), a small subset of the functionality of MQ, a connection to the Server component, no queue manager
– SDK (MQSeriesSDK), development needs, used to compile the application
– Sample program, sample program
– Java messaging (MQSeriesJava), support Java Message Service Function (JMS)
– Man pages, help documentation, provide control commands, MQI commands, MQSC command help
– Java JRE, must, Java runtime, support the MQ part of Java written functions
– Message Catalogs, supported languages
– Global Security Kit, which supports encryption and security authentication, must be installed JRE
– Telemetry Service (MQSeriesXRService), remote sensing communication MQTT protocol, support for sensors and other devices to connect communication
– MQ Explorer, Management Monitor MQ
– Managed File Transfer, file transfer
– Advanced Message Security, the more advanced security, you must install the JRE and Security Kit
– AMQP Service, providing AMQP channel, support MQ Light APIs
2. Stand-alone server to install MQ and authentication

This article uses SUSE Linux Enterprise 11 x64 SP4 system, installed in the virtual machine environment, MQ selected version 8.0.
Before you install MQ, you need to set up the operating system.
2.1 Creating Users and User Groups (Optional)

On Linux, MQ needs to create the install user mqm and the user group mqm (be careful to ensure that the UID and GID are consistent when installing MQ with multiple systems or multiple instances)
The user ID has permissions to the MQ installation directory and files. The default MQ installation is automatically created when no mqm user is found.
You need to specify a specific UID and GID as the installation user for MQ, and you can manually create users and groups before installation.
Privilege Requirement: The normal user must belong to the mqm group to run the related administrative commands, such as crtmqm (create queue manager) and strmqm (start queue manager) commands

# groupadd -g 3000 mqm
# useradd -g mqm -u 3000 mqm

2.2 Extract the downloaded MQ installation package

# su – root
# cd /home/mq
# tar -xvf WSMQ_8.0_IFR_TRIAL_LNX_ON_X86_64_.tar.gz

2.4 Viewing the License Agreement and Accepting (Required)

# cd /home/mq/server
# ./mqlicense.sh -text_only

2.5 Install the MQ Server components

Installed in the default location /opt/mqm, if you need to change to join – prefix /opt/mymq

rpm -ivh MQSeriesRuntime-*.rpm MQSeriesServer-*.rpm

WARNING: System settings for this system do not meet recommendations for this product
See the log file at “/tmp/mqconfig.11472.log” for more information

more /tmp/mqconfig.11472.log

sysctl -a | more

Modify sysctl.conf file, mqconfig.11472.log not pass parameters modified
Sp4 linux suse main file-max, nofile failed to detect

Add a line, note the space  Sets the maximum number of kernel open files
vim /etc/sysctl.conf

fs.file-max = 524288

View the maximum number of files that can be opened by the user process

View the maximum number of files that can be opened by the user process
# su – mqm
# Ulimit -n shows 1024, and MQ requires 10240
Increase the maximum number of mqm users to open files
# su – root
# vim /etc/security/limits.conf
Add to:
mqm hard nofile 10240
mqm hard nofile 10240
root hard nofile 10240
root hard nofile 10240

# su – root
# ulimit -n
View the display 10240 is to take effect

rpm -ivh MQSeriesRuntime-*.rpm MQSeriesServer-*.rpm
prompt:
package MQSeriesRuntime-8.0.0-2.x86_64 is already installed
package MQSeriesServer-8.0.0-2.x86_64 is already installed

# rpm -q MQSeriesServer
# rpm -e MQSeriesServer-8.0.0-2
# rpm -q MQSeriesRuntime
# rpm -e MQSeriesRuntime-8.0.0-2

# cd /home/mq/server
# ./mqlicense
# rpm -ivh MQSeriesRuntime-*.rpm MQSeriesServer-*.rpm

2.6 Verify that the installation was successful

Verify that you need to install the built-in sample package component, MQSeriesSamples-8.0.0-2.x86_64.rpm
Examples of Authentication Complete the functions of creating and configuring a queue manager, sending messages to a queue, and getting messages from a queue

# rpm -ivh MQSeriesSamples-8.0.0-2.x86_64.rpm

# su – mqm
Set the environment variable
~ cd /opt/mqm/bin
~ ./setmqenv -s

An error occurred:
AMQ8595: The setmqenv command was not preceded by the source command
For an official explanation, see [Web site] (http://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ref.doc/amq8.htm)
Need to order the implementation of the source, not. / Or bash setmqenv way;
Source or setmqenv -s: is in the current shell environment variables
Bash setmqenv or. / Setmqenv: will open a new sub-shell settings,
set up after the return to the parent shell, set the variable can not change the parent shell

source setmqenv -s
Check whether the set is successful, the implementation of the query mq version information command

~ dspmqver

Create the queue manager QMA
~crtmqm QMA
Starts queue management
~strmqm QMA

To start the MQ script interpreter:
~runmqsc QMA

Define the local queue in the script interpreter:
DEFINE QLOCAL (QUEUE1)

Stop MQSC:
End

Go to the sample component directory:
~cd /opt/mqm/samp/bin
~./amqsput QUEUE1 QMA
Enter the sent test message:
test messages from john
test2 messages
Type enter twice to end with a blank line

Retrieves the message from the queue
./amqsget QUEUE1 QMA

3. Double-server installation of MQ and authentication

This approach requires two servers, and are installed MQ server, one for sending, one is responsible for receiving messages, which is commonly used MQ scene.

3.1 Preparation

Two virtual machine A machine (192.168.98.129), B machine (192.168.98.130), two must be able to communicate with each other network, you can use the ping test
A machine and B machine in accordance with the single-server installation (2.1-2.5 steps, not 2.6 verification) Server, Runtime, Sample installed three components.
A machine as a sending server (sender), B machine as a receiving server (receiver)

3.2 Configuration B machine

Log in as root and switch to the mqm user
# su – mqm
~ cd /opt/mqm/bin
~ source setmqenv -s
~ crtmqm QMB
~ strmqm QMB
~ runmqsc QMB

Input: DEFINE QLOCAL (RECEIVER.Q) Defines the local queue RECEIVER.Q
Continue typing: DEFINE LISTENER (LISTENER1) TRPTYPE (TCP) CONTROL (QMGR) PORT (1414) Defines a listener to receive messages
Enter: START LISTENER (LISTENER1)  Starts the listener
Input: DEFINE CHANNEL (QMA.QMB) CHLTYPE (RCVR) TRPTYPE (TCP) Defines the receiver channel
Type: end and press Enter to end the input

3.3 Configuration A machine

The same root user login, switch to mqm users
# su – mqm
~ cd /opt/mqm/bin
~ source setmqenv -s
~ crtmqm QMA
~ strmqm QMA
~ runmqsc QMA

Input: D?DEFINE QLOCAL (QMB) USAGE (XMITQ) Defines the local queue QMB as a transmission queue

Access local definition of remote queue LOCAL.DEF.OF.REMOTE.QUEUE
This definition indicates that the transmit queue QMB of the A machine sends a message to the remote queue (QMB, RECEIVER.Q on the B)

Input: DEFINE QREMOTE (LOCAL.DEF.OF.REMOTE.QUEUE) RNAME (RECEIVER.Q) RQMNAME (‘QMB’) XMITQ (QMB)

To define the transmit channel:
DEFINE CHANNEL (QMA.QMB) CHLTYPE (SDR) CONNAME (‘192.168.98.130(1414)’) XMITQ (QMB) TRPTYPE (TCP)
start up:
START CHANNEL (QMA.QMB)

End:
end

3.4 Verification

Enter A machine, using the sample program to verify

# su – mqm
~ cd /opt/mqm/samp/bin
~ ./amqsput LOCAL.DEF.OF.REMOTE.QUEUE QMA
At this point you can easily enter the information in the B machine view
For example: Test messages from A

Into the B machine
# su – mqm
~ cd /opt/mqm/samp/bin
~ ./amqsget RECEIVER.Q QMB

Found not receive the message, check the reasons and found that network communications may be the problem, mainly port is open, so turn off the B machine firewall
Log in as the root user
#systemctl stop iptables ; systemctl disable iptables
# su – mqm
~ cd /opt/mqm/samp/bin
~ ./amqsget RECEIVER.Q QMB

4.MQ client installation and validation
4.1 Preparation

Two virtual machines, including B machine (192.168.98.130) as MQ server, C machine (192.168.98.131) as the MQ client
The MQ client (machine C) is connected to the MQ server (machine B), sends the message to the server, and retrieves the message from the server

** Focus: **
In the client and server machines need to create a non-mqm group of the same id users, the user’s id must be consistent
For example, the user name is mquser1 and the id is 3001

# useradd mquser1 -u 3001

4.2 Configuring the MQ Server (B Machine)

Install the MQ Server components on the B machine, as described in section 2 of this document
# useradd mquser1 -u 3001
# su – mqm
~ cd /opt/mqm/bin
Sets the mq environment variable
~ source setmqenv -s

Create the queue manager QUEUE.MANAGER.1 and start it
~ crtmqm QUEUE.MANAGER.1
~ strmqm QUEUE.MANAGER.1
~ dspmq   View all queue manager running status

Start the script executor and make settings
~ runmqsc QUEUE.MANAGER.1
Input:
DEFINE QLOCAL(QUEUE1) Creates the local queue QUEUE1
Authorize the mquser1 user (id 3001) to use the queue QUEUE1
SET AUTHREC PROFILE(QUEUE1) OBJTYPE(QUEUE) PRINCIPAL(‘mquser1’) AUTHADD(PUT,GET)
The authorized user mquser1 can connect to the queue manager
SET AUTHREC OBJTYPE(QMGR) PRINCIPAL(‘mquser1’) AUTHADD(CONNECT)

Defines the server connection channel
DEFINE CHANNEL(CHANNEL1) CHLTYPE(SVRCONN) TRPTYPE(TCP)

Authorized MQ clients can connect to the above-defined channel, and authorize them by ip address and user name
SET CHLAUTH(CHANNEL1) TYPE(ADDRESSMAP) ADDRESS(‘192.168.98.131’) MCAUSER(‘mquser1′)

Defines a listener to accept connections
DEFINE LISTENER(LISTENER1) TRPTYPE(TCP) CONTROL(QMGR) PORT(1315)
start up:
START LISTENER(LISTENER1)
End:
End

4.3 Configuring the MQ Client (C)

After you unpack the installation package, install the client components
# cd /home/mq/server
# ./mqlicense.sh -accept
# rpm -ivh MQSeriesRuntime-8.0.0-2.x86_64.rpm MQSeriesClient-8.0.0-2.x86_64.rpm  MQSeriesSamples-8.0.0-2.x86_64.rpm

Test the network connectivity to the MQ Server B machine
# Ping 192.168.98.130

Create a user connecting to the mq server:
# useradd mquser1 -u 3001

Switch to mquser1
# su – mquser1

Set the environment variable to indicate the connection information to the MQ server
~ export MQSERVER=CHANNEL1/TCP/’192.168.98.130 (1315)’

Telnet test in Telnet C machines, and success
# telnet 192.168.98.130 1315
# su – mquser1
~ cd /opt/mqm/samp/bin
Send the message to the server
~ ./amqsputc QUEUE1 QUEUE.MANAGER.1
Enter the message, the last two enter the end of the key
Get the message from the server
~ ./amqsgetc QUEUE1 QUEUE.MANAGER.1

5. Uninstall MQ

# rpm -qa | grep MQ Queries the currently installed MQ components
# rpm -e MQSeriesServer Uninstall the server component
# rpm -e MQSeriesSamples Unload the sample program
# rpm -e MQSeriesRuntime Unloads the run-time component, which is typically the last uninstallation

6. Other records

Login server implementation:
# cd /opt/mqm/samp/bin
#./amqsgetc QUEUE1 QUEUE.MANAGER.1

An error occurred: ./amqsgetc: error while loading shared libraries: libmqic_r.so: can not open shared object file: No such file or directory

The error is part of the library is not found, install rpm -ivh rpm -ivm MQSeriesClient-8.0.0-2.x86_64.rpm, and then set the environment variable

MQ commonly used commands:
You must first set the environment variable to run directly
# su – mqm
~ cd /opt/mqm/bin
~ source setmqenv -s
~ dspmq View queue manager status
~ runmqsc QUEUE.MANAGER.1
Enter the script command to execute the command
DIS Displays all commands that can be entered
DIS CHL(*) View the channel definition
DIS CHL(CHANNEL1) View the specific channel definition
DIS LISTENER(*) View the listener definition
DIS LSSTATUS(LISTENER1) View the status of the specified listener
DIS Q(*) View the queue definition
DIS Q(QUEUE1) View the queue definition

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Blue Captcha Image
Refresh

*

Protected by WP Anti Spam