长手电筒:FreeNAS

来源:百度文库 编辑:九乡新闻网 时间:2024/10/06 04:02:14
FreeNAS FreeNAS - freeBSD NAS server & some tools.

set hw.ata.ata_dma=0
boot

這幾天,我又重新裝了FREE NAS 因為這真的很不佔資源,雖然便利性不像XP 但是藉由網芳、內建的BT下載程式、FTP等功能 已經很接近我用VNC+網芳+rtorrent了
1.改用FreeNAS-i386-embedded-0.69b3.3837.img進行安裝
因為直接安裝在1g的usb內-FAT格式,所以要使用phydiskwrite.exe來做用windows xp系統.......
(1)下載上述2個程式,img檔案的檔名改短一點
(2)放在同一個目錄
(3)切換到cmd-DOS畫面,執行phydiskwrite.exe -u FreeNAS.img
(4)確認隨身碟代號後,按y安裝它....千萬別認錯阿!可能會殺掉整個磁碟的~
萬一不確定可以按crtl+c暫停,拔掉usb,看看是那一個代號
2.裝好後放入動物機開機吧!!當然BIOS要設USB開機
3.進入FREENAS設定,按2設定網路(我是用DHCP,不使用IPv6),抓到ip就ok了
4.reboot,重開,拔螢幕,拔鍵盤---去掛機
5.別台電腦用firefox 登入這個ip,預設帳號admin密碼freenas
6.進入成功後,先去設定DISK--管理(第一選項),按右邊的"+"號
7.選要使用的磁碟機,不能是USB系統碟喔!選好後就ADD它吧~
8.DISK-format-選剛剛掛的磁碟,格式用UFS,隨便打個name
9.格式化要出現容量等訊息才算成功,ok後就去disk最後選項mount按加號
10.當然是加剛剛格式化的磁碟,要打上sharename等資料--add後套用它
11.掛載ok後,就去設system下的第一選項,設定語言為chinese(繁體)時區是亞洲/台北-按確定,然後重新載入(f5)就是中文了
12.選服務-啟動CIFS網路芳鄰(選項在右上角),選USER,隨便描述一下,設工作群組,其他別動,按確定套用吧!
13.按CIFS網路芳鄰的share分頁,掛載剛剛設的sharename
14.選服務-啟動FTP-都不用動,直接OK套用
15.選群組/使用者,加一個使用者,群組選admin(我是這樣選)-但沒設密碼
16.到進階-命令列,Command後面輸入chmod 777 /mnt/分享資料夾名稱有時候可能是chmod 777 /mnt/disk1/分享資料夾名稱,自己掛的路徑
總知道吧~
17.試試網芳與FTP可不可以用,別忘記FireFTP不能開Ipv6與PassiveMode
18.回到nas系統設服務--bitTorrent,PORT不用動,設個密碼 Download directory是指下載檔案放置區 Configuration directory是指系統資料與種子暫存區(一定要設) 這頁面下的網址,就是你的BT程式網址,按確定套用後,試玩看看吧~
我的結論是,FREENAS下載BT比我原來的XP快一點,全速時可達6XX,(10M/2M) 可惜我網芳權限搞了老半天,ftp也被弄得很亂,整體而言,滿不錯的~穩定後 我應該會固定使用它吧~
缺點是種子不能以前一樣直接拉到網芳,給rtorrent自己處理。太可惜了~
-------------------------------------------------------------------------------------------------------
http://chs.mobile01.com/topicdetail.php?f=110&t=734257&last=8043093
佑桑的数位家庭 - FreeNAS & rTorrent
有了 MLDonkey 之后, 发现这个程式还是正如其名, 用在 donkey 上头刚好, BT 的效能就有点让人无言。接着发现原来新版的 FreeNAS 0.69b2 已经内建了cTorrent。可是试用了几次, 却完全无从下手, 怎么用就是不顺, 只好开始寻找别的解决方案。
  参拜过大神之后, 有一个比较受好评的选择, 就是本篇文章所说的 rTorrent。虽然到目前还没有搞定 WebUI, 但也足够使用, 因此在这篇文章中做个记录, 也与 m01 上的同好做个分享。
事前准备
  1.这里的所有操作皆在 FreeNAS 0.69b2 的环境中完成, 其余版本不确定是否可行
  2.截至文章完成, 我的 System 磁区总计用了 1.8GB, 因此建议的磁区最小值能有 8GB 比较好
  3.我的记忆体有 2GB, 现在使用率大约都在 93%~98% 中间游走, 所以请估计好 SWAP 空间
  4.同我前一篇文章所提, 请准备好 FreeBSD 6.3 release ISO 档并解开备用
