CentOS7 install Samba

 

System: CentOS7.6 

. 1, turn off the firewall 

Check Status: firewall-cmd --state 
Close: systemctl stop firewalld 
Power disabled: systemctl disable firewalld 

2, closing the SELinux 
the setenforce 0 

. 3, Client-mounted samba and samba 
yum the install samba sambe- -Y Client 

4, add the user 
useradd the test 
pdbedit the test -a 

5, start the samba service 
add boot: chkconfig smb on 
immediately start samba: start service smb 

6, test 
1, open my computer windows computer 
2, in the address bar IP \\ 

7, custom shared directory 
1, create a shared directory, and modify permissions 
mkdir -p / var / the WWW / HTML 
chmod -R 777 / var / the WWW / HTML 
2, modify the configuration file: 
back up cp / etc / samba /etc/samba/smb.conf.bak /smb.conf
vi the /etc/samba/smb.conf
modify the following: [html] # shared directory name path = / var / www / html # shared directory location browseable = yes # if you can browse writeable = yes # if you can write public = no # whether public

  

 

Guess you like

Origin www.cnblogs.com/zelzzz/p/11517667.html