Linux下samba编译与安装(Ubuntu和嵌入式linux)

Ubuntu[i386-linux下安装过程]
1、安装samba
sudo apt-get install samba
sudo apt-get install smbfs (可选)
sudo apt-get install samba4(Ubuntu需安装)
sudo apt-get install cifs-utils
sudo chmod 777 WS_HOST
2、对 /etc/samba/smb.conf 进行修改
修改下面的项目,所有人均可访问
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
   security = share
在配置文件最后面加
[Ubuntu]
path = /home/pi/dragon/WS_HOST
public = yes
writable = yes
重新启动samba
$ sudo /etc/init.d/samba restart
3、可以正确访问
4、用户模式访问
修改配置文件两处 
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
   security = user
[Ubuntu]
path = /home/pi/dragon/WS_HOST
public = yes
writable = yes
vaild user = pi
重新启动samba
$ sudo /etc/init.d/samba restart
 
[arm-linux编译、安装过程]
1、在下面网址选择老的samba版本安装,这里选的是 samba-3.0.37
https://download.samba.org/pub/samba/
2、解压文件,进入source文件夹,添加一个config.sh文件,添加下文代码,并设置为可执行
$ tar -zxvf samba-3.0.37.tar.gz
& vi config.sh

当前环境有的交叉编译工具如下,所以就按照下文代码配置config.sh

$ sudo chmod 777 config.sh
执行 config.sh 配置,生成Makefile文件
$ ./config.sh
生成的Makefile
执行make编译
$ make
编译前大小
编译后大小
 
 
posted @ 2015-04-12 21:09  Imapla  阅读(2947)  评论(0编辑  收藏  举报