艰难的安装过程
  因为 rTorrent 要从 0.8.x 之后才开始支援 DHT (Distributed Hash Table), 可以让使用者在没有 Tracker 的情形下依然能够下载(?? 不很确定这个说法是不是正确, 有误请告知)。所以我们以安装 rtorrent-devel-0.8.2 为例, 说明整个安装过程
  利用 FreeBSD FTP4 的连结来安装 rtorrent-devel
     # pkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/rtorrent-devel-0.8.2.tbz
     # rtorrent
     /libexec/ld-elf.so.1: Shared object "libstdc++.so.6" not found, required by "rtorrent"
  少了一个档案, FreeBSD 中也找不到, 看档名猜一下套件名称, 补上!
     # pkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/libstdc++_stldoc_4.2.2-20071101.tbz
     # rtorrent
     /libexec/ld-elf.so.1: Shared object "libstdc++.so.6" not found, required by "rtorrent"
  怪怪, 套件装完了还是找不到! 到 Google 去拜一下大神, 再装另外一个套件
     # pkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/libstdc++_stldoc_4.2.2-20071101.tbz
     # rtorrent
     /libexec/ld-elf.so.1: Shared object "libstdc++.so.6" not found, required by "rtorrent"
  怎么回事? 还是找不到所需要的档案, 再去求求大神, 从某篇文章得到一个灵感, 看看有没有 libstdc++.so.*
     # find / | grep -i libstdc++.so
     /usr/lib/libstdc++.so.5
     居然有一个 libstdc++.so.5 那就试试看直接拿来用好了
     # cd /usr/lib/
     走一下小偏门, 做个 link 把 x.6 连结到 x.5
     # ln libstdc++.so.5 libstdc++.so.6
     再执行一次看看
     # rtorrent
     /libexec/ld-elf.so.1: Shared object "libgcc_s.so.1" not found, required by "rtorrent"
  咦! 好消息是错误讯息变了, 坏消息是依然不能执行! 而且 FreeBSD ISO 档中依然找不到这个档案,果然不能没有「大神」。看来这个档案是包在 gcc 的套件中(这次决定不装套件, 走点偏门试试看, 直接到 FreeBSD TW FTP 去抓)
     # wget ftp://ftp.tw.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/gcc-4.4.0_20080307.tbz
     用 7-ZIP 把档案解开来, 找到 libgcc_s.so.1 并拷贝到 FreeNAS 中再试试看
     #cp /somewhere/libgcc_s.so.1 /usr/lib/libgcc_s.so.1
     # rtorrent
  耶! 可以了! 出现主画面, 画面下方的文字说明找不到 /root/.rtorrent.rc 这个设定档, 但是已经可以正常执行。按下 Ctrl+Q 退出 rTorrent, 准备进入下一步
  备注:
  1.文章中第一个缺的档案 libstdc++.so.6 或许也可以直解下载解开 libstdc++ 套件包中的 libstdc++.so.5,然后更名后放到正确目录中试试看
  2.备用的 FreeBSD ISO 档案, 在我的安装流程中没用到, 不过留着以备不时之需
搞定你的 rtorrent.rc
  新增并编辑以下这个档案
     # nano /root/.rtorrent.rc
  档案内容可以参考网路上找得到的说明或是参考一下我的设定档
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# 每一个 torrent 最小/最大连接数
# Maximum and minimum number of peers to connect to per torrent.
min_peers = 10
max_peers = 200
# 每一个 torrent 最大上传数量
# Maximum number of simultanious uploads per torrent.
max_uploads = 10
# 上传和下载速度限制 0:无限制 (KB/s)
# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 60
# 下载档案存放目录
# Default directory to save the downloaded torrents.
directory = /somewhere/rtorrent/income
# 下载快取目录
session = /somewhere/rtorrent/temp
# torrent 档存放目录, 并定时监控
schedule = watch_directory,5,5,load_start=/somewhere/rtorrent/torrents/*.torrent
# 监听的 TCP port 范围
port_range = 51001-51002
# 下载档案名使用 UTF-8 编码
encoding_list = UTF-8
# DHT 相关设定 (分布式哈希表)(Distributed Hash Table)
dht = auto
dht_port = 51000
# 是否可以使用 UDP port 的 trackers
# Set whetever the client should try to connect to UDP trackers.
use_udp_trackers = yes
# Enable peer exchange (for torrents not marked private)
peer_exchange = yes
# 记录档存放路径
execute_log = /var/log/rtorrent.log
# 定时检查种子, 到达指定条件后停止做种
schedule = ratio,60,60,"stop_on_ratio=200,50M,300"
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
丢到背景去
  这时 rtorrent 应该可以正确执行了, 各位可以试着把种子丢到 rc 档中所设定的 /somewhere/rtorrent/torrents/ 目录中(可以用网芳、FTP、SFTP等任何方式), 应该可以自动启动了, 至于 rTorrent 的操作方式, 可以参考这份文件。
  按下 Ctrl+Q 可以退出程式, 只可惜所有下载中的程序也一并跟着停掉, 所以我们必需有一个方式, 可以在平常时将程式放在背景执行, 而在有需要时拿到前景来跑。
  要做到这点, screen 或是 dtach 就可以完成。可是我在 FreeNAS 中找不到 screen 程式, 也不知道该怎么安装(知道的网友请不吝告知), 所以这里以 dtach 来做说明
     # pkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/dtach-0.8.tbz
     使用下头的指令来执行 rTorrent
     # dtach -c /tmp/ABC rtorrent
     按下 Ctrl+\ 可以把 rTorrent 丢到背景去
     使用下头的指令把丢到背景的 rTorrent 捡回来
     # dtach -a /tmp/ABC
  这里有一点需要注意, dtach 似乎会影响上/下/左/右键的对应。遇到这种状况时, 可以改用 Ctrl+上/下/左/右 来代替
  当然, 还是必需把 public IP 上的对应 port 转到 FreeNAS 上头, 不过这已经不是本文的范围了
------------------------------------------------------------------------------------------------------
http://chs.mobile01.com/topicdetail.php?f=110&t=727507&last=7497811
佑桑的数位家庭 - FreeNAS & MLDonkey
1.我使用才刚刚释出的 FreeNAS LiveCD 0.69b2 i386 ISO 做为主要的作业系统(其实是因为旧的 0.69b1 早就被我玩得快挂了, 趁机升级)(下载点)
  2.因为 FreeNAS 0.69b2 是以 FreeBSD 6.3 为基础所开发, 所以准备一份 ISO 档备用(下载点)
  3.7-ZIP(下载点)或任何可解 ISO 档的解压缩软体
接下来, 把 FreeNAS 的 ISO 档烧录成光碟, 开始安装, 可参考 Mobile01 上 chicman 前辈的这几篇文章 01,02,03,我只留下一些比较特别的设定
记得安装时要安装成 Full install + DATA 的模式。还有, 用 7-ZIP 把 FreeBSD ISO 档解开, 存放于任何一个目录中(放在你自己的电脑, 或是上传到 FreeNAS 中都可以)
微调设定
因为会装上很多自己要使用的套件, 记得系统的磁碟空间要大一点(我自己是用一颗 40GB 的 HDD 完全给 FreeNAS 使用)
SAMBA 的中文支援:服务 > CIFS/SMB... > 设定 > 附属参数 > 自行增加一行
     dos charset = CP950
smb.conf 组态档是放在 /var/etc/smb.conf, 记得自行修改是无效的, 因为重开机之后又会变回原状, 这里的设定只能由 WebUI 来管理
启用 SSH, 另外还开启「键盘认证」及「SSH Tunneling」, 利用 SSH 登入系统, 新增一个档案 /etc/csh.cshrc, 内容为
     setenv PAGER more
     setenv BLOCKSIZE K
     setenv EDITOR nano
     setenv LANG zh_TW.UTF-8
     setenv LC_ALL en_US.UTF-8
     setenv PACKAGEROOT ftp://ftp4.freebsd.org
     alias ls 'ls -wG'
     setenv LSCOLORS ExGxFxdxCxDxDxBxBxExEx
上头的设定可让 PieTTY 中的中文正常显示, 并且还有七彩颜色可以看。当然, PieTTY 中的字元编码需设定为 UTF-8

ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/
安装常用套件, FreeBSD FTP 4 上头的套件比较完整, 版本也比较新一点, 可以在安装时少一点问题(请复制套件的完整连结来安装)
     # pkd_add -r ...joe...(个人喜好, FreeNAS 已内建了 nano)
ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/joe-2.9.8.tbz
     # pkd_add -r ...wget...(个人喜好, 也可以用 ncftp)
ftp://ftp.tw.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/wget-1.11.tbz
安装 MLDonkey
同样的, 因为 FreeBSD FTP 4 上的东西比较完整, 在安装 mldonkey 这类软体时, 与许多不同套件有版本上的相依性, 所以虽然速度很慢, 但还是建议用这个比较好
     # pkd_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/mldonkey-2.9.5.tbz
     这里要跑很久很久, 装一大堆有的没有东西, 出现一大堆的讯息
完成后, 重新登出登入一次, 执行 mlnet, 会出现类似下头的讯息
     # mlnet
     Running under /root/.mldonkey
     /libexec/ld-elf.so.1: Shared object "libmagic.so.2" not found, required by "mlnet-real"
记得文章一开始要各位把 FreeBSD ISO 档解开吗? 现在就是用上的时候了, 找一找你解开的档案中, 应该可以找到这个缺少的档案。
那么, 应该放在那里呢? 请你参考一下你找到这个档案所在的路径
     例:/tmp/6.3-i386-disc1/usr/lib/libmagic.so.2
     例:D:\temp\6.3-i386-disc1\usr\lib\libmagic.so.2
看出来了吧, 把档案 COPY 过去吧!
     # cp /tmp/tmp/6.3-i386-disc1/usr/lib/libmagic.so.2 /usr/lib/
重覆执行几次 mlnet, 补上所缺的档案, 直到出现类似下头的画面
     # mlnet
     Running under /root/.mldonkey
     2008/08/12 00:13:28 [cO] Starting MLDonkey 2.9.5 ...
     2008/08/12 00:13:28 [cO] Language EN, locale UTF-8, ulimit for open files 11095
     2008/08/12 00:13:28 [cO] MLDonkey is working in /root/.mldonkey
     2008/08/12 00:13:28 [cO] creating new MLDonkey base directory in /root/.mldonkey
     2008/08/12 00:13:28 [cO] loaded language resource file
     2008/08/12 00:13:28 [DNS] Resolving [freenas.homelan] ...
     2008/08/12 00:13:28 [DNS] Resolving [www.mldonkey.org] ...
     2008/08/12 00:13:28 [dMain] Libmagic file-type recognition database not present
     2008/08/12 00:13:28 [cO] Logging in /root/.mldonkey/mlnet.log
     2008/08/12 00:13:28 [dMain] Core started
快要完成了, 按下 Ctrl-C 把 mlnet 程式停下来, 由上头的讯息中可以看到, mlnet 会在 /root/.mldonkey 这个目录下建立许多程式运行时所需的资料, 我们需要编辑其中一个档案
     # joe /root/.mldonkey/downloads.ini
     找到 allowed_ips 这一段, 修改并开放你所想开放的 IP 位址
     allowed_ips = ["127.0.0.1";"192.168.1.0/24"]
改好之后, 就可以用 & 符号让程式在背景执行了
     # mlnet &
理论上, 我们应该可以在 rc.conf 下一些参数让 MLDonkey 自动在开机时启动, 但是我自己一直搞不定, 会有错误讯息出现。后来想想, 反正机器也几乎没在关机, 每次重开时手动启动一下也没有多麻烦
接着, 你就可以到 http://freenas-ip:4080/ 看到你期待已久的东西了
------------------------------------------------------------------------------------------------------
拿出家中的旧电脑来安装FreeNAS,其配备需求非常节省
* CPU:P III 500MHz以上
* RAM:128MB(要装外挂请准备256MB)
* 系统磁碟:32MB CF/USB/HD
* 资料磁碟:当然是越多越好...
* 网路卡:最少一张有线网卡
这就是我的NAS,是把原本一台Server升级硬体之后换下来的CPU跟主机板,不过为了未来的扩充,这台CASE跟POWER都是新的啦~

补充说明的是,个人建议把系统装在CF或是USB上头,一来省电,二来小容量的CF/USB大家手边一定都有多的。上面说系统需要32MB的空间算是FreeNAS的最小需求,我建议最少找128MB的CF/USB,多余的空间可以当作SWAP使用。如果想用32MB的也无所谓,SWAP可以放在别的地方。
以CF跟USB来说,CF的效能会比较好,不过还要搭配CF/IDE的转接卡。系统碟只在开机跟设定变更的时候才会读取,平常不关机的话,系统磁碟几乎没在动作就是了。个人是使用CF来安装系统档案。

一切就绪之后,请先找来一台光碟机来做安装动作,等到安装完毕光碟机就不需要了。请先到FreeNAS档案下载区下载光碟的iso档。目前是0.68~0.683B都有。个人使用0.683作为下面的教学示范。
点这里直接下载0.683光碟ISO。如果你只是玩票,可以下载0.68版的VMware Image档案玩玩看。
http://nchc.dl.sourceforge.net/sourceforge/freenas/FreeNAS_VMware_0.68.zip
1. 请先烧录光碟,然后使用光碟片开机。
2. 等待kernel读取完毕,就会看到以下画面,请输入"7 Install on HD/CF/USB Key"安装。
3. 系统接着会询问你否要把系统磁碟分割出一个资料磁区来。如果你的系统碟大于32MB而你想把SWAP放在系统碟中,请选"2 Create 2 UFS partitions..."。如果你只想单独安装系统,请选"Create 1 UFS Partition",这里建议只建立一个磁区就好(Current BUGs found) 。
4. 接着系统会列出一张侦测到的光碟清单,询问你要从哪一台光碟机安装FreeNAS。在这里我们的光碟机是 "acd0",所以输入 "acd0"。
5. 系统接着列出硬碟清单,没意外的话应该包含你的CF/USB装置,在这里我把它安装到 "ad0" 这颗硬碟。
6. 等待一下子,系统很快的就安装完毕了。之后输入 "3" 回到主选单。
7. 之后输入 "5" "y",就可以重新开机,使用刚刚装好的系统磁碟做开机的动作了。同时可以把刚刚拿来安装用的光碟机移除。
8. 重开机完成之后,系统预设的IP位置是192.168.1.250,这时候我们输入 "2" 来设定这台电脑的IP。
9. 系统询问是否讯问DHCP伺服器获得IP,这里我偏好使用固定IP,所以输入 "n"
10. 然后输入你所要设定的IP。
11. 然后设定网域遮罩位元长度,我这里设定 255.255.255.0,也就是输入 "24"
12. 完成之后,到浏览器内输入刚刚设定好的IP位置(http://),帐号输入 "admin",密码为 "freenas",如果你看到系统首页,那恭喜您安装成功啰!
------------------------------------------------------------------------------------------
Versions used in this document:
FreeNAS 0.686.2 (revision 2891)
rtorrent-0.7.9_1

Level: beginner - intermediate

STOP and READ: rtorrent is a terminal (ncurses) based torrent client, it is not pretty but it works pretty good. If you are looking for a web fronted torrent client this thread may be what you are after:
http://sourceforge.net/forum/forum.php?thread_id=1953847&forum_id=507589

rtorrent http://libtorrent.rakshasa.no/

IMPORTANT: Requires the Hard Drive Full Installation. Since you may wish to add other packages in the future your system disk partition should be 200 mb or so. You will not see this partition as part of the NAS shares.

WARNING: If you are doing the HDD full install for the first time use a hard drive that can be overwritten.

Requirements:
1 FreeBSD Release 6.3 CD ISO - a library is needed off it, it's a full cd so start the download now, you won't need to burn it. ** THIS MAY NOT BE REQUIRED if you are using a newer FreeNAS version based on FreeBSD 6.3
ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-pc98/6.3/6.3-RELEASE-pc98-disc1.iso

2 7Zip compression program or a program that can open an ISO.
http://www.7-zip.org/download.html

3 Console shell access or for remote access SSHD Service enabled on your FreeNAS

4 Option to console, For remote access you will need a SSH client such as putty
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

5 Option to console, For remote access your share account must also be an additional member of the group wheel so that you can 'su' to the root account. There is also an option in FreeNAS SSHD service to permit remote root login if you wish.

6 FreeNAS server has access to the Internet to download packages.

Get started:
7 Start downloading the FreeBSD Release 6.3 Release on your desktop, the FreeNAS version used here is based on 6.2 BUT the library required was introduced after the 6.2 release, if someone knows where to get just the library libncursesw.so.6 say so. ** THIS MAY NOT BE REQUIRED if you are using a new FreeNAS version based on FreeBSD 6.3 developer will have to say they are adding that library.

Assuming You have installed the FULL FreeNAS to the hard drive.

8 At the shell prompt install the rtorrent package, by doing it at the console it will also install other required packages. Entering pkg_add -r rtorrent did not work on this version because the FreeBSD tree has moved on to REL 6.3. So we will point it to the full package FreeBSD hierarchy for download. Since the version number will change browse to ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/ directory and type in the link to the current rtorrent package.

command
#pkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/rtorrent-0.7.9_1.tbz

Install the dtach package to allow us to detach from the running program.
command
#pkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/dtach-0.8.tbz

9 If this goes well it will install rtorrent, dtach and the other required packages.
command
#pkg_info (or check installed packages in FreeNAS window System/Packages)
freenas:/mnt# pkg_info
curl-7.16.3_1 Non-interactive tool to get files from FTP, GOPHER, HTTP(S)
dtach-0.8 Emulates the detach feature of screen
libsigc++-2.0.18 Callback Framework for C++
libtorrent-0.11.9 BitTorrent Library written in C++
perl-5.8.8_1 Practical Extraction and Report Language
pkg-config-0.22_1 A utility to retrieve information about installed libraries
rtorrent-0.7.9_1 BitTorrent Client written in C++
xmlrpc-c-1.06.24 XML-RPC library for C and C++

10 rehash the shell - short explanation, just do it after installing a package in the root shell.
command
#rehash

11 You can try to run rtorrent now at the console, it should indicate the library file is missing.
command
# rtorrent
/libexec/ld-elf.so.1: Shared object "libncursesw.so.6" not found, required by "rtorrent"

12 From your desktop system, when the ISO has finished downloading, open it with 7Zip and browse to:
\6.3-RELEASE-i386-disc1.iso\lib\

Extract the file: libncursesw.so.6 to a shared folder on FreeNAS server. Make sure you get the correct file as libraries can have similar names.

Assuming your share is called data1 and you make a folder called /lib/ so now the file is copied to: \\Freenas\data1\lib\

Back to the console (or remote shell) to copy the file to the system folder and HEY you are playing in the system folders so be careful.

command
#cp -vi /mnt/data1/lib/libncursesw.so.6 /lib
/mnt/data1/lib/libncursesw.so.6 -> /lib/libncursesw.so.6

13 Now try rtorrent
command
rtorrent

It should come up but complain that "Could not read resource file: ~/.rtorrent.rc" does not exist, this is the options file that you will need to create under the 'home' directory, for root the file will need to be created in /root/.rtorrent.rc, more on that further on.
do a "ctrl-q" to exit rtorrent.

14 Create the .rtorrent.rc file and either leave it running from the console as root or if it is remote access start and detach from it (see below) in a remote session.

Use FreeNAS editor nano to create the .rtorroent.rc file
command
#nano /root/.rtorrent.rc

====================
#SAMPLE .rtorrent.rc file
#BSD specific settings need these to check hash faster.
hash_read_ahead = 8
hash_max_tries = 5
hash_interval = 10

# Port range to use for listening.
# point your firewall here
port_range = 51000-51010

# Default directory to save the downloaded torrents.
# create this on your share,
directory = /mnt/data1/torrents/files

# Makes rtorrent save your current download stats
# you have to create this folder. Use it for nothing else
session = /mnt/data1/torrents/session

# Watch a directory for new torrents, and stop those that have been deleted
# From your desktop simply save the torrent link here and it will automatically start.
# create the directory and assign the proper security.
schedule = watch_directory,5,5,load_start=/mnt/data1/torrents/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=

#there are more options for scheduled speed, ratios etc see the rtorrent web sites.
#
#end of sample file
====================

rtorrent links.
http://libtorrent.rakshasa.no/wiki/RTorrentUserGuide
http://kmandla.wordpress.com/2007/05/02/howto-use-rtorrent-like-a-pro/

15 Running in the background.
Rtorrent does not run as a daemon (service) so If you have remote access and want to start rtorrent then close the remote connection you can use the pkg installed above called dtach. There is a better program 'screen' but that is not available as a package due to performance bug on FreeBSD. Since FreeNAS has no compilers you can't build screen from ports. (correct me if I'm wrong about that because screen would be great)

command
dtach -c /tmp/rtor rtorrent
keyboard "Ctrl \" The rtorrent session will detach and still run in the background.

To reconnect to the running rtorrent session
Command
dtach -a /tmp/rtor

NOTE: it's known that dtach may remap the arrow keys for rtorrent when re-attaching, , you can use other keys listed in rtorrent man page: up | down | left | right arrow keys, = ^P | ^N | ^B | ^F (where ^ = Ctrl)

16 I tried to have rtorrent run at boot with a command in the FreeNAS gui under:
System/Advanced/Command Scripts
dtach -n /tmp/rtor rtorrent -n -o import=/root/.rtorrent.rc
Post Init

This starts rtorrent at boot but attaching to this window does not work properly.
If someone gets that working add it in.