1、# 下载地址
wget http://mirrors.shu.edu.cn/apache//activemq/5.15.4/apache-activemq-5.15.4-bin.tar.gz
2、# 解压
tar -zxvf apache-activemq-5.15.4-bin.tar.gz
3、#重命名
mv apache-activemq-5.15.4 activemq-5.15.4
4、# 进入目录下
cd activemq-5.15.4
cd bin
5、# 前台启动,有启动日志(可以用于查看是否正常启动)
./activemq console
6、# 后台启动,无启动日志
./activemq start
# 关闭
./activemq stop
# 重启
./activemq restart
7、# 查看61616端口是否打开
netstat -anp | grep 8161
netstat -anp | grep 61616
# 杀死进程
kill 3544
问题:错误:No address associated with hostname
./activemq console
# 如果出现下面错误,pro主机名没有对应的地址
java.net.UnknownHostException: pro: pro: No address associated with hostname
# 在hosts 文件中127.0.01 后面加上 pro 这个主机名即可
vim /etc/hosts
127.0.0.1 pro