接着上一篇继续
http://www.chenwang.net/2015/04/28/cubieboard-%E7%A3%81%E7%9B%98%E6%80%A7%E8%83%BD/
安装 samba ,这里先安装 aptitude 。第一次时是用 apt-get 来安装的 samba ,结果出现包依赖错误,系统都挂了…
1 2 3 4 | linaro@cubieboard:~$ sudo apt-get install aptitude slinaro@cubieboard:~$ sudo aptitude update linaro@cubieboard:~$ sudo aptitude safe-upgrade linaro@cubieboard:~$ sudo aptitude install samba |
下面配置账号。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | linaro@cubieboard:~$ sudo adduser gftp Adding user `gftp' ... Adding new group `gftp' (1002) ... Adding new user `gftp' (1001) with group `gftp' ... Creating home directory `/home/gftp' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for gftp Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] linaro@cubieboard:~$ sudo usermod -a -G gftp linaro linaro@cubieboard:/mnt/100g$ sudo chown gftp:gftp /mnt/100g linaro@cubieboard:/mnt/100g$ sudo chmod ug+w /mnt/100g linaro@cubieboard:~$ sudo smbpasswd -a gftp New SMB password: Retype new SMB password: Added user gftp. linaro@cubieboard:~$ sudo vi /etc/samba/smb.conf # 追加以下内容: [gftp_100g] path = /mnt/100g available = yes valid users = gftp read only = no browseable = yes public = yes writable = yes linaro@cubieboard:~$ sudo service smbd restart smbd stop/waiting smbd start/running, process 24739 |
好了,现在可以在 windows 下使用 \\IP 来访问共享了。
实测 win7 往 cubieboard 拷贝大文件速度在 9.77M -10.1M之间,应该是cubieboard 100M网卡的性能限制的。
参考:
How to Create a Network Share Via Samba Via CLI (Command-line interface/Linux Terminal) – Uncomplicated, Simple and Brief Way!
https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20%28Command-line%20interface/Linux%20Terminal%29%20-%20Uncomplicated,%20Simple%20and%20Brief%20Way!