1.安装盘制作
使用UltraISO把iso镜像文件刻录到u盘
2.使用安装盘启动
3.分区
使用自动就好了
4.安装samba
yum install -y samba samba-client samba-common
5.设置SELinux
# sed -i "s/=enforcing/=disabled/g" `grep =enforcing -rl /etc/selinux/config`
# vi /etc/selinux/config
SELINUX=disabled
6.关闭firewall
service firewalld stop
7.配置samba
vi /etc/samba/smb.conf
#==================Global Settings===================
[global]
workgroup = WORKGROUP
server string = Samba Server Version %v
netbios name = smbserver
interfaces = lo enp2s0
hosts allow=192.168.1.1/255.255.0.0
max connections = 32
deadtime = 0
time server = yes
log file = /var/log/samba/log.%m
max log size = 0
security = user
passdb backend = smbpasswd
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
#==================Share Definitions ====================
[user1]
comment = user1
path = /home/%u
browseable = yes
writable = yes
available = yes
admin users = user1
valid users = user1
write list = user1
public = no
[root]
comment = root
path = /smb
browseable = yes
writable = yes
available = yes
admin users = root
valid users = root
write list = root
public = no
8.添加系统用户
# useradd guest
#passwd guest
9.添加samba用户
# smbpasswd -a guest
# smbpasswd -a root
10.重启samba
# service smb restart
11.添加权限
# setfacl -m u:guest:rwx /var/local