Centos 搭建activemq html
1,官方下載 http://activemq.apache.org/activemq-5122-release.html apache
apache-activemq-5.15.2-bin.tar.gzcentos
2,tar -zxvf apache-activemq-5.15.2-bin.tar.gztcp
3 開啓自啓測試
cd /etc/init.d/rest
vi activemq日誌
insert and save 下面自啓內容htm
#!/bin/shcmd
#export JAVA_HOME=/it
export CATALINA_HOME=/usr/activemq/apache-activemq-5.15.2
case $1 in
start)
sh $CATALINA_HOME/bin/activemq start
;;
stop)
sh $CATALINA_HOME/bin/activemq stop
;;
restart)
sh $CATALINA_HOME/bin/activemq stop
sleep 1
sh $CATALINA_HOME/bin/activemq start
;;
esac
exit 0
設置可執行權限
chmod 777 activemq
設置開機啓動並啓動activemq
chkconfig activemq on (關閉off)
service activemq start
不設置開機啓動,可進入bin目錄找到對應系統位數的文件夾中 ./activemq start/consle start是後臺運行consle是打印日誌運行
4 測試
設置並打開防火牆8161
firewall-cmd --zone=public --add-port=8161/tcp --permanent
#更新防火牆
firewall-cmd --complete-reload
win訪問centos並測試
注意:
服務中使用時鏈接的端口號是61616.別傻乎乎覺得是8161