DataMesh FactVerse 服务单机部署

你在这里:
< 所有主题

1. 安装基础服务

1.1 安装 docker

更新 apt 包索引:

sudo apt-get update

安装软件包以允许 apt 通过 https 使用存储库:

sudo apt-get -y install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common

添加 docker 的官方 GPG 密钥:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –

添加 docker 的官方 GPG 密钥:

sudo add-apt-repository \ “deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable”

更新 apt 包索引:

sudo apt-get update

安装最新版本的 docker:

sudo apt-get -y install docker-ce

1.2 安装 docker-compose

下载 docker compose

sudo curl -L “https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)” -o /usr/local/bin/docker-compose

将可执行权限应用于二进制文件

sudo chmod +x /usr/local/bin/docker-compose

2. 部署 FactVerse 服务

执行启动脚本(启动脚本见附件)

bash start.sh

3. 测试试用

登录 Factverse(浏览器输入服务器 IP 即可)

附件

启动脚本:

#!/bin/bash
 
sudo tar zxvf deploy.tar.gz
 
PUBLIC_IP=`curl -s ifconfig.me`
MYSQL_PASSWD=`cat deploy/docker-compose.yaml | grep MYSQL_ROOT_PASSWORD | awk -F ‘=’ ‘{print $2}’`
 
sudo ls -1 deploy/images/*.tar | xargs –no-run-if-empty -L 1 sudo docker load -i
 
sudo find deploy/services -name *.yml | xargs sudo sed -i “s/appserverip/$PUBLIC_IP/g”
sudo find deploy/services -name *.conf | xargs sudo sed -i “s/appserverip/$PUBLIC_IP/g”
 
sudo docker-compose -f deploy/docker-compose.yaml up -d
 
sudo apt -y install mysql-client
mysql -h127.0.0.1 -uroot -p$MYSQL_PASSWD -e “update cloud_resource.cloud_storage_config set domain=’$PUBLIC_IP:9000′ where protocol=’http’;”

目录