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
編譯前大小
編譯后大小
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM