1、0、路由为 WRT54G v4,8M Flash和64M RAM,刷固件 DD-WRT v24-sp2 (10/10/09) mega,扩展 SD/MMC MOD或 USB口,建议用 USB接口接硬盘,因为 SD口为 GPIO仿 SPI时序,所以CPU占用极高,极易造成路由重启。添加 USB口:SD扩展:升级内存和 FLASH:(网络论坛上有不少)1、准备优盘或是移动硬盘,按自己需求格式化,安装软件的分区必须为 ext3或2,安装好WINSCP2、DD-WRT 版本 DD-WRT v24-sp2 (10/10/09) mega,打开 SSH管理功能,开启 jffs2功能,启用 usb支持,选择
2、磁盘挂载点为mnt3、加载优盘或硬盘:提前建好 jffs和 opt目录,在 dd的管理 诊断 命令里面,加入以下语句:umount /jffsumount /optmount -bind /mnt/jffs /jffsmount -bind /jffs/opt /opt重启路由,如果一切顺利的话在 DD的 WEB管理页面上应该看到 JFFS2的内容变成了你挂载的硬盘的容量。4、下载 opt.tar.gz文件:http:/ WINSCP把 opt.tar.gz文件传到/jffs 目录里面下载 samba安装文件,打开 http:/ipkg.nslu2-linux.org/feeds/optwar
3、e/oleg/cross/stable,在里面找文件名为 samba_*.*.*-*_mipsel.ipk的文件下载后用 winscp传至/jffs 目录5、telnet 到路由器,进入/jffs 目录解压 opt.tar.gz文件到当前目录:tar zxvf opt.tar.gz6、挂载 opt到/opt:mount -o bind /jffs/opt /opt7、输入:opt/bin/ipkg update8、安装 samba:opt/bin/ipkg install samba_*.*.*-*_mipsel.ipk9、设置 SAMBA3:用 winscp打开 opt/etc/samba/
4、smb.conf,没有这个文件就自己建一个,内容为globalbind interfaces only = yesinterfaces = 192.168.36.1/24workgroup = WORKGROUPserver string = Linksys WRT54Gguest account = rootsecurity = shareload printers = nosocket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVEnetbios name = bh3nvnbrowseable = yesdns proxy = nogue
5、st ok = yesguest only = nolog level = 1max log size = 100encrypt passwords = yespreserve case = yesshort preserve case = yesdos charset = UTF-8unix charset = UTF-8display charset = UTF-8wins support = yestime server = yesos level = 255local master = yesdomain master = yespreferred master = yeshosts
6、allow = 192.168.36.1/24jffspath = /jffsbrowseable = yeswritable = yesmmcpath = /mmcbrowseable = yeswritable = yestorrentpath = /mnt/torrentbrowseable = yeswritable = yesDownloadspath = /mnt/downloadsbrowseable = yeswritable = yes以上 ip地址按自己路由器修改,用 winscp打开 opt/etc/init.d/S08samba文件將 samba_active=0 改成
7、 samba_active=1保存退出10、启动 SAMBA3输入 opt/etc/init.d/S08samba系统提示:Starting nmbd:Starting smbd:这样 samba就启动了11、安装 rTorrent和 Screen输入 opt/bin/ipkg install rtorrent输入 opt/bin/ipkg install screen12、用 winscp打开/jffs/opt/etc/rtorrent.conf 文件,清除原来内容后直接把下面内容复制后贴进去scgi_port = :5000min_peers = 40max_peers = 200max_
8、uploads = 15port_range = 51777-51780use_udp_trackers = yesdht = ondht_port = 6885umask = 0000peer_exchange = yesdownload_rate = 0upload_rate = 30check_hash = noencryption = allow_incoming,enable_retry,prefer_plaintextdirectory =/mnt/downloadssession = /mnt/torrent/sessionschedule = watch_directory,5
9、,5,load_start=/mnt/torrent/*.torrentschedule = untied_directory,5,5,stop_untied=schedule = ratio,30,60,stop_on_ratio=5encoding_list = UTF-8split_file_size = 2146435072然后建好以上所需的目录13、启动 rTorrent:输入/opt/bin/rtorrent -n -o import=/opt/etc/rtorrent.conf14、安装 lighttpd,WEB 界面控制必须得到 lighttpd和 php的支持输入 opt/b
10、in/ipkg install lighttpd编辑 /jffs/opt/etc/lighttpd/lighttpd.conf修改 server.modules = (“mod_access“,“mod_fastcgi“,“mod_scgi“)在最后部添加:scgi.server = (“/RPC2“ =( “127.0.0.1“ =(“host“ = “127.0.0.1“,“port“ = 5000,“check-local“ = “disable“)把# server.event-handler = “freebsd-kqueue“ # needed on OS X修改成 server.
11、event-handler = “poll“否则可能 web页面有问题telnet端输入 opt/etc/init.d/S80lighttpd提示成功后在浏览器地址栏输入 http:/ip地址:8081/提示 lighttpd server is running.说明 lighttpd运行成功要实现 lighttpd和 rtorrent的开机自动运行,请在 DD的管理-命令中添加如下启动命令:/opt/bin/rtorrent -n -o import=/opt/etc/rtorrent.confopt/etc/init.d/S80lighttpd restart15、安装 PHP输入 opt
12、/bin/ipkg install php如果提示有个 bzip2没有安装完成,与 busybox-links冲突。解决办法如下:输入 opt/bin/ipkg remove busybox再输入 opt/bin/ipkg remove busybox-links然后再输入 opt/bin/ipkg install php16、安装 PHP-fcgi输入 opt/bin/ipkg install php-fcgi安装完成后编辑一个文件名为 info.php文件,内容为放到/jffs/opt/share/www 目录,然后再浏览器中输入 http:/ip地址:8081/info.php显示 ph
13、p version图形界面表示安装成功17、到 http:/ rtorrent-2.8.tar.gz在电脑上用 winrar解压后,把 rtorrent文件夹放到/jffs/opt/share/www 目录18、编辑 /opt/etc/php.ini在 extension=xxxx很多的地方添加一行 extension=pdo_sqlite.so19、然后再浏览器输入 http:/路由器 ip地址:8081/rtorrent,rutorrent 控制界面就打开了运行之前,一定要保证 rtorrent已经在正常运行。 。 。 不然要么没反应,要么继续500错误/opt/bin/rtorrent -n -o import=/opt/etc/rtorrent.conf有必要的话还要重启一下 lighttpd:opt/etc/init.d/S80lighttpd restart20、enjoy it!