## Server:192.168.1.211
```
yum -y install samba
vim /etc/samba/smb.conf
[linux]
comment = welcome to use samba
path = /home/linux
public = no
writable = yes
[windows]
comment = welcome to use samba
path = /windows
public = no
writabe =yes
groupadd windows
groupadd linux
useradd win_smb -g windows
useradd lin_smb -g linux
smbpasswd win_smb
smbpasswd lin_smb
pdbedit -L
mkdir /home/linux
mkdir /windows
chown win_smb:windows /windows
chown lin_smb:linux /home/linux
firewall-cmd --permanent --add-service=samba
firewall-cmd --reload
chcon -R -t samba_share_t /home/linux/ /windows/
getsebool -a | grep samba
setsebool -P samba_enable_home_dirs on
systemctl restart smb nmb
```
## Desktop
### Linux:192.168.1.210
```
yum -y install samba-client cifs-utils
smbclient -L //192.168.1.211 -U lin_smb%samba1
smbclient //192.168.1.211 -U lin_smb%samba1
vim /etc/fstab
//192.168.1.211/linux /mnt/cifs cifs credentials=/root/usr,multiuser,sec=ntlmssp 0 0
mkdir /mnt/cifs
vim /root/usr
username=lin_smb
password=samba1
mount -a
useradd lin_smb
su - samba1
cifscreds add 192.168.1.211 -u lin_smb
cifscreds clearall
```
### Windows:
```
Win+R 输入
\\192.168.1.211
用户名 win_smb
密码 samba2
```
- Linux Server
- 实用命令
- services
- Samba
- /etc/samba/smb.conf
- NFS
- Http
- httpd.conf
- lamp
- FTP
- /etc/vsftpd/vsftpd.conf
- ftp实例
- iSCSI
- SElinux
- DNS
- master
- slave
- subdomain
- 相关配置文件
- /etc/hosts
- /etc/resolv.conf
- /etc/named.conf
- /var/named/named.ca
- /var/named/named.localhost&named.loopback
- DHCP
- /etc/dhcp/dhcpd.conf
- mysql
- Redis
- Git
- HAProxy
- haproxy
- openssl
- nodejs