FilSwan开发文档
中文(简体)
  • 开始
    • FilSwan 概览
    • 协议栈
      • 跨链共识层
      • Peer-to-Peer (P2P) 网络
      • 支付频道
      • Service Discovery
      • 数据市场
      • 索引和缓存市场
      • Web3 任务bid市场
      • 存储层
      • 计算层
      • CDN 层
      • 治理
    • 联系我们
      • 社交账号&社区
      • 商业合作
  • Filswan Platform
    • 概览
      • FilSwan 竞价系统
      • Web3自动交易匹配
      • 信誉系统
    • 主要功能
      • 任务管理
        • 创建新任务
        • Navigate Tasks
        • 更新任务
        • 分配任务
      • 我的资料
        • 注册成为存储提供商
      • 寻找存储提供商
        • 存储提供商详情
      • DataCap订单续期服务
  • Multichain.Storage
    • 概览
      • Flink
    • Multichain.Storage 用户指南
      • 公链测试网
      • 设置MetaMask
      • 用Alchemy RPC URL配置MetaMask
    • 开发人员快速入门
      • SDK
        • js mcs SDK
          • 开始
          • 上传文件
          • 支付存储费用
          • 铸造NFT
          • 文件列表
          • 获取文件详情
          • 获取文件在Filecoin上的状态
          • SDK安装视频教程
        • python mcs SDK
          • 开始
          • 上传文件
          • Stream Upload Files
          • 支付存储费用
          • 铸造NFT
          • 文件列表
          • 获取文件详情
      • 更多资源
    • 运行Multichain.Storage节点
    • Multichain Storage 概述
      • Flink
      • Multichain.Storage Mumbai测试网用户指南
      • Multichain.Storage Polygon 主网用户指南
    • 开发人员快速入门
      • SDK
        • js-mcs-sdk
          • 开始
          • 上传文件
          • 支付数据存储费用
          • Mint NFTs资产
          • 列出文件
          • 获取文件详细信息
          • 获取文件的Filecoin状态
      • 其他资源
  • Swan Provider
    • 概览
    • 功能
    • 使用指南
      • 前提条件
      • 安装
      • 配置并运行
      • Swan Provider 视频教程
    • 常见问题
      • 1. Storage Provider 绑定新账号
      • 2. 如何检查您的 Storage Provider 连通性/稳定性
      • 3. 如何暂停接受自动竞价订单
      • 4. aria2_download_dir 和aria2_candidate_dirs 的区别
      • 5. Boostd 正常运行情况下如何配置从 Swan Provider 接收订单
      • 6. 接单过程中总出现拒绝信息
      • 7. 如何检查 aria2 是否在运行?
      • 8. Swan Platform 无响应
      • 9. Storage Provider 状态显示“Offline/离线”
      • 10. 如何检查任务状态
      • 11. 如何配置 Storage Provider Market
      • 12. 如何设置接单条件
  • SWAN CLIENT
    • 概览
    • 基本概念须知
    • 使用指南
      • Filecoin 交易发送引擎
        • 安装
        • 配置
        • 前提条件
        • 生成 CAR 文件
        • Meta-CAR
        • 上传 CAR 文件到 IPFS
        • 创建任务
      • 区块链 RPC 服务
        • 部署 RPC 服务
        • RPC 命令
      • Swan Client 视频教程
  • FS3
    • 概览
    • Setup your FS3
      • 前提
      • 安装 FS3
      • FS3安装视频教程
    • FS3 User Guide
    • FS3 User Guide (Cloud Version)
    • FS3手册中文版
  • 开发资源
    • Swan Token 合约
      • Acquire Testnet USDC and MATIC tokens
    • FilSwan API
    • MCS API
    • MCS 2.0 API
    • Flink API
    • FS3 API
    • API密钥
    • 有关FilSwan的常见问题
Powered by GitBook
On this page
  • Install PostgreSQL Database
  • Install From Source
  • Checkout source code
  • Build the Source Code
  • Run a Standalone FS3 Server
  • Open FS3 Browser
  1. FS3
  2. Setup your FS3

