从二进制文件安装
下载并解压 EloqDoc 压缩包
EloqDoc 兼容 Ubuntu 20.04, 22.04。请从这里下载适合您操作系统的压缩包。
成功下载对应的二进制文件后,在目录中解压它。
- Ubuntu20.04
- Ubuntu22.04
- Ubuntu24.04
mkdir eloqdoc-cloud && tar -zxf eloqdoc-v0.2.1-ubuntu20-amd64.tar.gz -C eloqdoc-cloud
mkdir eloqdoc-cloud && tar -zxf eloqdoc-v0.2.1-ubuntu22-amd64.tar.gz -C eloqdoc-cloud
mkdir eloqdoc-cloud && tar -zxf eloqdoc-v0.2.1-ubuntu24-amd64.tar.gz -C eloqdoc-cloud
After tarball eloqdoc, you should see three folders: bin, lib, and etc. The bin folder contains executable files. The lib folder contains dependency shared libs. The etc folder contains a configuration file which you should modify based on your environment.
Start S3 emulator
eloqdoc-cloud is cloud-native. However, developer can use some S3 emulator to run it for testing.
Open a new terminal. Download and launch minio.
mkdir minio-service && cd minio-service
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
./minio server ./data
After launch minio successfully, you shoud see outputs.
MinIO Object Storage Server
Copyright: 2015-2025 MinIO, Inc.
License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html
Version: RELEASE.2025-05-24T17-08-30Z (go1.24.3 linux/amd64)
API: http://192.168.12.52:9000 http://172.17.0.1:9000 http://127.0.0.1:9000
RootUser: minioadmin
RootPass: minioadmin
WebUI: http://192.168.12.52:41127 http://172.17.0.1:41127 http://127.0.0.1:41127
RootUser: minioadmin
RootPass: minioadmin
CLI: https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart
$ mc alias set 'myminio' 'http://192.168.12.52:9000' 'minioadmin' 'minioadmin'
Docs: https://docs.min.io
WARN: Detected default credentials 'minioadmin:minioadmin', we recommend that you change these values with 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment variables
准备 EloqDoc 配置文件
EloqDoc 使用配置文件来自定义设置。在安装目录下的 etc/mongod.conf
中提供了一个示例。以下是如何配置 EloqDoc 在本地机器上运行的示例。
systemLog:
verbosity: 0
destination: file
path: "/home/mono/eloqdoc-cloud/logs/mongod.log"
component:
ftdc:
verbosity: 0
net:
serviceExecutor: "adaptive"
storage:
dbPath: "/home/mono/eloqdoc-cloud/db"
engine: "eloq"
eloq:
adaptiveThreadNum: 1
reservedThreadNum: 4
txService:
localIP: "127.0.0.1:8080"
ccProtocol: OccRead
checkpointerIntervalSec: 10
nodeMemoryLimitMB: 16384
collectActiveTxTsIntervalSec: 2
checkpointerDelaySec: 5
storage:
awsAccessKeyId: "minioadmin"
awsSecretKey: "minioadmin"
rocksdbCloudBucketName: "eloqdoc-storage"
rocksdbCloudBucketPrefix: "rocksdb-cloud-"
rocksdbCloudRegion: ""
rocksdbCloudEndpointUrl: "http://127.0.0.1:9000"
setParameter:
diagnosticDataCollectionEnabled: false
disableLogicalSessionCacheRefresh: true
ttlMonitorEnabled: false
Modify systemLog.path
and storage.dbPath
based on your environment. And
create the target folders if not exist.
mkdir eloqdoc-cloud/db
mkdir eloqdoc-cloud/logs
Start EloqDoc server
cd eloqdoc-cloud && \
env LD_PRELOAD=./lib/libmimalloc.so.2:./lib/libbrpc.so \
./bin/mongod --config ./etc/mongod.conf
连接到 EloqDoc 服务器
cd eloqdoc-cloud && \
./bin/mongo --eval "db.t1.save({k: 1}); db.t1.find();"
It should outputs
MongoDB shell version v4.0.3
connecting to: mongodb://127.0.0.1:27017
Implicit session: session { "id" : UUID("288393c1-aff6-4a84-ad46-dee6691b361d") }
MongoDB server version: 4.0.3
{ "_id" : ObjectId("68493ec41cc981ea926ec094"), "k" : 1 }