1.下载 git clone git@gitcode.net:mirrors/ctripcorp/apollo.git
- 数据库配置 a.scripts/sql/apolloconfigdb.sql b.scripts/sql/apolloportaldb.sql 3.修改build.sh
# apollo config db info
apollo_config_db_url='jdbc:mysql://127.0.0.1:3306/ApolloConfigDB?characterEncoding=utf8'
apollo_config_db_username='ace'
apollo_config_db_password='123456'
# apollo portal db info
apollo_portal_db_url='jdbc:mysql://127.0.0.1:3306/ApolloPortalDB?characterEncoding=utf8'
apollo_portal_db_username='ace'
apollo_portal_db_password='123456'
# meta server url, different environments should have different meta server addresses
dev_meta=http://localhost:8080
fat_meta=http://localhost:8080
uat_meta=http://localhost:8080
pro_meta=http://localhost:8080
4.修改项目配置,修改日志路径
apollo-adminservice/src/main/resources/application.yml
apollo-configservice/src/main/resources/application.yml
apollo-portal/src/main/resources/application.yml
logging:
file:
name: /Users/zuoerdong/var/logs/apollo-adminservice.log
5.编译scripts/build.sh 6.运行,注意先检查8080,8090,8070端口 java -jar apollo-configservice/target/apollo-configservice-2.2.0-SNAPSHOT.jar java -jar apollo-adminservice/target/apollo-adminservice-2.2.0-SNAPSHOT java -jar apollo-portal/target/apollo-portal-2.2.0-SNAPSHOT.jar 7.后台管理界面:http://localhost:8070/,默认apollo/admin