Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Linux distributed message queue RocketMQ deployment and monitoring - Dual Master     - How to use the process on the desktop xkill end Linux (Linux)

- Difference LVS three scheduling modes (Server)

- Git Experience Sharing - Using a remote repository (Linux)

- Linux cut Command Study Notes (Linux)

- How to recover deleted files in Linux systems (Linux)

- Log4j configuration file Explanation (Linux)

- How to install or upgrade to the Linux kernel in Ubuntu 4.2 (Linux)

- Java semaphores (Programming)

- Linux Services Comments (Linux)

- GROUP BY extension (Database)

- Linux firewall rules example Extracts (Linux)

- Github Getting Started Basic Course (Linux)

- CentOS 6 rapid deployment of Java applications (Linux)

- Windows 7 hard disk to install Ubuntu 14.10 (Linux)

- Swift string common method (Programming)

- Linux C programming and Shell Programming in the development of practical tools similarities summary (Programming)

- What happens after the MySQL disk space is full (Database)

- How Bluetooth turned off by default in Ubuntu 14.04 (Linux)

- Create your own YUM repository (Linux)

- How to Check notebook CPU temperature in Ubuntu (Linux)

 
         
  Linux distributed message queue RocketMQ deployment and monitoring - Dual Master
     
  Add Date : 2017-08-31      
         
         
         
  Preparing the environment: CentOS_6.5_x64

IP: 192.168.0.249 dbTest249 Master1
IP: 192.168.0.251 webTest251 Master2

Download software alibaba-rocketmq

https://github.com/alibaba/RocketMQ/releases

First, install rocketmq

# Tar zxf alibaba-rocketmq-3.2.4-beta1.tar.gz -C / usr / local /
# Cd / usr / local /
# Ln -s / usr / local / alibaba-rocketmq / usr / local / rocketmq
# Cd rocketmq /
Second, the master-slave configuration

1, respectively, at 249,251 on the Edit Profile

# Hostname
# Vim conf / 2m-noslave / broker-a.properties

1 ##################### Master1 server configuration file #####################
 2 brokerClusterName = FusionCluster
 3 brokerName = broker-a
 4 brokerId = 0
 5 namesrvAddr = dbTest249: 9876; webTest251: 9876
 6 deleteWhen = 04
 7 fileReservedTime = 120
 8
 9 brokerRole = ASYNC_MASTER
10 flushDiskType = ASYNC_FLUSH
11 sstorePathRootDir = / data / rocketmq / store
12 storePathCommitLog = / data / rocketmq / store / commitlog

1 ##################### Master2 server configuration file #####################
 2 brokerClusterName = FusionCluster
 3 brokerName = broker-b
 4 brokerId = 1
 5 namesrvAddr = dbTest249: 9876; webTest251: 9876
 6 deleteWhen = 04
 7 fileReservedTime = 120
 8
 9 brokerRole = ASYNC_MASTER
10 flushDiskType = ASYNC_FLUSH
11 listenPort = 10911
12 sstorePathRootDir = / data / rocketmq / store
13 storePathCommitLog = / data / rocketmq / store / commitlog

2, edit JAVA memory block

# Vim bin / runbroker.sh
If the server memory is not enough, you can modify runserver.sh script (mqnamesrv file is called by the Name Server script runserver.sh main function com.alibaba.rocketmq.namesrv.NamesrvStartup start Name Server) in JAVA_OPT_1 parameters
[Plain] view plaincopy derived to view the code sheet on my piece of code CODE

1 JAVA_OPT_1 = "- server -Xms512m -Xmx1g -XX: PermSize = 128m -XX: MaxPermSize = 320m"

3. Create a data directory

# Mkdir -p / data / rocketmq / store / commitlog
# Mkdir / data / logs
# Cd conf /
# Sed -i 's # $ {user.home} # / data # g' * .xml // all xml files in the conf directory $ {user.home} replace / data, enter rocketmq / conf directory execute the command

4, start RocketMQ

# Cd ../bin/
# Nohup sh mqnamesrv> /var/log/ns.log &
# Nohup sh mqbroker -c ../conf/2m-noslave/broker-a.properties> /var/log/mq.log 2> & 1 &

5, view the boot log

# Tail -f /var/log/ns.log
# Tail -f /var/log/mq.log

6, view the boot port

# Netstat -tunpl
# Jps
# Kill -9 22596
# Kill -9 22564
# Kill -9 9967
# Netstat -tunpl
# Netstat -tunpl | grep java

7. Close RocketMQ

# Sh mqshutdown
1 Useage: mqshutdown broker | namesrv
# Sh mqshutdown broker
# Sh mqshutdown namesrv

8, start again

# Nohup sh mqnamesrv> /var/log/ns.log &
# Nohup sh mqbroker -c ../conf/2m-noslave/broker-a.properties> /var/log/mq.log 2> & 1 &
9, verification status

# Jps
     
         
         
         
  More:      
 
- Linux configuration Samba server (Server)
- Using Oracle for Oracle GoldenGate to achieve a one-way data synchronization (Database)
- Ubuntu Server 14.04 installation Web server (Linux + Apache + MySQL + PHP) (Server)
- The hash function under OpenSSL (Linux)
- MongoDB 2.6 deployment replica set + partitions (Database)
- XP virtual machine under VirtualBox solve occupy 100% CPU problem (Linux)
- Memcached installation, configuration and monitoring (Server)
- Configuring Proxy on a Unix terminal, accelerate Android Studio Construction (Linux)
- hadoop 2.7.1 High Availability Setup Deployment (Server)
- Install Firefox 28 on Ubuntu, Linux Mint (Linux)
- Vim configuration instructions (Linux)
- Java Foundation - Variables and data types (Programming)
- Standard and IO redirection (Linux)
- Linux script to copy the folder to all folders with the same name (Linux)
- C / C ++ language variable scope: local variables, global variables, file-level variables (Programming)
- The Linux disguised as windows to make the system more secure (Linux)
- Ubuntu 14.04 forget solution root password (Linux)
- EChart simple and practical control on chart (Programming)
- Java in the final qualifier (Programming)
- Oracle: RETURNING clause (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.