首先docker方式
docker pull cloudnas/clouddrive2-unstable
docker run -d \
--name clouddrive \
--restart unless-stopped \
--env CLOUDDRIVE_HOME=/Config \
-v /mnt/Cloud:/CloudNAS:shared \
-v /root/clouddrive:/Config \
--network host \
--pid host \
--privileged \
--device /dev/fuse:/dev/fuse \
cloudnas/clouddrive2-unstable
/mnt/Cloud 为挂载点,可自己按喜好修改
/root/clouddrive 为配置文件路径 ,也可按自己喜好修改
docker启动成功后,通过IP:19798 访问配置页面
默认权限755,如果后去需要通过smb上传请改为777
挂载成功的效果如图所示
接着进入到 /etc/samba/ 下修改 smb.conf 文件
根据自己的挂载点自行修改
修改后记得重启smb服务!!!
挂载成功后的效果如下
第二种办法,本地安装,教程来自开发群 C.Y.Y 整理,本人只是搬运
https://t.me/cloud_nas/309 下载对应安装包
以安装目录为/opt/clouddrive/为例
mkdir -p /opt/clouddrive/
将clouddrive-2-linux-x86_64-0.3.7.tgz上传到/opt目录并解压
tar -cf clouddrive-2-linux-x86_64-0.3.7.tgz
ls查看一下确保目录结构为/opt/clouddrive/clouddrive
nano /etc/systemd/system/clouddrive.service
插入如下内容
[Unit]
Description=clouddrive2
After=network.target
[Service]
Type=exec
Restart=on-failure
ExecStart=/opt/clouddrive/clouddrive
[Install]
WantedBy=multi-user.target
保存
systemctl daemon-reload
systemctl start clouddrive.service
systemctl enable clouddrive.service
systemctl status clouddrive.service
卸载
systemctl disable clouddrive.service
systemctl stop clouddrive.service
rm -rf /etc/systemd/system/clouddrive.service
rm -rf /opt/clouddrive