linux安装apollo详细

1、安装Java8环境

2、下载安装包

  • 版本:v1.6.1
  • github地址:https://github.com/ctripcorp/apollo/releases
  • 下载包文件
    在这里插入图片描述
  • 提供快速下载链接如下:
wget https://github.com/ctripcorp/apollo/releases/download/v1.6.1/apollo-adminservice-1.6.1-github.zip

wget https://github.com/ctripcorp/apollo/releases/download/v1.6.1/apollo-configservice-1.6.1-github.zip

wget https://github.com/ctripcorp/apollo/releases/download/v1.6.1/apollo-portal-1.6.1-github.zip

3、下载SQL文件,创建数据库

下载地址:https://github.com/nobodyiam/apollo-build-scripts/tree/master/sql

wget https://github.com/nobodyiam/apollo-build-scripts/blob/master/sql/apolloconfigdb.sql

wget https://github.com/nobodyiam/apollo-build-scripts/blob/master/sql/apolloportaldb.sql

在Mysql数据库中导入下载的SQL文件
在这里插入图片描述

4、解压下载的三个安装包

在这里插入图片描述

5、更改服务的配置文件

1、分别配置三个服务的数据库地址: /config/application-github.properties
在这里插入图片描述

2、分别修改三个服务下的启动端口号和日志配置文件:/scripts/startup.sh
在这里插入图片描述
3、修改apollo-portal服务下的meta配置:apollo-portal/config/sapollo-env.properties
(这里的地址是apollo-configservice的服务地址,分别是不同环境下的服务地址,这里我只配置了(开发-dev)环境下的地址。)
在这里插入图片描述

6、修改数据库中的meta地址

在这里插入图片描述

7、新建启动和关闭三个服务的脚本

start.sh 注意服务的启动顺序 configservice - adminservice - portal

#!/bin/bash
/home/jjc/apollo/apollo-configservice/scripts/startup.sh
/home/jjc/apollo/apollo-adminservice/scripts/startup.sh
/home/jjc/apollo/apollo-portal/scripts/startup.sh

在这里插入图片描述

shutdown.sh

#!/bin/bash
/home/jjc/apollo/apollo-configservice/scripts/shutdown.sh
/home/jjc/apollo/apollo-adminservice/scripts/shutdown.sh
/home/jjc/apollo/apollo-portal/scripts/shutdown.sh

文件结构如下:
在这里插入图片描述

8、启动服务访问apollo

运行start.sh,启动三个服务后,输入如下地址:http://117.131.***.***:8001/
(这是portal的服务地址,注意自己修改的服务端口号)
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值