Advertisement

Linux开机自动mount CIFS卷名

阅读量:

本文阐述了在Linux系统中实现开机自动挂载Windows cifs共享的方法,确保服务器重启后能够自动加载相关数据,从而保障应用程序对数据的正常访问。

  1. 在Linux系统中完成cifs驱动的安装
复制代码
    sudo apt-get install cifs-utils

    
    
         
  1. 生成credentials文件以存储用户的密码信息。
复制代码
    dxi@mylinux:~$ cat .smbcredentials

    username=dxi
    password=mypassword
    
    
         
         
         

将文件权限设置为600。

  1. 在 /etc/fstab 配置文件中添加cifs挂载条目
复制代码
    dxi@mylinux:~$ cat /etc/fstab

    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robus

全部评论 (0)

还没有任何评论哟~