欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

配置中心 Apollo 1.4 安装

程序员文章站 2022-07-15 09:49:13
...
  • 基础
Apollo服务端:1.8+
Apollo客户端:1.7+

下载资源包
#https://github.com/ctripcorp/apollo/releases
apollo-adminservice-1.4.0-github.zip
apollo-configservice-1.4.0-github.zip
apollo-portal-1.4.0-github.zip

 

  • 数据库配置
create database apolloportaldb;
GRANT ALL PRIVILEGES ON apolloportaldb.* TO 'apollo'@'%' identified by 'apollo';
create database apolloconfigdb;
GRANT ALL PRIVILEGES ON apolloconfigdb.* TO 'apollo'@'%';
flush privileges;

#下载资源
cd /tmp
git clone https://github.com/ctripcorp/apollo.git

#导入apolloportaldb
mysql> use apolloportaldb;
Database changed
mysql> source /tmp/apollo/scripts/db/migration/portaldb/V1.0.0__initialization.sql;
#导入apolloconfigdb
mysql> use apolloconfigdb;
Database changed
mysql> source /tmp/apollo/scripts/db/migration/configdb/V1.0.0__initialization.sql;
  • portal
mkdir /usr/local/apollo-portal-1.4.0
unzip apollo-portal-1.4.0-github.zip -d /usr/local/apollo-portal-1.4.0/
#指定Eureka的地址 多个环境可以使用多个
vim /usr/local/apollo-portal-1.4.0/config/apollo-env.properties
dev.meta=http://192.168.10.252:8080
#配置数据库
vim /usr/local/apollo-portal-1.4.0/config/application-github.properties
# DataSource
spring.datasource.url = jdbc:mysql://192.168.10.73:3306/ApolloPortalDB?characterEncoding=utf8
spring.datasource.username = apollo
spring.datasource.password = apollo

#appId信息默认不用修改
vim /usr/local/apollo-portal-1.4.0/config/app.properties
appId=100003173

#启动
/usr/local/apollo-portal-1.4.0/scripts/startup.sh
Fri Oct 25 17:55:30 CST 2019 ==== Starting ==== 
Started [19550]
Waiting for server startup......
Fri Oct 25 17:56:05 CST 2019 Server started in 30 seconds!
#查看进程
ps -ef | grep apollo

#登录  默认用户名 apollo,密码 admin
http://192.168.10.73:8070/
  • adminservice configservice
mkdir /usr/local/apollo-adminservice-1.4.0
mkdir /usr/local/apollo-configservice-1.4.0
unzip apollo-adminservice-1.4.0-github.zip -d /usr/local/apollo-adminservice-1.4.0/
unzip apollo-configservice-1.4.0-github.zip -d /usr/local/apollo-configservice-1.4.0/

#adminservice 配置
vim /usr/local/apollo-adminservice-1.4.0/config/application-github.properties
# DataSource
spring.datasource.url = jdbc:mysql://192.168.10.73:3306/ApolloConfigDB?characterEncoding=utf8
spring.datasource.username = apollo
spring.datasource.password = apollo

#configservice 配置
/usr/local/apollo-configservice-1.4.0/config/application-github.properties
# DataSource
spring.datasource.url = jdbc:mysql://192.168.10.73:3306/ApolloConfigDB?characterEncoding=utf8
spring.datasource.username = apollo
spring.datasource.password = apollo


/usr/local/apollo-configservice-1.4.0/scripts/startup.sh
#http://192.168.10.252:8080/

/usr/local/apollo-adminservice-1.4.0//scripts/startup.sh
#http://192.168.10.252:8090/
#apollo-adminservice

 

 配置中心 Apollo 1.4 安装

配置中心 Apollo 1.4 安装 

相关标签: 配置中心