yum install samba
setenforce 0
systemctl stop firewalld
systemctl start smb
vim /etc/samba/smb.conf
[global]
workgroup = SAMBA
security = user
map to guest = Bad User
log file = /var/log/samba/log.%m
[public]
comment = Public Stuff
path = /opt/share
public = yes
public=yes
;read only = no
writable = yes
guest ok = yes
;security = share
;directory mask = 0777
;create mask = 0777
;force create mask=0777
hosts allow = 115.182.224.104 172.16.207.188
防火墙映射对外端口:445 44155
挂载服务器:
vim /etc/fstab
\\115.182.224.104/public /opt/share cifs guest.port=44155 0 0
reboot