环境介绍

系统版本:Centos7.6
JDK:1.8.0(安装好,安装不在此文章介绍哈)
Maven:3.5.2(安装好,安装不在此文章介绍哈)
Mysql:5.7(安装好,安装不在此文章介绍哈)
apollo:1.4.0

部署apollo

  1. 创建apollo目录:
mkdir -pv /data/apollo
  1. apollo目录下,从github上下载源码包:
wget https://codeload.github.com/ctripcorp/apollo/zip/v1.4.0
  1. 解压
unzip v1.4.0
  1. 修改apollo构建脚本,修改配置:
    配置正确自己的mysql地址和账号密码
vi /data/apollo/apollo-1.4.0/scripts/build.sh
# apollo config db info
apollo_config_db_url=jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8
apollo_config_db_username=root
apollo_config_db_password=apollo

# apollo portal db info
apollo_portal_db_url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8
apollo_portal_db_username=root
apollo_portal_db_password=apollo

# 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

运行构建脚本 ./build.sh
  1. 构建成功后,启动apollo-configservice,端口为8080
cd /data/apollo/apollo-1.4.0/apollo-configservice/target

unzip -o apollo-configservice-1.4.0-github.zip

sh /data/apollo/apollo-1.4.0/apollo-configservice/target/scripts/startup.sh
  1. 启动apollo-adminservice,端口为8090
cd /data/apollo/apollo-1.4.0/apollo-adminservice/target

unzip -o apollo-adminservice-1.4.0-github.zip

sh /data/apollo/apollo-1.4.0/apollo-adminservice/target/scripts/startup.sh
  1. 启动apollo-adminservice,端口为8070
cd /data/apollo/apollo-1.4.0/apollo-portal/target

unzip -o apollo-portal-1.4.0-github.zip

sh /data/apollo/apollo-1.4.0/apollo-portal/target/scripts/startup.sh
  1. 三个组件全部启动成功后,浏览器访问:IP:8070
    apollo默认账号密码:apollo/admin

标签: centos7, data, 安装包, db, sh, apollo, portal

相关文章推荐

添加新评论,含*的栏目为必填