请注意,本文编写于 3272 天前,最后修改于 2164 天前,其中某些信息可能已经过时。
=============================安装entware环境脚本==================================
进入opt目录下安装entware环境脚本
cd /opt
wget http://qnapware.zyxmon.org/binaries-armv7/installer/entware_install_arm.sh
chmod 777 ./entware_install_arm.sh
sh ./entware_install_arm.sh
需要一段时间下载安装.
===================================samba安装配====================================
/opt/bin/opkg update |更新
/opt/bin/opkg install samba36-server |安装samba
/opt/bin/opkg list-installed |查看安装列表里是否有samba36-server
df -h |看看你的U盘TF卡的挂载路径,Mounted on那一列
|/media/XXXXXX分别有四种情况mmcblk0、mmcblk1
/media/mmcblk0p5 |sda、sda1,记住目录名称,后面要用
vi /opt/etc/samba/smb.conf |新建一个smb.conf配置文件,把以下内容粘贴进去
按A键进入编辑模式,把以下内容复制用鼠标右键粘贴进去,
按ESC退出编辑模式,按:输入wq 保存退出.
-----------------------------------分割线------------------------------------------
[global]
netbios name = XunLei
display charset = UTF-8
interfaces = 127.0.0.1/8 lo 192.168.1.111/24 br-lan
server string = XunLei Share
unix charset = UTF-8
workgroup = MSHOME
browseable = yes
deadtime = 30
domain master = yes
encrypt passwords = true
enable core files = no
# guest account = nobody
guest account = root
guest ok = yes
# invalid users = root
local master = yes
load printers = no
map to guest = Bad User
max protocol = SMB2
min receivefile size = 16384
null passwords = yes
obey pam restrictions = yes
os level = 20
passdb backend = smbpasswd
preferred master = yes
printable = no
security = user
smb encrypt = disabled
smb passwd file = /opt/etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY
syslog = 2
use sendfile = yes
writeable = yes
[homes]
comment = Home Directories
browsable = no
read only = no
create mode = 0750
[nas]
path = /media/mmcblk0p5 //共享位置
read only = no
guest ok = yes
-----------------------------------分割线------------------------------------------
===============================配置用户名密码,驱动服务器 ===========================
/opt/etc/init.d/S08samba start |启动服务器
smbpasswd -a root |然后重复输入两次密码
/opt/sbin/smbpasswd -a root |如果上面那个命令出错,试试这个命令
/opt/etc/init.d/S08samba restart |重启服务器
现在你就可以在windows的运行里输入 \IP地址 访问入你赚钱宝的U盘了
============================最后,设置开机自动运行samba服务器========================
vi /etc/init.d/rcS
按下A键在文件最后添加
sleep 30
/opt/etc/init.d/rc.unslung start
按下ESC键,按:输入wq保存退出,那么以后你的赚钱宝重启了也不用手动从新开一次smb服务器