ActiveMQ之Linux下安装

软件环境:

centos6.5

jdk1.8

apache-activemq-5.10.0-bin.tar.gz

 

 

安装Java jdk

 

省略...

安装ActiveMQ

 

下载apache-activemq-xxx-bin.tar.gz并上传到/usr/local下

解压

cd /usr/local

tar -zxvf apache-activemq-xxx-bin.tar.gz

mv apache-activemq-xxx-bin activemq

cd /usr/local/activemq/bin

启动

./activemq start

ActiveMQ默认监听61616端口,查此端口看看是否成功启动

netstat -an | grep 61616

开启默认的相关端口

vim /etc/sysconfig/iptables

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

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

chkconfig iptables on

配置activemq开机自动启动

建立软连接

ln -s /usr/local/activemq/bin/activemq /etc/init.d/

vim /etc/init.d/activemq

在JAVACMD="auto"这一行后面增加如下面配置代码 JAVA_HOME根据实际路径填写

# chkconfig: 345 63 37

# description: Auto start ActiveMQ

JAVA_HOME=/usr/local/jdk

chkconfig --add  activemq

chkconfig activemq on

重启

reboot或shutdown -r now

可以打开管理员页面

http://ip:8161/admin/

默认的用户名/密码 : admin/admin

可以以系统服务的方式启动、查看状态和停止服务

service activemq start

service activemq status

service activemq stop

猜你喜欢

转载自www.cnblogs.com/zengnansheng/p/10389736.html