我喜欢在windows上开发,然后在虚拟机里运行,有的时候调试的时候,一点点改动就在虚拟机里直接改了,这就需要windows和centos两个系统的代码一直是同步的,所以就使用了beyongd-compare一直进行比较,这个时候centos上部署一个samba服务,就可以像访问windows资源浏览器一样访问centos上的文件了。
安装
yum install samba
配置
#关闭防火墙
setenforce 0
sed -i "s#SELINUX=enforcing#SELINUX=disabled#g" /etc/sysconfig/selinux
iptables -F
systemctl disable firewalld
systemctl stop firewalld
#添加root用户
smbpasswd -a root #添加root用户
#修改配置参数
vim /etc/samba/smb.conf
[share]
comment = share all
path = /home
browseable = yes
public = yes
writable = yes
#启动samba
systemctl enable smb
systemctl start smb