一般在mac上安装软件大家都是比较喜欢用brew来安装,今天就用brew来安装ActiveMQ。
转自:http://blog.csdn.net/u010046908/article/details/54728375
http://blog.csdn.net/u010046908/article/details/547283751.使用brew来安装 ActiveMQ
brew install activemq
看到如下的结果时候,可以很庆幸的告诉你,你已经成功安装了activemq。
localhost:~ lidong$ brew install activemqUpdating Homebrew...==> Auto-updated Homebrew!Updated 1 tap (homebrew/core).==> New Formulaebit gobby molecule statikcarrot2 gsmartcontrol opencoarrays tarsnap-guicnats gtk-chtheme orc-tools terminatoreasy-tag imagemagick@6 source-to-image todomangeeqie klavaro speexdsp watchexecgifcap mingw-w64-binutils sqlparse==> Updated Formulaeabcde gradle opusadns grafana orientdbafl-fuzz groonga oscamazon-ecs-cli grsync osqueryammonite-repl gsoap packeransible gtk+ packetbeatansible-cmdb gtk+3 pandocant h2o parallelantigen hana pazpar2apktool haproxy pbzip2app-engine-go-64 harfbuzz pcsc-litearangodb heroku pdf2htmlexaria2 hivemind pdfcrackarmor htmlcleaner pdftoednarping httrack pdnsasio hunspell pevassh hyperscan pgformatteraubio icarus-verilog pgroutingautotrace icoutils piusaws-elasticbeanstalk ievms pkcs11-helperaws-sdk-cpp imagemagick plantumlawscli influxdb pngcrushb2-tools innotop pod2manbeansdb intercal popplerberkeley-db ios-webkit-debug-proxy ✔ postgrestbfg iperf3 pre-commitbib-tool irssi pripsbibutils iso-codes prometheusbind jack pstoeditbitlbee javarepl pulseaudiobitrise jdnssec-tools purescriptblockhash jenkins pushpinbogofilter jid pwntoolsbuku jigdo pyenvcabal-install joe pyqt5caddy jruby qbscadubi kapacitor qcachegrindcaf kawa qemucarina khal qjackctlcattle kibana qscintilla2cdk kobalt quantlibcertbot kotlin rabbitmqclasp kubernetes-cli rancher-clicloc kubernetes-helm rancher-composecmake languagetool rancidcoffeescript lastpass-cli rangercollectd lean-cli ripgrepcommandbox leptonica rocksdbconan lft rpmconsul-template libass rswiftcoturn libcec rtagscromwell libcouchbase rtvcrystal-lang libdap ruby-buildcurlpp libev rustdar libfabric sbcldarcs libgcrypt sdbdarkice libgit2 serddatetime-fortran libgit2-glib sfkdatomic libgosu shadowsocks-libevdbhash libgphoto2 shmcatdbt libgtop sipdbxml liblas snap7dcmtk libmikmod snortdeis libmill socideisctl libming sopsdependency-check libmwaw sorddiff-pdf libosmium sourcekittendiffoscope libphonenumber speedtest_clidirt libpng sphinx-docdmd libproxy sqldiffdnscrypt-proxy libsass sqlitedocker libslax sqlite-analyzerdocker-compose libspectre sshguarddocker-machine libsvm sstp-clientdocker-machine-nfs libtasn1 ✔ sterndocker-machine-parallels libtiff stokendocker-swarm libupnp stormpath-clidockward libusb ✔ svtplay-dldoitlive libvirt swaksdpkg libvpx swiftdub libxc swiftformatduplicity libxml2 ✔ swiftgendwarfutils lighttpd swiftlintecl link-grammar swigeiffelstudio linkerd syncthingejabberd liquigraph synfigeject lmdb syntaxerlelasticsearch logentries tboxelasticsearch@2.4 logstash tcpkalielixir logtalk telegrafelixirscript lrdf terraformemscripten lsyncd terragruntetcd ltc-tools thefuckeuca2ools lz4 thriftextract_url macvim tile38fabio makeself tinfdk-aac mariadb tintinfftw mcabber tippecanoefilebeat mediaconch tomcatflatbuffers memcached ✔ transcryptflow ✔ memcacheq tty-clockfluent-bit mercurial ttydfontforge metaproxy tvnamerfonttools metricbeat twarcfossil micropython typescriptfping ✔ mikutter u-boot-toolsfq minizip udunitsfreeswitch mktorrent unittest-cppfreetds mkvtoolnix unrarfwup moc unshieldfzf mongo-c-driver vapoursynthgammu mongodb ✔ vdirsyncergcal mongoose vicegdb mono vimgeckodriver mpd wavpackgeoipupdate mpv webalizerghc msgpack weechatghostscript mypy whatmp3ginac neofetch wireguard-toolsgit-cola nexus xapiangit-lfs nghttp2 xmlrpc-cgit-subrepo nim xonshgit-test no-more-secrets xqillagit-tracker node ✔ xrootdgiter8 node-build xxhashgitlab-ci-multi-runner node@0.12 xzgitup node@4 yadmgitversion node@6 yankgmime nodeenv yarngnu-cobol notmuch yashgnu-sed nss yawsgnupg-pkcs11-scd nvc yazgnupg2 nvi yle-dlgnuradio open-cobol you-getgnutls open-jtalk youtube-dlgo open-mesh zabbix ✔godep open-ocd zbargofabric8 openconnect zeromqgoogle-java-format opencore-amr zimggosu openshift-cli zplug==> Renamed Formulaeeigen32 -> eigen@3.2 scala210 -> scala@2.10 scala211 -> scala@2.11==> Deleted Formulaecpp-netlib dmtx-utils dynamodb-local gcc@6 qtplay==> Using the sandbox==> Downloading https://www.apache.org/dyn/closer.cgi?path=/activemq/5.14.3/apac==> Best Mirror http://mirrors.cnnic.cn/apache/activemq/5.14.3/apache-activemq-5 100.0%==> CaveatsTo have launchd start activemq now and restart at login: brew services start activemqOr, if you don't want/need a background service you can just run: activemq start==> Summary�� /usr/local/Cellar/activemq/5.14.3: 555 files, 59.7M, built in 1 minute 39 secondslocalhost:~ lidong$
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
2.使用activemq –version来查看安装的版本
localhost:~ lidong$ activemq INFO: Loading '/usr/local/Cellar/activemq/5.14.3/libexec//bin/env'INFO: Using java '/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/java'Java Runtime: Oracle Corporation 1.8.0_92 /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre Heap sizes: current=62976k free=61648k max=932352k JVM args: -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/usr/local/Cellar/activemq/5.14.3/libexec//conf/login.config -Dactivemq.classpath=/usr/local/Cellar/activemq/5.14.3/libexec//conf:/usr/local/Cellar/activemq/5.14.3/libexec//../lib/: -Dactivemq.home=/usr/local/Cellar/activemq/5.14.3/libexec/ -Dactivemq.base=/usr/local/Cellar/activemq/5.14.3/libexec/ -Dactivemq.conf=/usr/local/Cellar/activemq/5.14.3/libexec//conf -Dactivemq.data=/usr/local/Cellar/activemq/5.14.3/libexec//dataExtensions classpath: [/usr/local/Cellar/activemq/5.14.3/libexec/lib,/usr/local/Cellar/activemq/5.14.3/libexec/lib/camel,/usr/local/Cellar/activemq/5.14.3/libexec/lib/optional,/usr/local/Cellar/activemq/5.14.3/libexec/lib/web,/usr/local/Cellar/activemq/5.14.3/libexec/lib/extra]ACTIVEMQ_HOME: /usr/local/Cellar/activemq/5.14.3/libexecACTIVEMQ_BASE: /usr/local/Cellar/activemq/5.14.3/libexecACTIVEMQ_CONF: /usr/local/Cellar/activemq/5.14.3/libexec/confACTIVEMQ_DATA: /usr/local/Cellar/activemq/5.14.3/libexec/dataActiveMQ 5.14.3For help or more information please see: http://activemq.apache.org
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
3.activemq常用的命令
Tasks: browse - Display selected messages in a specified destination. bstat - Performs a predefined query that displays useful statistics regarding the specified broker consumer - Receives messages from the broker create - Creates a runnable broker instance in the specified path. decrypt - Decrypts given text dstat - Performs a predefined query that displays useful tabular statistics regarding the specified destination type encrypt - Encrypts given text export - Exports a stopped brokers data files to an archive file list - Lists all available brokers in the specified JMX context producer - Sends messages to the broker purge - Delete selected destination's messages that matches the message selector query - Display selected broker component's attributes and statistics. start - Creates and starts a broker using a configuration file, or a broker URI. stop - Stops a running broker specified by the broker name.Task Options (Options specific to each task): -h,-?,
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
4.启动activeMQ服务
activemq start
看到如下信息,就表示已经安装成功
localhost:~ lidong$ activemq startINFO: Loading '/usr/local/Cellar/activemq/5.14.3/libexec//bin/env'INFO: Using java '/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/java'INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get detailsINFO: pidfile created : '/usr/local/Cellar/ActiveMQ/5.14.3/libexec//data/activemq.pid' (pid '2402')
然后就可以访问管理web console。在浏览器中输入url: http://localhost:8161/
点击 Manager ActiveMQ boker 输入用户名:admin 密码admin
看到这个页面,就可以到ActiveMQ 启动成功了。