centos 7 环境搭建 1、安装软件包 $sudo yum install samba samba-client 2.新建文件夹 $mkdir /home/youliang/share 3 .samba配置文件 $sudo vim /etc/samba/smb.conf 把这个打开就行了,配置文件里原来就有。这样做是让用户自己登录到自己目录去,完全可写可读可浏览。 [share] path = /home/youliang/share browseable = yes guest ok = yes writable = yes printable = no public = yes 4.增加Samba用户 $smbpasswd -a youliang 5.关防火墙(否则,这个服务是不允许连接的,不象SSH默认是允许连接,SAMBA因为不安全的原因,端口是被封掉 $sudo systemctl stop firewalld.service $sudo setenforce 0 $sudo systemctl disable firewalld.service 禁止开机启动 关闭SELinux vim /etc/selinux/config SELINUX= disabled #enforcing 6、启动服务 $ sudo systemctl restart smb.service $ sudo systemctl restart nmb.service (责任编辑:IT) |