Build rockermq

Installation maven and java environment, will be omitted here. If not, install maven and java environment!

 

First, download the rockermq
official address: http: //rocketmq.apache.org/docs/quick-start/

Step One: Download
wget https://www-us.apache.org/dist/rocketmq/4.4.0/rocketmq-all-4.4.0-bin-release.zip

Second step: extracting and shifting the / usr / local / rockermq
the unzip rocketmq-all-4.4.0-bin-release.zip
Music Videos rocketmq-All-Release-4.4.0-bin / usr / local / rocketmq

The third step: rockermq add environment variables
vim / etc / Profile
# rockermq
Export the PATH = $ the PATH: / usr / local / rocketmq / bin
Export NAMESRV_ADDR = localhost: 9876
Source / etc / Profile
Step Four: modify the boot memory (reasons the official is due to the default settings rockermq jar package startup memory is very large, direct start, then will prompt your memory and other reasons, so we have to modify a little small)
cd / usr / local / rocketmq / bin /
vim runserver.sh
the JAVA_OPT = "$ {JAVA_OPT} -server -Xms4g -Xmx4g -Xmn2g -XX: MetaspaceSize = 128m -XX: MaxMetaspaceSize = 320m"
read as follows:
JAVA_OPT = "{$} JAVA_OPT -server -XX -Xms512m -Xmx512m -Xmn512m : MetaspaceSize = 128m -XX: MaxMetaspaceSize = 128m "

vim runbroker.sh
将JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g -Xmn4g"
改成JAVA_OPT="${JAVA_OPT} -server -Xms512m -Xmx512m -Xmn512m"

## java heap memory and stack memory can be modified according to your computer configuration.

Step Five: Start rockermq
Start Name Server: mqnamesrv &
Start Broker: mqbroker -n localhost: 9876 &

Close
mqshutdown namesrv
mqshutdown Broker


Such our rockermq on the installation is completed. The following look at the way the installation graphical interface.
Step One: Download
cd / usr / local / rocketmq
git clone https://github.com/apache/rocketmq-externals
Step two: modify the configuration file
cd / usr / local / rocketmq / rocketmq-externals / rocketmq-console / the src / main / Resources
Vim the application.properties
# modified as follows
server.port = 8080 // port number
rocketmq.config.namesrvAddr = 127.0.0.1: 9876 // configure the service address
rocketmq.config.dataPath = / tmp / rocketmq- console / data // mq data path, can modify their own
third step: using maven package
CD / usr / local / rocketmq / rocketmq-externals / rocketmq-Console
mvn = Clean Package -Dmaven.test.skip to true
step Four: run
cd / usr / local / rocketmq / rocketmq-externals / rocketmq-console / target
127.0.0.1 nohup java -jar rocketmq-console- ng-1.0.1.jar --server.port = 8080 --rocketmq.config.namesrvAddr =: 9876 version & # attention jar package, when you are likely to start again version has been updated
so that we graphical interface is now installed, the following possible by visiting us set a good direct access to the port 8080

Guess you like

Origin www.cnblogs.com/yeyu1314/p/11183462.html