1.安装
apt-get install samba
yum instatll samba
有询问yes的地方yes就行。
无法安装samba
执行sudo apt-get update
2.将配置文件备份, sudo cp /etc/samba/smb.config /etc/samba/smb.config.bak
3.修改配置文件
[share]
path = /home/
availabel = yes
public = yes
browseable = yes
writable = yes
4. /etc/init.d/samba restart
systemctl restart smb
5. smbpasswd -a root //设置初始登录密码
6. 查看防火墙
getenforce//查看当前状态
关闭SELinux:
命令:setenforce 0//修改状态
getenforce//查看当前状态
Permissive
永久关闭
开机不自启
vim /etc/selinux/config
SELINUX=disabled
关闭防火墙:
命令:systemctl stop firewalld
开机不自启:systemctl disable firewalld
7.开机启动 chkconfig smb on