Artemis-1.2.0研究系列1:bin二进制文件创建broker的操作

首先,官网网址:

http://archive.apache.org/dist/activemq/activemq-artemis/1.2.0/   当时还是1.2.0版本,所以先研究这个版本

官方说明文档: http://activemq.apache.org/artemis/docs/1.2.0/activemq-artemis-1.2.0.pdf

------------------------

先下载 http://archive.apache.org/dist/activemq/activemq-artemis/1.2.0/apache-artemis-1.2.0-bin.tar.gz

linux里解压缩之后,看到这些

drwxr-xr-x. 7 root root  4096 Jan  4 04:50 .
dr-xr-x---. 6 root root  4096 May 13 19:43 ..
drwxrwxr-x. 3 root root  4096 Jan  4 04:50 bin
drwxr-xr-x. 6 root root  4096 Jan  4 04:50 examples
drwxr-xr-x. 2 root root  4096 May 13 19:43 lib
-rw-rw-r--. 1 root root 14863 Jan  4 04:50 LICENSE
-rw-rw-r--. 1 root root   179 Jan  4 04:50 NOTICE
-rw-rw-r--. 1 root root  4625 Jan  4 04:50 README.html
drwxr-xr-x. 2 root root  4096 Jan  4 04:50 schema
drwxr-xr-x. 9 root root  4096 May 13 19:43 web
 

那么,下面需要做什么呢?

执行命令

[root@machine4 apache-artemis-1.2.0]# ./bin/artemis
usage: artemis <command> [<args>]

The most commonly used artemis commands are:
    browser    It will send consume messages from an instance
    consumer   It will send consume messages from an instance
    create     creates a new broker instance
    data       data tools group (print) (example ./artemis data print)
    help       Display help information
    producer   It will send messages to an instance

See 'artemis help <command>' for more information on a specific command.

 

看来需要执行一些具体的命令,那么到底执行啥命令呢?

根据官方说明,需要先创建一个Broker Instance.

所以这里执行命令:

[root@machine4 apache-artemis-1.2.0]# ./bin/artemis create /var/mq/mybroker
Creating ActiveMQ Artemis instance at: /var/mq/mybroker

--user: is mandatory with this configuration:
Please provide the default username:
admin

--password: is mandatory with this configuration:
Please provide the default password:


--role: is mandatory with this configuration:
Please provide the default role:
admin

--allow-anonymous | --require-login: is mandatory with this configuration:
Allow anonymous access? (Y/N):
N

Auto tuning journal ...
done! Your system can make 5.21 writes per millisecond, your journal-buffer-timeout will be 192000

You can now start the broker by executing:  

   "/var/mq/mybroker/bin/artemis" run

Or you can run the broker in the background using:

   "/var/mq/mybroker/bin/artemis-service" start

所以,这里需要研究下 ./bin/artemis create /var/mq/mybroker 的背后到底做了什么事情!

这个见下一章节:

 


 

 

 

你可能感兴趣的:(artemis)