需求:项目部署在Linux服务器上,需要不定时的读取windows文件。
系统:Centos
方案:把windows共享文件夹挂载到Linux指定目录下
- 安装软件
[anson@localhost]# sudo yum install -y cifs-utils
- 创建Centos挂载文件夹
[anson@localhost]# sudo mkdir /opt/windows
- 挂载并输入密码
// 填入域,用户名,密码,windows的文件路径,挂载到linux的路径
[anson@localhost]# sudo mount -t cifs -o domain=aaa,username=user1,password12345 //192.168.1.1/file /opt/windows
网友评论