FoundationDB

来自Gea-Suan Lin's Wiki
Gslin留言 | 贡献2024年12月23日 (一) 17:38的版本 →‎設定
跳转到导航 跳转到搜索

FoundationDBApple维护的NoSQL资料库。

安装

Ubuntu下可以使用官方打包好的deb安装7.1版:

cd /tmp; wget -c https://github.com/apple/foundationdb/releases/download/7.1.65/foundationdb-clients_7.1.65-1_amd64.deb; sudo dpkg -i foundationdb-clients_7.1.65-1_amd64.deb; wget -c https://github.com/apple/foundationdb/releases/download/7.1.65/foundationdb-server_7.1.65-1_amd64.deb; sudo dpkg -i foundationdb-server_7.1.65-1_amd64.deb

也可以安装7.3版,但我无法跑起cluster模式:

cd /tmp; wget -c https://github.com/apple/foundationdb/releases/download/7.3.43/foundationdb-clients_7.3.43-1_amd64.deb; sudo dpkg -i foundationdb-clients_7.3.43-1_amd64.deb; wget -c https://github.com/apple/foundationdb/releases/download/7.3.43/foundationdb-server_7.3.43-1_amd64.deb; sudo dpkg -i foundationdb-server_7.3.43-1_amd64.deb

设定

Cluster

这边假设有三台机器,先把FoundationDB跑在Public Interface上(预设会跑在127.0.0.1上):

sudo python3 /usr/lib/foundationdb/make_public.py
sudo service foundationdb restart

测试

先进入CLI介面:

fdbcli

在CLI的预设是唯独模式,透过指令允许送出写入操作:

writemode on

接著可以进行操作:

get a/b/c
set a/b/c foo
get a/b/c
clear a/b/c
get a/b/c

外部连结