apollo 环境搭建

源码拖管地址和文档介绍

1、github 地址 https://github.com/ctripcorp/apollo
2、https://github.com/ctripcorp/apollo/wiki/Apollo配置中心介绍

把源码导入到idea工程,通过运行build.bat 生成 apollo-adminservice-1.5.1-github.zip 、apollo-configservice-1.5.1-github.zip、apollo-portal-1.5.1-github.zip 

环境准备
1、准备3台虚拟机以及规划
192.168.20.100   apollo-portal和mysql
192.168.20.101   apollo-adminservice、apollo-configservice 和 mysql
192.168.20.102   apollo-adminservice、apollo-configservice 和 mysql

2、3台虚拟机安装jdk 1.8+
3、安装mysql步骤,3台同时安装,步骤都一样
   安装mysql的步骤   (https://www.cnblogs.com/wuhaidong/p/11935764.html)
4、sql脚本执行
  把apollo\scripts\db\migration\configdb里面的文件上传执行到101和102 对应的数据库
    把apollo\scripts\db\migration\portaldb里面的文件上传执行到100 对应的数据库
5、101 解压 apollo-configservice 到 /usr/local/configservice
    

#解压
unzip apollo-configservice-1.5.1-github.zip -d /usr/local/configservice
#修改 配置数据源
vim application-github.properties

#以下是数据源的配置信息
spring.datasource.url = jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8 
spring.datasource.username = root 
spring.datasource.password = 123456

#启动
/usr/local/configservice/scripts/startup.sh
#停止
/usr/local/configservice/scripts/shutdown.sh

 102 同样的操作

6、101 解压 apollo-adminservice 到 /usr/local/adminservice

#解压
unzip apollo-adminservice-1.5.1-github.zip -d /usr/local/adminservice
#修改 配置数据源
vim application-github.properties

#以下是数据源的配置信息
spring.datasource.url = jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8 
spring.datasource.username = root 
spring.datasource.password = 123456

#启动
/usr/local/adminservice/scripts/startup.sh
#停止
/usr/local/adminservice/scripts/shutdown.sh

  102 同样的操作

7、100 解压 apollo-portal 到 /usr/local/apollo-portal

#解压
unzip apollo-portal-1.5.1-github.zip -d /usr/local/apollo-portal
#修改 配置数据源
vim application-github.properties

#以下是数据源的配置信息
spring.datasource.url = jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8 
spring.datasource.username = root 
spring.datasource.password = 123456

#修改 配置meta
vim apollo-env.properties
dev.meta=http://192.168.20.101:8080
pro.meta=http://192.168.20.102:8080

#启动
/usr/local/apollo-portal/scripts/startup.sh
#停止
/usr/local/apollo-portal/scripts/shutdown.sh

  

8、访问 apollo页面   http://192.168.20.100:8070   账号:apollo   密码:admin


 






 

posted on 2019-11-25 21:03  唯伊  阅读(607)  评论(0编辑  收藏  举报

导航