Linux Nas

From ElectroDragon Wiki
(Redirected from Transmission)

MiniDLNA

  • sudo apt-get install minidlna
  • Config file sudo nano /etc/minidlna.conf, example:
media_dir=A,/media/HDD/Music
media_dir=P,/media/HDD/Pictures
media_dir=V,/media/HDD/Movies
# Name that the DLNA server presents to clients.
friendly_name=RASPI MINIDLNA
# set port, can visit later via port
port=8200
  • service start: sudo service minidlna restart, or auto start: update-rc.d minidlna defaults
  • remote play options:
  1. On another RPI: VLC, XMBC KODI,
  2. appstore or android: BubbleUPnP, MediaHouse, mxplayer
  3. smart TV
  4. PC: potplayer
  • User watch max issue: nano edit: /etc/sysctl.conf, add line: fs.inotify.max_user_watches=65536, and run command /sbin/sysctl -p
  • In minidlna conf: also enable inotify=yes and notify_interval=300

Samba

  • Install the samba, update maybe necessary: sudo apt-get install samba samba-common-bin
  • edit config file, we use nano here, some typing work will be needed: nano /etc/samba/smb.conf
  • (may not necessry) Give the workgroup and windows support, change the following settings, normally workgroup is default WORKGROUP
workgroup = your_workgroup_name
wins support = yes
  • Edit following contents at the end of the conf file:
  • complex set (reference only)
# shared name
  [pihome]  
   comment= Pi Home
# shared folder  
   path=/media/SSK 
   browseable=Yes
   writeable=Yes

   # only guest=no 
   create mask=0777 
   directory mask=0777 # may not necessary
   public=yes # yes or no for public
   valid users = root pi # allowed user
  • simple set
# shared name
  [pihome]  
   comment= Pi Home
# shared folder  
   path=/media/
   browseable=Yes
   writeable=Yes
   public=yes
   valid users = root pi
  • Then restart the samba service ‘’‘’/etc/init.d/samba restart or service samba restart or service smbd restart
  • Finally add the new users pi, and enther the password twice and you can browse raspberrypi in the windows now:
smbpasswd -a pi
pdbedit -a pi
  • If can not write file, add line force user = root

Transmission

Step Header text Header text
Install apt-get install transmission-daemon Example
  • Use root for transmission-daemon
  • in case hard disk mounted as root, and not changeable
  • sudo nano /etc/init.d/transmission-daemon
  • change USER=debian-transmission to USER=root
  • ? usermod -a -G debian-transmission root
  • ? adduser root debian-transmission (add user root to group debian-transmission)
  • ? cat /etc/passwd set debian-transmission number id to 0:0
match the mounted disk
setting config file
  • Run the command to edit setting file:
sudo nano /etc/transmission-daemon/settings.json
-
Setting steps - turn off or edit whitelist IP "rpc-whitelist-enabled": false, so you can login remotely 192.168.1.*
Setting steps - set correct Download folder "download-dir": "/media/SSK",
Setting steps - Change the login user name and password for RPC
"rpc-password": "root",
"rpc-username": "root",
Setting steps - set all downloaded files' permission to 777 "umask": 0
Setting steps - reload config
  • and then restart after you finish editing the configuration file
sudo service transmission-daemon reload
sudo service transmission-daemon restart
  • Kill all daemon to ensure you can edit the setting files.
killall transmission-daemon
login http://192.168.1.113:9091/

Use in OpenWrt

Xuneli Xware (Obsolete)

Steps Header text Header text
prerequisite use root, mount disk, and xunlei will automatically use it and put file in TDDOWNLOAD folder Example
APP file Xware1.0.31_armel_v5te_glibc.zip Example
install APP example folder /home/pi/XL Example
run setup command
  • chmod 777 * -R
  • run ./portal
set right for xunlei file copy activation code into http://yuancheng.xunlei.com/
Set auto start
  • sudo nano /etc/rc.local
  • add the line before exit 0
  • ./home/pi/XL/portal
check
  • fdisk -l to check if the media mounted or not
  • Auto mount media disk, if failed auto mount reboot it.

Baidu Yun by SyncY

Steps Header text Header text
python
  • Install python and relevant package "requests"
  • pip install requests
-
git clone the python files git clone https://github.com/houtianze/bypy.git -
Auth, run command ./bypy.py info -
confirm after authication, you can find folder "我的应用数据apps" in main folder
run list command to see files in apps folder ./bypy.py list

Set system locales

  • In raspi-config, first choose:
en-GB.UTF-8 UTF-8
zh_CN.GB2312
zh.CN.GB18030 GB18030
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8

and then choose: zh_CN.UTF-8 UTF-8

  • Change Timezone to Asia -shanghai
  • Install input method: apt-get install scim-pinyin
  • nano /etc/sysconfig/i18n, change the original to
LANG="zh_CN.UTF-8"
SYSFONT=latarcyrheb-sun16

Usage

./home/pi/bypy/bypy.py syncup
  • or compare
 ./home/pi/bypy/bypy.py compare