ActiveMQ在Linux中的安裝


1、下載相關activeMQ安裝包

  下載路徑:http://activemq.apache.org/download.html

  下載最新安裝包,選擇Linux版進行下載

2、解壓重命名

  (1)解壓:

root@localhost opt]# rm -rf apache-activemq-5.14.1-bin.tar.gz

  (2)重命名activeMQ

[root@localhost opt]# mv apache-activemq-5.14.1 ./activeMQ

  (3)由於啟動腳本activemq沒有可執行的權限,需要授權(此步可選)

[root@localhost opt]# cd activemq/bin/
[root@localhost bin]# chmod 755 ./activemq

  activeMQ需要用到兩個端口:61616(消息通訊端口)、8161(管理后台端口,可以在conf/jetty.xml中修改端口號)

  在防火牆中打開這兩個端口

[root@localhost bin]# vi /etc/sysconfig/iptables

  插入:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 8161 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 61616 -j ACCEPT

  重啟防火牆:

[root@localhost bin]# service iptables restart

3、啟動activeMQ

[root@localhost activeMQ]# ./bin/activemq start

4、驗證是否安裝成功

[root@localhost activemq]# ./bin/activemq status
INFO: Loading '/opt/activemq//bin/env'
INFO: Using java '/opt/jdk1.7.0_79/bin/java'
ActiveMQ is running (pid '3535')

5、關閉/重啟activeMQ

[root@localhost activemq]# ./bin/activemq stop
[root@localhost activemq]# ./bin/activemq restart

 6、登錄管理后台

 http:192.168.56.129:8161

  默認初始用戶名和密碼是admin和admin.

  登錄成功頁面:

至此ActiveMQ的安裝就成功了! 

 

 

 

 

轉自:https://www.cnblogs.com/parryyang/p/6051835.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM