centos下安裝rocketmq4.6.1
阿新 • • 發佈:2020-12-30
1.前提條件
需安裝好jdk1.8 , maven
2.下載rocket原始碼
wget -O rocketmq-release-4.6.1.zip https://codeload.github.com/apache/rocketmq/zip/release-4.6.1
3.解壓縮
unzip rocketmq-release-4.6.1.zip -d /opt/myprogram/rocketmq
4.編譯原始碼
cd /opt/myprogram/rocketmq/rocketmq-release-4.6.1
mvn -Prelease-all -DskipTests clean install -U
mvn引數說明 (-Pxxx 啟用 id 為 xxx的profile (如有多個,用逗號隔開) -Dxxx=yyy 指定Java全域性屬性; -U強制更新snapshot型別的外掛或依賴庫(否則maven一天只會更新一次snapshot依賴))
編譯等待中....
編譯結果
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ rocketmq-distribution --- [INFO] Installing /opt/myprogram/rocketmq/rocketmq-release-4.6.1/distribution/pom.xml to /root/.m2/repository/org/apache/rocketmq/rocketmq-distribution/4.6.1/rocketmq-distribution-4.6.1.pom [INFO] Installing /opt/myprogram/rocketmq/rocketmq-release-4.6.1/distribution/target/rocketmq-4.6.1.tar.gz to /root/.m2/repository/org/apache/rocketmq/rocketmq-distribution/4.6.1/rocketmq-distribution-4.6.1.tar.gz [INFO] Installing /opt/myprogram/rocketmq/rocketmq-release-4.6.1/distribution/target/rocketmq-4.6.1.zip to /root/.m2/repository/org/apache/rocketmq/rocketmq-distribution/4.6.1/rocketmq-distribution-4.6.1.zip [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Apache RocketMQ 4.6.1 4.6.1: [INFO] [INFO] Apache RocketMQ 4.6.1 .............................. SUCCESS [ 16.273 s] [INFO] rocketmq-logging 4.6.1 ............................. SUCCESS [ 8.712 s] [INFO] rocketmq-remoting 4.6.1 ............................ SUCCESS [ 4.748 s] [INFO] rocketmq-common 4.6.1 .............................. SUCCESS [ 9.049 s] [INFO] rocketmq-client 4.6.1 .............................. SUCCESS [ 13.836 s] [INFO] rocketmq-store 4.6.1 ............................... SUCCESS [ 6.803 s] [INFO] rocketmq-srvutil 4.6.1 ............................. SUCCESS [ 1.659 s] [INFO] rocketmq-filter 4.6.1 .............................. SUCCESS [ 3.536 s] [INFO] rocketmq-acl 4.6.1 ................................. SUCCESS [ 2.983 s] [INFO] rocketmq-broker 4.6.1 .............................. SUCCESS [ 6.795 s] [INFO] rocketmq-tools 4.6.1 ............................... SUCCESS [ 4.952 s] [INFO] rocketmq-namesrv 4.6.1 ............................. SUCCESS [ 1.891 s] [INFO] rocketmq-logappender 4.6.1 ......................... SUCCESS [ 1.838 s] [INFO] rocketmq-openmessaging 4.6.1 ....................... SUCCESS [ 2.061 s] [INFO] rocketmq-example 4.6.1 ............................. SUCCESS [ 2.673 s] [INFO] rocketmq-test 4.6.1 ................................ SUCCESS [ 3.626 s] [INFO] rocketmq-distribution 4.6.1 ........................ SUCCESS [ 16.986 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:49 min [INFO] Finished at: 2020-12-30T15:27:45+08:00 [INFO] ------------------------------------------------------------------------
5.進入編譯好的bin目錄
[root@VM-0-7-centos bin]# cd /opt/myprogram/rocketmq/rocketmq-release-4.6.1/distribution/target/rocketmq-4.6.1/rocketmq-4.6.1/bin [root@VM-0-7-centos bin]# ls cachedog.sh cleancache.v1.sh mqadmin mqbroker mqbroker.numanode0 mqbroker.numanode2 mqnamesrv mqshutdown os.sh play.sh runbroker.cmd runserver.cmd setcache.sh tools.cmd cleancache.sh dledger mqadmin.cmd mqbroker.cmd mqbroker.numanode1 mqbroker.numanode3 mqnamesrv.cmd mqshutdown.cmd play.cmd README.md runbroker.sh runserver.sh startfsrv.sh tools.sh
6.啟動nameserver
注意,這裡直接啟動,如果伺服器記憶體比較小,會報記憶體不夠.需要先修改配置,踩坑參考
./mqnamesrv