官方文档: https://docs.rustfs.cn/installation/linux/quick-start.html
bash
# 下载脚本
wget https://rustfs.cn/install_rustfs.sh
# 执行脚本
bash install_rustfs.sh
-> 1.安装
-> 2.卸载
-> 3.更新
根据提示安装即可
默认安装服务文件位置:
bash
/usr/lib/systemd/system/rustfs.service
默认配置文件位置:
bash
/etc/default/rustfs
查看文件服务状态:
bash
systemctl status rustfs.service
安装后默认启动服务失败, 修改 service 文件里面的执行命令参数:
bash
vim /usr/lib/systemd/system/rustfs.service
bash
ExecStart=/usr/local/bin/rustfs $RUSTFS_VOLUMES # 这一行执行失败, 需要修改为:
ExecStart=/usr/local/bin/rustfs server /home/data/rustfs-save
ProtectHome=true # 这里禁止home目录使用,而我们需要存到home目录下,因此需要修改为:
ProtectHome=false
其中 /home/data/rustfs-save 为最大磁盘所在的任意目录
bash
systemctl daemon-reload
systemctl start rustfs.service
systemctl status rustfs.service