本文介绍如何Linux如何开机自动mount Windows cifs共享,可以在server重启时候自动mount数据,不影响应用程序的数据访问
- linux安装cifs驱动
sudo apt-get install cifs-utils
- 创建credentials文件保存用户密码。
将文件改为 600权限.dxi@mylinux:~$ cat .smbcredentials username=dxi password=mypassword
- 在 /etc/fstab 中增加cifs mount
dxi@mylinux:~$ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device;