nix.long
export PATH=$PATH:/usr/sdk/apache-apollo-1.7.1/bin
export PATH=$PATH:/usr/sdk/jdk1.8.0_151/bin
export APOLLO_HOME=/usr/sdk/apache-apollo-1.7.1/
export JAVA_HOME=/usr/sdk/jdk1.8.0_151/
[root@iZ2zec6a1xdo92fn7zib3rZ sdk]#apollo create myapollo /usr/workplace/apache-apollo/
Creating apollo instance at: /usr/workplace/apache-apollo
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/workplace/apache-apollo/bin/apollo-broker" run
Or you can setup the broker as system service and run it in the background:
sudo ln -s "/usr/workplace/apache-apollo/bin/apollo-broker-service" /etc/init.d/
/etc/init.d/apollo-broker-service start | stop | restart
vi /opt/lib/mybroker/etc/apollo.xml
修改
http://127.0.0.1:61680“/>
https://127.0.0.1:61681“/>
为
http://0.0.0.0:61680“/>
https://0.0.0.0:61681“/>
在apollo.xml:
<!-- Give admins full access -->
<access_rule allow="admins" action="*"/>
<access_rule allow="*" action="connect" kind="connector"/>
默认配置为允许admins 组用户连接, 如果允许任意用户连接, 修改为:
<!-- Give admins full access -->
<access_rule allow="*" action="*"/>
<access_rule allow="*" action="connect" kind="connector"/>
连接需要的用户密码对在 users.properities配置
#
# The list of users that can login. This file supports both plain text or
# encrypted passwords. Here is an example what an encrypted password
# would look like:
#
# admin=ENC(Cf3Jf3tM+UrSOoaKU50od5CuBa8rxjoL)
#
admin=password
nix=123456