-
选择对应的版本进行下载,这里选用linux下
-
上传压缩包至/usr/local下
-
解压缩对应的压缩包
tar -zxvf apache-activemq-5.16.0
-
进入activemq目录下,可以发现目录结构和tomcat差不多
-
我们进入bin目录,启动activemq
./activemq start # 启动 ./activemq stop # 停止 ./activemq restart # 重启 ./activemq status # 状态
-
activemq的日志信息在data/activemq.log下,使用对应的命令查看日志情况
tail -f activemq.log
-
如果linux是用的是虚拟机的话,并且和本地网络能ping通,输入localhost:8161可以访问到对应的页面
-
如果是用阿里云的话
-
配置安全组,开放61616(服务器内部端口),8161(前台访问端口)
-
修改conf/jetty.xml,默认情况下只有本地能够访问,修改为如下地址
-
防火墙就不比多说,需要开放对应的端口,或者关闭防火墙
firewall-cmd --reload # 重新加载配置 firewall-cmd --list-all # 查看所有配置 firewall-cmd --zone=public --list-ports # 查看当前开放的端口(允许任意IP访问) firewall-cmd --zone=public --add-port=61616/tcp --permanent # 开放指定端口(允许任意IP访问) -- permanent为永久生效,没有此参数centos重启后该配置将失效 firewall-cmd --reload #
-
-
设置activemq为对应的服务,并且开启自启动
ln -s /root/apache-activemq-5.15.5/bin/activemq /etc/init.d # 建立软连接
需要注意的是需要配置JAVA_HOME,要不然可能启动不起来
vim /etc/init.d/activemq # 修改配置文件 export JAVA_HOME=/usr/local/jdk1.8 # 导出JAVA_HOME环境 在文件头部添加即可
chkconfig activemq on # 设置开启启动 service activemq start # 通过系统指令 service activemq status service activemq stop
-
文章参考至
阿里云(ECS)服务器安装activemq
最新推荐文章于 2024-06-28 16:18:57 发布