欢迎来到 黑吧安全网 聚焦网络安全前沿资讯,精华内容,交流技术心得!

在用CoLinux虚拟Linux时,使用 autofs 软件自动挂载文件系统的一些配置

来源:本站整理 作者:佚名 时间:2017-04-09 TAG: 我要投稿

本文以发行版为 CentOS6.5 为例 ----->>
        1) 设置挂载源头:
            以挂载 Windows 驱动器文件系统,打开某个 CoLinux 启动设置文件(Centos6.conf)
               添加如下内容:
               
                cofs0="c:\"
                cofs1="d:\"
                cofs2="e:\"
        2)在 CoLinux 虚拟的 CentOS 下安装 autofs 软件包
                yum -y install autofs

        3) 用 vi 编辑 autofs 软件的两个配置文件
           
--------------------------------------------------------------------------
            auto.master ----->
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/misc   /etc/auto.misc  --timeout=60
#
# NOTE: mounts done from a hosts map will be mounted with the
#       "nosuid" and "nodev" options unless the "suid" and "dev"
#       options are explicitly given.
#
/net    -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
---------------------------------------------------------------------------

---------------------------------------------------------------------------
        auto.misc ----->


# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

cd              -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom

# the following entries are samples to pique your imagination
#linux          -ro,soft,intr           ftp.example.org:/pub/linux
#boot           -fstype=ext2            :/dev/hda1
#floppy         -fstype=auto            :/dev/fd0
#floppy         -fstype=ext2            :/dev/fd0
#e2floppy       -fstype=ext2            :/dev/fd0
#jaz            -fstype=ext2            :/dev/sdc1
#removable      -fstype=ext2            :/dev/hdd
win_c           -fstype=cofs            :cofs0
win_d           -fstype=cofs            :cofs1
win_e           -fstype=cofs            :cofs2


-------------------------------------------------------------------------

    4) 最后启动 autofs 服务即可
        /etc/init.d/autofs start

【声明】:黑吧安全网(http://www.myhack58.com)登载此文出于传递更多信息之目的,并不代表本站赞同其观点和对其真实性负责,仅适于网络安全技术爱好者学习研究使用,学习中请遵循国家相关法律法规。如有问题请联系我们,联系邮箱admin@myhack58.com,我们会在最短的时间内进行处理。
  • 最新更新
    • 相关阅读
      • 本类热门
        • 最近下载