CentOS部署samba服務

服務端

# yum 安裝
[root@localhost ~]# yum install samba samba-client samba-swat -y

# 配置文件
[root@localhost ~]# cat /etc/samba/smb.conf

###########################################
[global]
        workgroup = MYGROUP
        server string = Samba Server Version %v
        hosts allow = 10.0.8.0/24 
        log file = /var/log/samba/log.%m
        max log size = 50
        security = share
        passdb backend = tdbsam
        load printers = yes
        cups options = raw

[share]
comment = share
path = /project/tools
browseable = yes
guest ok = yes
writable = yes


[homes]
        comment = Home Directories
        browseable = no
        writable = yes

[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = no
        writable = no
        printable = yes
###########################################

訪問

[root@localhost ~]# yum install cifs-utils -y

# 挂載
[root@localhost ~]# mkdir -p /samba_share
[root@localhost ~]# mount -t cifs //xxx.xxx.xxx.xx/share /samba_share

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.