题外话
- centos上的systemctl命令在最新的Ubuntu上用update-rc.d代替
共享文件夹
建议使用nfs,以下为安装步骤:
- 安装rpc服务和nfs服务
- centos
yum install rpcbind systemctl satrt rpcbind systemctl enable rpcbind yum install nfs-tools systemctl start nfs systemctl enable nfs
- centos
编辑配置文件
在客户机挂载
mount 192.168.10.110:/nfs_data /data
持久化配置
编辑配置文件/etc/fstab
,添加192.168.10.110:/nfs_data /data nfs defaults,_netdev 0 0
文件夹同步
参考:syncthing
简单写下操作步骤:
- 安装
apt update apt install syncthing cp /usr/lib/systemd/user/syncthing.service /etc/systemd/system systemctl daemon-reload systemctl start syncthing@<your_username> systemctl enable syncthing@<your_username>
- 配置文件在
~/.config/syncthing/config.xml