本文共 13644 字,大约阅读时间需要 45 分钟。
一般在mac上安装软件大家都是比较喜欢用brew来安装,今天就用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$
localhost:~ lidong$ activemq --versionINFO: 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
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): --extdir- Add the jar files in the directory to the classpath. --version - Display the version information. -h,-?,--help - Display this help information. To display task specific help, use Main [task] -h,-?,--help
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:
点击 Manager ActiveMQ boker 输入用户名:admin 密码admin
看到这个页面,就可以到ActiveMQ 启动成功了。