安装 FS3

Previous前提NextFS3安装视频教程

Last updated 2 years ago

Install PostgreSQL Database

PostgreSQL

A PostgreSQL database is required to be pre-built for FS3 server usage. Check on installation and connection instructions.

Install PostgreSQL on Ubuntu

First, execute the following command to create the file repository configuration:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

Second, import the repository signing key:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Third, update the package list:

sudo apt-get update

Finally, install the latest version of PostgreSQL:

sudo apt-get install postgresql

Connect to the PostgreSQL database server via psql

sudo -i -u postgres

Next, It’ll prompt for the password of the current user. You need to provide the password and hit the Enter keyboard.

psql

You’ll access the postgres prompt like this:

postgres=#

To quit the PostgreSQL prompt, you run the following command:

postgres=# \q

This above command will bring you back to the postgres Linux command prompt.

postgres@ubuntu-dev:~$

To return to your regular system user, you execute the exit command like this:

postgres@ubuntu-dev:~$ exit

Create PostgreSQL Database

Create USER and PASSWORD as 'root'

sudo -u postgres psql
postgres=# create database fs3;                                                //create 'fs3' PostgreSQL database                                    
postgres=# create user root with encrypted password 'root';                    //create USER and PASSWORD as 'root'
postgres=# grant all privileges on database fs3 to root;                       //grant privileges
postgres=# \q                                                                  //logout postgres

Install From Source

Checkout source code

git clone https://github.com/filswan/fs3
cd fs3
git checkout <release_branch>

Build the Source Code

Build UI

cd browser
npm install
npm run release

Install Filecoin dependency

sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -

Install go module dependency

cd ..
git submodule update --init --recursive
make ffi

Build up Tables in Postgresql Database

bash db_setup.sh       

Set up FS3 configuration

Set up and customize FS3 configuration by making modifications on .env file, which stores your information as environment variables. An example config is given as .env.example for reference.

vim .env

Please Modify the .env file based on your use cases:

  • SWAN_ADDRESS : The address of filswan platform, default as https://api.filswan.com.

  • FS3_VOLUME_ADDRESS : The address of FS3 VOLUME, default as ~/minio-data. If changed, the FS3 server start command has to be changed accordingly.

  • FS3_WALLET_ADDRESS : A wallet address is a must for sending deals to miner.

  • CAR_FILE_SIZE : A fixed car file size in bytes need to be predefined before generating car files for trunk via variable CarFileSize, such as 8589934592 for 8Gb as default.

  • IPFS_API_ADDRESS : An available ipfs address with port need to be set up. For example, https://MyIpfsUrl:Port.

  • IPFS_GATEWAY : An available ipfs address with port need to be set up for file downloading. For example, https://MyIpfsGatewayUrl:Port.

Build up FS3 server

make

Run a Standalone FS3 Server

Run the FS3 Server

./minio server ~/fs3-data

Access Key and Secret Key

The FS3 deployment starts using default root credentials minioadmin:minioadmin but you can change it with your own credentials.

Change your Access Key and Secret Key

export MINIO_ROOT_USER= MY_FS3_ACCESS_KEY
export MINIO_ROOT_PASSWORD=MY_FS3_SECRET_KEY

If you change the credential, build up FS3 server again to make it take effect. Then re-run the fs3 server.

make
./minio server ~/fs3-data

Open FS3 Browser

SWAN_TOKEN : A valid swan token is required for posting task on swan platform. It can be received after creating an account on . Check for more details on how to get authorization token.

You can test the deployment using the FS3 Browser, an embedded web-based object browser built into FS3 Server. Point a web browser running on the host machine to and log in with the root credentials. You can use the Browser to create buckets, upload objects, send deals, retrieve data and browse the contents of the FS3 server.

You can also connect using any S3-compatible tool, such as the commandline tool.

PostgreSQL Tutorial
Filswan
Filswan APIs
http://127.0.0.1:9000
FS3-mc