centos7 samba安装教程

samba的用途:有的时候,我们需要在centos7 的文件能共享给其他机器。

 

rpm -qa|grep samba
 yum install -y samba
 setenforce 0
 sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
 systemctl stop firewalld
 systemctl disable firewalld
 cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

 

 #vi /etc/samba/smb.conf

  新增如下内容
  [durant]
       comment = sambadata
       path= /data
       writable = yes
       public = yes
       directory mask = 0777
 
 useradd -d /data -s /sbin/nologin durant
 pdbedit -a -u durant
 chown -Rf durant:durant /data
 systemctl start smb
 systemctl enable smb
 systemctl restart smb
 systemctl status smb
 

#yum -y install iptables-services
#systemctl enable iptables
#systemctl start iptables


# iptables -A INPUT -p tcp -m multiport --dports 139,445 -j ACCEPT
# iptables -A INPUT -p udp -m multiport --dports 137,138 -j ACCEPT


#service iptables save
# systemctl start iptables.service

posted @ 2020-05-23 13:45  tochenwei  阅读(684)  评论(0编辑  收藏  举报