運行命令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