下载
wget https://mirrors.tuna.tsinghua.edu.cn/apache//activemq/5.15.3/apache-activemq-5.15.3-bin.tar.gz
解压
tar -xvfz apache-activemq-5.15.3-bin.tar.gz
运行ActiveMQ需要先安装jdk
使用的CentOS7,不能用系统自带的openjdk,查看CentOS自带JDK是否已安装
[root@node1 ~]# yum list installed |grep java
java-1.6.0-openjdk.x86_64
java-1.6.0-openjdk-devel.x86_64
java-1.7.0-openjdk.x86_64
java-1.7.0-openjdk-devel.x86_64
若有自带安装的JDK,卸载CentOS系统自带Java环境
[root@node1 ~]# yum -y remove java-1.7.0-openjdk*
[root@node1 ~]# yum -y remove java-1.6.0-openjdk*
下载jdk
wget http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz?AuthParam=1525675045_ded85ea570bd7ef053491b5b01714f9b
重命名
mv jdk-8u171-linux-x64.tar.gz\?AuthParam\=1525673222_62973c4980691a148731dd0d40894b7a jdk-8.tar.gz
解压
tar -zxvf jdk-8.tar.gz
配置环境变量
vi /etc/profile
# set java environment
JAVA_HOME=/root/jdk1.8.0_171
PATH=${JAVA_HOME}/bin:$PATH
CLASSPATH=$JAVA_HOME/jre/li.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jarb/ext:$JAVA_HOME/lib/tools.jar
export PATH JAVA_HOME CLASSPATH
加载配置文件
source /etc/profile
java -version查看是否安装完毕
进入ActiveMQ目录
bin/activemq start 启动项目
访问
http://192.168.157.128:8161 进入主页