运行命令mysql
SHOW VARIABLES WHERE Variable_name = 'version';
下载包地址: https://github.com/ctripcorp/apollo/releasesgit
wget https://github.com/ctripcorp/apollo/releases/download/v1.5.1/apollo-configservice-1.5.1-github.zip wget https://github.com/ctripcorp/apollo/releases/download/v1.5.1/apollo-adminservice-1.5.1-github.zip wget https://github.com/ctripcorp/apollo/releases/download/v1.5.1/apollo-portal-1.5.1-github.zip
另外一个版本github
wget https://github.com/ctripcorp/apollo/releases/download/v1.4.0/apollo-adminservice-1.4.0-github.zip wget https://github.com/ctripcorp/apollo/releases/download/v1.4.0/apollo-configservice-1.4.0-github.zip wget https://github.com/ctripcorp/apollo/releases/download/v1.4.0/apollo-portal-1.4.0-github.zip
导入数据库验证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 [root@60 apollo2]# mysql -uroot -p123456 < apolloconfigdb.sql mysql: [Warning] Using a password on the command line interface can be insecure. [root@60 apollo2]# mysql -uroot -p123456 < apolloportaldb.sql mysql: [Warning] Using a password on the command line interface can be insecure. 运行该命令查询 mysql> select `Id`, `Key`, `Value`, `Comment` from `ApolloPortalDB`.`ServerConfig` limit 1; +----+--------------------+-------+--------------------------+ | Id | Key | Value | Comment | +----+--------------------+-------+--------------------------+ | 1 | apollo.portal.envs | dev | 可支持的环境列表 | +----+--------------------+-------+--------------------------+ 1 row in set (0.01 sec) mysql> select `Id`, `Key`, `Value`, `Comment` from `ApolloConfigDB`.`ServerConfig` limit 1; +----+--------------------+-------------------------------+------------------------------------------------------+ | Id | Key | Value | Comment | +----+--------------------+-------------------------------+------------------------------------------------------+ | 1 | eureka.service.url | http://localhost:8080/eureka/ | Eureka服务Url,多个service以英文逗号分隔 | +----+--------------------+-------------------------------+------------------------------------------------------+ 1 row in set (0.00 sec)
下载好后解压,并将对应的目录重命名 而后修改各个组件中config中的数据库链接信息,而后逐个启动scripts/ 中的startup.sh脚本数据库
开启关闭脚本bash
!/bin/bash cd /data/apollo2/admin/scripts/ ./startup.sh cd ~ cd /data/apollo2/config/scripts/ ./startup.sh cd ~ cd /data/apollo2/portal/scripts/ ./startup.sh ps -ef | grep apollo #!/bin/bash cd /data/apollo2/admin/scripts/ ./shutdown.sh cd ~ cd /data/apollo2/config/scripts/ ./shutdown.sh cd ~ cd /data/apollo2/portal/scripts/ ./shutdown.sh ps -ef | grep apollo
登陆:http:ip:8070ui
参考网址 https://blog.csdn.net/zjh_746140129/article/details/86179601url