activemq下载地址,http://activemq.apache.org/download.html,下载后解压,进入bin,直接运行 activemq start

bin/activemq start
INFO: Loading '/usr/local/activemq/bin/env'
INFO: Using java '/usr/local/jdk8/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/usr/local/activemq/data/activemq.pid' (pid '3880')

默认端口是61616,可以查看端口有没被占用

[root@localhost init.d]# netstat -an|grep 61616
tcp6       0      0 :::61616                :::*                    LISTEN 

端口61616加入防火墙,后台管理端口8161也加入防火墙

firewall-cmd --zone=public --add-port=61616/tcp --permanent
firewall-cmd --zone=public --add-port=8161/tcp --permanent
firewall-cmd --reload

浏览器 访问http://192.168.249.71:8161/admin/,用户名/密码:admin/admin

centos7安装activemq

把activemq加入系统服务并开机自启动cp /usr/local/activemq/bin/activemq /etc/init.d/activemqd

cd /etc/init.d/

vi activemqd

在#!/bin/sh下面添加以下代码

#### BEGIN INIT INFO
# Provides:             activemq
# Required-Start:       $remote_fs $syslog
# Required-Stop:        $remote_fs $syslog
# Default-Start:        2 3 4 5
# Default-Stop:         0 6
# chkconfig: 2345 64 36
# Short-Description:    ActiveMQ server
### END INIT INFO
export JAVA_HOME=/usr/local/jdk7#根据实际情况设置
ACTIVEMQ_HOME=/usr/local/activemq#根据实际情况设置

  

 


#加入系统服务并开机启动
chmod +x activemqd chkconfig --add activemqd chkconfig activemqd on [root@localhost init.d]# service activemqd start INFO: Loading '/usr/local/activemq/bin/env' INFO: Using java '/usr/local/jdk8/bin/java' INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details INFO: pidfile created : '/usr/local/activemq/data/activemq.pid' (pid '4057')

java代码测试

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2021-05-08
  • 2022-02-21
  • 2022-12-23
  • 2021-08-18
  • 2021-12-12
猜你喜欢
  • 2021-08-16
  • 2022-01-17
  • 2021-06-29
  • 2022-03-04
  • 2021-10-03
  • 2021-12-02
  • 2021-08-26
相关资源
相似解决方案