ITPub博客

首页 > 应用开发 > Java > apollo部署文档

apollo部署文档

原创 Java 作者:czxin788 时间:2024-02-27 14:27:52 0 删除 编辑

1、整体规划

服务器
软件包
192.168.1.2
java、apollo

2、下载安装包

ITpub这不让写连接,就去github上找apollo包下载就行。
wget 
wget 
wget 
wget 
wget

3、安装java

rpm -ivh jdk-8u371-linux-x64.rpm

4、安装mysql 8.0

安装过程略

5、创建数据库ApolloPortalDB

create database ApolloPortalDB
use ApolloPortalDB
source /your_local_path/sql/apolloportaldb.sql

6、创建ApolloConfigDB

create database ApolloConfigDB
use ApolloConfigDB
source /your_local_path/sql/apolloconfigdb.sql

7、配置数据库连接信息

cat /opt/apollo/apollo-adminservice/config/application-github.properties
spring.datasource.url = jdbc:mysql://127.0.0.1:3306/apolloconfigdb?characterEncoding=utf8
spring.datasource.username = apollo
spring.datasource.password = 123456
cat /opt/apollo/apollo-configservice/config/application-github.properties
spring.datasource.url = jdbc:mysql://127.0.0.1:3306/apolloconfigdb?characterEncoding=utf8
spring.datasource.username = apollo
spring.datasource.password = 123456
cat /opt/apollo/apollo-portal/config/application-github.properties
spring.datasource.url = jdbc:mysql://127.0.0.1:3306/apolloportaldb?characterEncoding=utf8
spring.datasource.username = apollo
spring.datasource.password = 123456

8、配置环境

vi /opt/apollo/apollo-portal/config/apollo-env.properties
#local.meta=
#lpt.meta=${lpt_meta}
#pro.meta=
#dev.meta=http://192.168.1.2:8080
#fat.meta=http://192.168.1.2:8080
#uat.meta=http://192.168.1.2:8080
pro.meta=http://192.168.1.2:8080
:wq
因为默认是dev环境,现在要修改为pro环境,所以需要登录apollo mysql,修改如下参数,将dev改成pro:
mysql> use apolloportaldb ;
mysql> update ServerConfig set Value='pro' where id=1;

9、启动服务

/opt/apollo/apollo-adminservice/scripts/startup.sh
/opt/apollo/apollo-configservice/scripts/startup.sh
/opt/apollo/apollo-portal/scripts/startup.sh

10、停止服务

/opt/apollo/apollo-adminservice/scripts/shutdown.sh
/opt/apollo/apollo-configservice/scripts/shutdown.sh
/opt/apollo/apollo-portal/scripts/shutdown.sh

11、访问

用户名:apollo
密码:admin


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28916011/viewspace-3007446/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-06-03

  • 博文量
    233
  • 访问量
    858415