linux配置sambar服务器,方便windows开发


登录服务器, yum安装sambar
yum -y install samba* --skip-broken

打开配置文件
vi /etc/samba/smb.conf

配置文件中搜索home

[homes]
        comment = Home Directories
        browseable = no
        writable = yes

下增加

[web]
        path = /home/ftp/1520/   #共享的目录
        browseable = yes                #可读
        writable = yes                    #可写

修改完保存,饭后重启服务
service smb restart     #重启服务

保证以后能启动
chkconfig smb on    #设置下次启动
chkconfig --list smb    #查看启动   正常打印: smb             0:off   1:off   2:on    3:on    4:on    5:on    6:off

创建smb用户
useradd apache    # 正常打印 useradd: user 'apache' already exists

创建密码
smbpasswd -a apache    #正常打印  New SMB password: