8 月 052016
 

安装JDK包

[root@ip-172-31-44-208 ~]# yum -y install jdk-8u241-linux-x64.rpm

查看Java版本信息

[root@ip-172-31-44-208 ~]# java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
[root@ip-172-31-44-208 ~]#

下载ActiveMQ二进制包

http://activemq.apache.org/components/classic/download/

[root@ip-172-31-44-208 ~]# tar xzf apache-activemq-5.15.11-bin.tar.gz 
[root@ip-172-31-44-208 ~]# mv apache-activemq-5.15.11 /usr/local/

进入Apache ActiveMQ主程序目录

[root@ip-172-31-44-208 ~]# cd /usr/local/apache-activemq-5.15.11/
[root@ip-172-31-44-208 apache-activemq-5.15.11]# ls
activemq-all-5.15.11.jar conf docs lib NOTICE webapps
bin data examples LICENSE README.txt webapps-demo
[root@ip-172-31-44-208 apache-activemq-5.15.11]# ls bin/
activemq activemq.jar linux-x86-32 macosx
activemq-diag env linux-x86-64 wrapper.jar
[root@ip-172-31-44-208 apache-activemq-5.15.11]#

启动服务

[root@ip-172-31-44-208 apache-activemq-5.15.11]# cd ./bin/
[root@ip-172-31-44-208 bin]# ./activemq start
INFO: Loading '/usr/local/apache-activemq-5.15.11//bin/env'
INFO: Using java '/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/usr/local/apache-activemq-5.15.11//data/activemq.pid' (pid '12576')
[root@ip-172-31-44-208 bin]#

查看端口监听

[root@ip-172-31-44-208 bin]# netstat -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     
tcp6       0      0 :::5672                 :::*                    LISTEN     
tcp6       0      0 :::61613                :::*                    LISTEN     
tcp6       0      0 :::61614                :::*                    LISTEN     
tcp6       0      0 :::111                  :::*                    LISTEN     
tcp6       0      0 :::61616                :::*                    LISTEN     
tcp6       0      0 :::40497                :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:25                  :::*                    LISTEN     
tcp6       0      0 :::1883                 :::*                    LISTEN     
tcp6       0      0 :::8161                 :::*                    LISTEN     
[root@ip-172-31-44-208 bin]#

查看运行状态

[root@ip-172-31-44-208 bin]# ./activemq status
INFO: Loading '/usr/local/apache-activemq-5.15.11//bin/env'
INFO: Using java '/bin/java'
ActiveMQ is running (pid '12576')
[root@ip-172-31-44-208 bin]#

使用浏览器访问Web控制台


停止服务

[root@ip-172-31-44-208 bin]# ./activemq stop
INFO: Loading '/usr/local/apache-activemq-5.15.11//bin/env'
INFO: Using java '/bin/java'
INFO: Waiting at least 30 seconds for regular process termination of pid '12576' : 
Java Runtime: Oracle Corporation 1.8.0_241 /usr/java/jdk1.8.0_241-amd64/jre
  Heap sizes: current=62976k  free=61992k  max=932352k
    JVM args: -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/usr/local/apache-activemq-5.15.11//conf/login.config -Dactivemq.classpath=/usr/local/apache-activemq-5.15.11//conf:/usr/local/apache-activemq-5.15.11//../lib/: -Dactivemq.home=/usr/local/apache-activemq-5.15.11/ -Dactivemq.base=/usr/local/apache-activemq-5.15.11/ -Dactivemq.conf=/usr/local/apache-activemq-5.15.11//conf -Dactivemq.data=/usr/local/apache-activemq-5.15.11//data
Extensions classpath:
  [/usr/local/apache-activemq-5.15.11/lib,/usr/local/apache-activemq-5.15.11/lib/camel,/usr/local/apache-activemq-5.15.11/lib/optional,/usr/local/apache-activemq-5.15.11/lib/web,/usr/local/apache-activemq-5.15.11/lib/extra]
ACTIVEMQ_HOME: /usr/local/apache-activemq-5.15.11
ACTIVEMQ_BASE: /usr/local/apache-activemq-5.15.11
ACTIVEMQ_CONF: /usr/local/apache-activemq-5.15.11/conf
ACTIVEMQ_DATA: /usr/local/apache-activemq-5.15.11/data
Connecting to pid: 12576
Stopping broker: localhost
.. TERMINATED
[root@ip-172-31-44-208 bin]#

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据