安装activemq的全过程
安装环境 :
- CentOS7
- JDK8
1:进入local目录
创建mkdir /usr/local/service/目录,进入cd /usr/local/services/目录中使用wget命令下载ActiveMQ
2:下载activemq
wget http://archive.apache.org/dist/activemq/5.15.3/apache-activemq-5.15.3-bin.tar.gz
3:解压 apache-activemq-5.15.3.tar.gz
4:重命名mv
apache-activemq-5.15.3 activemq
5:进入init.d 添加activemq文件并编辑
cd /etc/init.d/
vi
apache-activemq-5.15.3
编辑内容如下
#!/bin/sh
#
# /etc/init.d/activemq
# chkconfig: 345 63 37
# description: activemq servlet container.
# processname: activemq 5.14.1
# Source function library.
#. /etc/init.d/functions
# source networking configuration.
#. /etc/sysconfig/network
#自己服务器的jdk路径
export
JAVA_HOME=/usr/local/jdk1.8.0_11
export
CATALINA_HOME=/usr/local/services/apache-activemq-5.15.3
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
6:保存并推出
7:对active文件授权
chmod 777 apache-activemq-5.15.3
8:设置开机启动
chkconfig apache-activemq-5.15.3 on
9:启动activemq
service apache-activemq-5.15.3 start
10:firewall开放8161端口
firewall-cmd --zone=public --add-port=8161/tcp --permanent
firewall-cmd --reload
11:浏览器访问:
http://IP地址:8161/admin/
用户名和密码均为admin
http://IP
地址:8161
默认用户名密码为:admin/admin
文章来源:https://blog.csdn.net/baidu_35536997/article/details/77849372
(本文只是自己做个记录以后方便查看)