2015/03/13

CentOS 7 Samba 4 Clamav

# install Centos 7
# update os

yum -y update
yum install samba samba-common

mv /etc/samba/smb.conf /etc/samba/smb.conf.org
cat /etc/samba/smb.conf.org |grep -v '#' | grep -v ';'|grep -v '^$' > /etc/samba/smb.conf

vi /etc/samba/smb.conf

[global]
        workgroup = MYGROUP
        server string = Samba Server Version %v
        log file = /var/log/samba/log.%m
        max log size = 50
        security = user
        map to guest = Bad User
        load printers = no

[ftp_upload]
        comment    = FTP upload
        path       = /ftp
        browseable = yes
        writable   = yes
        public     = yes
        readonly   = no


systemctl enable smb.service
systemctl enable nmb.service
systemctl restart smb.service
systemctl restart nmb.service
firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload

--

# install clamav

vi /etc/yum.repos.d/dag.repo


[dag]

name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag/
gpgcheck=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
enabled=1



yum install clamd
# Update virus database
freshclam
systemctl enable clamd.service

No comments: