日期:2014-05-16  浏览次数:20782 次

linux 下安装samba
现在rpm版很难找到,这里介绍一下用源代码的安装方法

获取samba
http://ftp.samba.org/pub/samba/stable/
这里下载samba-4.0.3.tar.gz到/home/backup目录

#cd /home/backup/
解压缩
#tar xzvf samba-4.0.3.tar.gz

编译安装
#cd samba-4.0.3/source3/
# ./autogen.sh
# ./configure --prefix=/usr/local/samba
samba默认是安装在/usr/local/samba目录下,你可以通过指定prefix=your location的方式来指定安装目录
# make
# make install

配置动态链接库路径
# vi /etc/ld.so.conf
加入一行/usr/myname/install/samba/lib

配置
# vi /usr/local/samba/etc/smb.conf

[global]
workgroup = hs-ec-bj
netbios name = hs-ec-bj-share-server
server string = hs-ec-bj-share

[share]
path = /home/store
writeable = yes
browseable = yes
guest ok = yes
valid users=root

设置用户密码
#/usr/local/samba/bin/smbpasswd -a root

测试
#/usr/local/samba/bin/testparm