PogoPlug折腾全过程--安装transmission、samba

这么高配置的机器,只挂一个迷你云浪费了。而且迷你云的数据是编码存储的,在系统里面看不到真是文件。所以samba+transmission还是不可缺少的。

transmission用来下载pt站的东西,samba实现网上邻居共享。

 

以下开始正题..

安装transmission

Debian 6.0软件仓库里面的transmission版本是2.0的,已经过时了,有部分pt站点已经不接受旧版本的客户端。一个方法就是下载transmission源码编译安装,当然我还找到了另一个更好的解决方案就是安装optware了。optware仓库里面的transmission是2.77,足够新。

安装optwae的过程之前的文章也有提及了,以下回忆杀。

mkdir /opt
cd /opt
wget http://busybox.net/downloads/binaries/latest/busybox-armv6l
tar -xOvzf ipkg-opt_*_arm.ipk ./data.tar.gz | tar -C / -xzvf -
mkdir -p /opt/etc/ipkg
echo "src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable" >/opt/etc/ipkg/armel-feed.conf
echo "src native http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/native/unstable" >>/opt/etc/ipkg/armel-feed.conf
export PATH=/opt/bin/:PATH

回忆杀结束。。
安装transmission

ipkg update
ipkg install transmission


安装完后先运行一次,让其生成配置文件。

/opt/bin/transmission-daemon
killall transmission-daemon


完了后,就会有一堆熟悉的文件出现在/root/.config/transmission-daemon里面了,此时可以直接修改settings.json里面的配置,具体的配置就不长篇大论了,transmission官网文档有说明,网上随便一搜也一堆。

最后加上启动脚本,方便控制transmission的启动和停止。

vi /etc/init.d/transmission

#!/bin/sh
#
#transmission start script
#
#from
#http://sites.google.com/site/pogoplugproipkg/S60transmission
#
#Mod by D2O 2013.6.24
#
#transmission配置文件目录
CONFIG_PATH=/mnt/es2_1t/transmission

OPTIONS="--config-dir $CONFIG_PATH -x /tmp/transmission.pid"
start() {
        [ -f CONFIG_PATH ] && . CONFIG_PATH
        /opt/bin/transmission-daemon $OPTIONS
}
stop() {
       #[ -f /tmp/transmission.pid ] && kill $(cat /tmp/transmission.pid) >/dev/null 2>&1
        echo  "Stopping transmission..."
        rm /tmp/transmission.pid
        PIDLIST=`ps aux | grep "$CONFIG_PATH -x /tmp/transmission.pid" | grep -v grep | awk '{print $2}'`
        echo "$PIDLIST"
        for pid in ${PIDLIST}
        do
                kill $pid
                echo "$pid terminated"
        done
        echo "ok"
}
restart() {
    stop
    start
}
case "$1" in
    start)
        start
    ;;
    stop)
        stop
    ;;
    restart)
        stop
                sleep 1
                start
    ;;
    cleanup)
    ;;
    *)
        echo $"Usage: $0 {start|stop|restart}"
        exit 1
esac
exit $?


/etc/init.d/transmission start就可以启动transmission了。用客户端连接或者浏览器访问http://ip:9091 就可以登录transmission管理界面。

接下来安装samba

apt-get update
apt-get install samba


编辑/etc/samba/smb.conf,也是熟悉的配置文件,具体的说明也不长篇大论了。

[global]
        workgroup = workgroup
        server string = D2O-NAS
        null passwords = yes
        guest account = root
        log file = /etc/samba/log.%m
        max log size = 100
        security = share
        load printers = no
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
        encrypt passwords = yes
        smb passwd file = /etc/samba/smbpasswd
        dns proxy = no
        preserve case = yes
        dos charset = UTF-8
        unix charset = UTF-8
        display charset = UTF-8
        os level = 255
        netbios name = D2O-NAS

[media]
        comment = media
        path = /mnt/es2_1t/media
        available = yes
        public = yes
        writable = yes
        printable = no
        create mask = 0777
        guest ok = yes
        browseable = yes


启动samba

/etc/init.d/samba start


在网上邻居里面就能看到PogoPlug(D2O-NAS)了

PogoPlug折腾全过程--安装transmission、samba_第1张图片

 

Enjoy!!

原文首发CSDN博客,转载请保留作者和出处,谢谢!

你可能感兴趣的:(pogoplug,nas)