分布式配置中心 Apollo | 安装(CentOS)

一、安装流程

本篇将会讲解如何直接安装,我们在安装前需要准备好 2G 以上内存的服务器或者虚拟机。

1、安装 JDK 环境

Apollo 要求的 JDK 版本的 1.7 以上,这里我们最好安装 1.8 ,Linux 上安装步骤如下:
Linux 安装 JDK

2、安装 MySQL

MySQL 版本需要 5.7 以上,安装方法如下
Linux 安装 MYSQL

3、下载安装包

下载安装包,然后把 安装包传到 Linux 服务器,进行解压,下载地址如下

https://github.com/nobodyiam/apollo-build-scripts
unzip apollo-build-scripts-master.zip
4、导入 SQL 数据

导入安装包内 sql文件夹里面的两个 sql 数据库 apolloconfigdb.sql (存放配置文件信息)和 apolloportaldb.sql (存放门户网站信息),下载地址如下:

https://github.com/nobodyiam/apollo-build-scripts/tree/master/sql
5、修改安装包的配置文件

找到解压后的安装包,修改 demo.sh ,进行修改,主要修改数据库地址和 meta server url 的 IP 地址,IP 地址为你所安装的服务器地址。

# apollo config db info
apollo_config_db_url=jdbc:mysql://**.56.219.53:3306/ApolloConfigDB?characterEncoding=utf8
apollo_config_db_username=root
apollo_config_db_password=**

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

# meta server url
config_server_url=http://**.13.1.171:8080
admin_server_url=http://**.13.1.171:8090
eureka_service_url=$config_server_url/eureka/
portal_url=http://**.13.1.171:8070

6、启动 Apollo
./demo.sh start 
7、验证启动结果

在这里插入图片描述
访问 http://106.13.1.171:8070/signin
用户名:apollo 密码:admin
在这里插入图片描述
在这里插入图片描述

相关资料

github:https://github.com/ctripcorp/apollo

ABOUT

我的 Github:Github
CSDN: CSDN
个人网站: sirius blog
E-mail: [email protected]

推荐阅读
史上最全,最完美的 JAVA 技术体系思维导图总结,没有之一!
全站导航 | 我为什么要写这些博客?

发布了81 篇原创文章 · 获赞 373 · 访问量 27万+

猜你喜欢

转载自blog.csdn.net/Sirius_hly/article/details/104600635
今日推荐