centos 7 samba相关命令

1.安装相关包

yum install samba samba-client samba-common

2.启动smb的命令

systemctl enable smb.service

systemctl enable nmb.service

systemctl restart smb.service

systemctl restart nmb.service

#  systemctl restart smb

# systemctl reload smb

# systemctl status smb

3.跳过防火墙的两种方法

1)关闭防火墙

systemctl stop firewalld.service

setenforce 0

2)添加规则

firewall-cmd –permanent –zone=public –add-service=samba

firewall-cmd –reload

将/cjli目录的策略,改变成samba_etc_t

sudo chcon –reference=/etc/samba/smb.conf -R /cjli

reference:http://www.cnblogs.com/flex_fly/p/3670763.html