apollo配置中心安装部署

  1. 安装部署mysql数据库

  2. 下载sql文件

  3. 在mysql数据库中执行sql文件

    -- 登录mysql
    mysql -u user -p
    -- 执行sql文件
    source /path.../apollocinfigdb.sql;
    source /path.../apolloportaldb.sql;
    
  4. 检查sql执行是否正常

    select `Id`, `Key`, `Value`, `Comment` from `ApolloPortalDB`.`ServerConfig` limit 1;
    select `Id`, `Key`, `Value`, `Comment` from `ApolloConfigDB`.`ServerConfig` limit 1;
    
  5. 下载adminservice、configservice、portal服务包

    # 下载源代码
    https://gitcode.net/mirrors/ctripcorp/apollo
    # 修改 /script/build.bat
    set apollo_config_db_url="jdbc:mysql://192.168.131.128:3306/ApolloConfigDB"
    set apollo_portal_db_url="jdbc:mysql://192.168.131.128:3306/ApolloPortalDB"
    # 运行build.bat打包
    # 服务包上传linux环境
    
  6. 解压文件

    # 解压到当前目录
    unzip test.zip
    # 解压到指定目录
    unzip -d /temp test.zip
    # 解压不覆盖已有文件
    unzip -d -n /temp test.zip
    # 查看压缩包含有那些文件,不进行解压
    unzip -l test.zip
    # 查看文件列表并显示压缩比例
    unzip -v test.zip
    # 检查压缩文件是否损坏
    unzip -t test.zip
    # 指定目录解压,已有文件则进行覆盖
    unzip -o test.zip -d /temp
    
  7. 移动解压后的文件到相应的地方

    mv apollo-configservice /user/local/apollo/
    mv apollo-adminservice /user/local/apollo/
    mv apollo-protal /user/local/apollo/
    
  8. 启动

    # 开启日志写入权限,否则会报错
    chmod 777 /opt/logs/
    # 启动文件,有先后顺序
    sh /user/local/apollo/apollo-configservice/script/startup.sh
    sh /user/local/apollo/apollo-adminservice/script/startup.sh
    sh /user/local/apollo/apollo-protal/script/startup.sh
    
  9. 开启端口

    # 开启8080(Eureka) 8070(apollo)端口访问权限  -permanent 永久的
    firewall-cmd --permanent --add-port=8080/tcp
    firewall-cmd --permanent --add-port=8070/tcp
    # 刷新防火墙
    firewall-cmd --reload
    # 查看端口是否开启
    firewall-cmd --query-port=8080/tcp
    firewall-cmd --list-ports
    
  10. 登录

    # 登录Eruka
    http://192.168.131.128:8080/
    # 登录apollo (默认用户名:apollo 密码:admin)
    http://192.168.131.128:8070/
    
  • 9
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值