ubuntu18.04安装SeaweedFS

详细部署过程参考https://github.com/chrislusf/seaweedfs

1、首先去官网下载对应版本的软件包seaweedfs下载地址
在这里插入图片描述
2、下载好软件包上传到需要安装的服务器解压,并创建相关目录

tar -zxvf linux_amd64.tar.gz          #解压
mkdir seaweedfs
mkdir -p ./seaweedfs/data ./seaweedfs/volume   #创建目录存储日志文件
mv weed seaweedfs
cd seaweedfs

执行./weed -h查看seaweedfs的各种指令说明
在这里插入图片描述

3、配置master端并执行

nohup ./weed master -ip=172.16.30.24 -port=9333 -mdir=./data -peers=172.16.30.24:9333  > ./data/master.log 2>&1 &       #ip改成自己ip

执行./weed master -h查看master服务指令
在这里插入图片描述

4、配置volume端并执行

nohup ./weed volume -dataCenter dc1 -rack rack1 -dir ./volume -ip 172.16.30.24 -port 9222 -ip.bind 172.16.30.24 -max 20 -mserver 172.16.30.24:9333 -publicUrl 172.16.30.24:9222 > ./volume/volume.log 2>&1 &       #ip改成自己ip

执行./weed volume -h查看master服务指令
在这里插入图片描述
在这里插入图片描述

5、访问 http://172.16.30.24:9333/
在这里插入图片描述

6、安装filer服务

cd seaweedfs       #进入目录
mkdir filer_path    #新建filer_path存储目录
vim filer.toml        #输入如下保存退出,注意跟filer_path同级目录
# A sample TOML config file for SeaweedFS filer store
# Used with "weed filer" or "weed server -filer"
# Put this file to one of the location, with descending priority
#    ./filer.toml
#    $HOME/.seaweedfs/filer.toml
#    /etc/seaweedfs/filer.toml

####################################################
# Customizable filer server options
####################################################
[filer.options]
# with http DELETE, by default the filer would check whether a folder is empty.
# recursive_delete will delete all sub folders and files, similar to "rm -Rf"
recursive_delete = false
# directories under this folder will be automatically creating a separate bucket
buckets_folder = "/buckets"
buckets_fsync = [          # a list of buckets with all write requests fsync=true
        "important_bucket",
        "should_always_fsync",
]

####################################################
# The following are filer store options
####################################################

[leveldb2]
# local on disk, mostly for simple single-machine setup, fairly scalable
# faster than previous leveldb, recommended.
enabled = true
dir = "/root/seaweedfs/filer_path"                                      # directory to store level db files

[mysql]  # or tidb
# CREATE TABLE IF NOT EXISTS filemeta (
#   dirhash     BIGINT         COMMENT 'first 64 bits of MD5 hash value of directory field',
#   name        VARCHAR(1000)  COMMENT 'directory or file name',
#   directory   TEXT           COMMENT 'full path to parent directory',
#   meta        LONGBLOB,
#   PRIMARY KEY (dirhash, name)
# ) DEFAULT CHARSET=utf8;

enabled = false
hostname = "localhost"
port = 3306
username = "root"
password = ""
database = ""              # create or use an existing database
connection_max_idle = 2
connection_max_open = 100
interpolateParams = false

[postgres] # or cockroachdb
# CREATE TABLE IF NOT EXISTS filemeta (
#   dirhash     BIGINT,
#   name        VARCHAR(65535),
#   directory   VARCHAR(65535),
#   meta        bytea,
#   PRIMARY KEY (dirhash, name)
# );
enabled = false
hostname = "localhost"
port = 5432
username = "postgres"
password = ""
database = ""              # create or use an existing database
sslmode = "disable"
connection_max_idle = 100
connection_max_open = 100

[cassandra]
# CREATE TABLE filemeta (
#    directory varchar,
#    name varchar,
#    meta blob,
#    PRIMARY KEY (directory, name)
# ) WITH CLUSTERING ORDER BY (name ASC);
enabled = false
keyspace="seaweedfs"
hosts=[
        "localhost:9042",
]

[redis2]
enabled = false
address  = "localhost:6379"
password = ""
database = 0

[redis_cluster2]
enabled = false
addresses = [
    "localhost:30001",
    "localhost:30002",
    "localhost:30003",
    "localhost:30004",
    "localhost:30005",
    "localhost:30006",
]
password = ""
# allows reads from slave servers or the master, but all writes still go to the master
readOnly = true
# automatically use the closest Redis server for reads
routeByLatency = true

[etcd]
enabled = false
servers = "localhost:2379"
timeout = "3s"

[mongodb]
enabled = false
uri = "mongodb://localhost:27017"
option_pool_size = 0
database = "seaweedfs"

执行

nohup ./weed filer -master="172.16.30.24:9333" -ip=172.16.30.24 &

访问 http://172.16.30.24:8888/ 如图
在这里插入图片描述

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值