2020年 · Linux

Apollo安装部署

下载地址:http://archive.apache.org/dist/activemq/activemq-apollo/
下载的包: apache-apollo-1.7.1-unix-distro.tar.gz
[root@localhost ~]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.5.1804 (Core)
Release: 7.5.1804
Codename: Core
[root@localhost ~]# java -version
java version “1.8.0_231”
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
tar zxf apache-apollo-1.7.1-unix-distro.tar.gz
[root@localhost ~]# mv apache-apollo-1.7.1 /usr/local/apollo
新建一个broker:
broker包含配置文件,运行数据,日志,数据文件等内容。不推荐(${APOLLO_HOME})中直接新建一个broker
[root@localhost ~]# cd /usr/local/apollo

[root@localhost apollo]# ./bin/apollo create blog.ohyeahwoo.com
Creating apollo instance at: blog.ohyeahwoo.com
Generating ssl keystore…

Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using “keytool -importkeystore -srckeystore keystore -destkeystore keystore -deststoretype pkcs12”.

You can now start the broker by executing:

“/usr/local/apollo/blog.ohyeahwoo.com/bin/apollo-broker” run

Or you can setup the broker as system service and run it in the background:

sudo ln -s “/usr/local/apollo/blog.ohyeahwoo.com/bin/apollo-broker-service” /etc/init.d/
/etc/init.d/apollo-broker-service start
执行上面命令之后,会在apollot目录中新建一个blog.ohyeahwoo.com目录,其中会有下面这些文件夹:
[root@localhost blog.ohyeahwoo.com]# ls
bin data etc log tmp
对应目录用途:
bin  : holds execution scripts associated with this instance.
etc  : hold the instance configuration files
data : holds the data files used for storing persistent messages
log : holds rotating log files
tmp : holds temporary files that are safe to delete between broker runs

确认可正常连接:进入Apollo 控制台,确认broker已经正常启动

地址:http://127.0.0.1:61680/ or https://127.0.0.1:61681/

默认用户名和密码是: admin,password