1背景
转到Linux有段时间了,vim操作还不能应对工程代码,之前一直都是Gnome桌面 + Clion 作开发环境,无奈在服务器上没有这样的环境,
看同事是(Windows)Source Insight + WinSCP + Linux 开发,来回同步文件有点麻烦,所以想尝试搭个Samba服务器做共享文件。
不过希望以后还是要转到vim上来。
2环境
[root@linuxidc.com ~]# cat /etc/RedHat-release
CentOS Linux release7.2.1511 (Core)
Samba服务器
[root@linuxidc.com ~]# rpm -qi samba
Name : samba
Epoch :0Version :4.4.4Release :9.el7
Architecture: x86_64
Install Date: Sun18 Dec 2016 11:59:56PM CST
Group : System Environment/Daemons
Size :1869290License : GPLv3+ and LGPLv3+Signature : RSA/SHA256, Mon 21 Nov 2016 04:38:30AM CST, Key ID 24c6a8a7f4a80eb5
Source RPM : samba-4.4.4-9.el7.src.rpm
Build Date : Mon07 Nov 2016 06:31:03PM CST
Build Host : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem
Vendor : CentOS
URL : http://www.samba.org/
Summary : Server and Client software to interoperate with Windows machines
Description :
Samba is the standard Windows interoperability suite of programsforLinux and
Unix.
3安装
[root@base ~]# yum -y install samba samba-client
4配置
进入samba配置目录
[root@base ~]# cd /etc/samba/
备份smb.conf
[root@base samba]# mv smb.conf smb.conf.origin
新建smb.conf
[root@base samba]# vim smb.conf
内容如下,保存并退出
[global]
workgroup = WORKGROUP
server string = Ted Samba Server %v
netbios name = TedSamba
security = user
map to guest = Bad User
passdb backend = tdbsam
[FileShare]
comment = share some files
path = /smb/fileshare
public = yes
writeable = yes
create mask = 0644
directory mas