Perfect media serverYour media (and general purpose) server should have:
- Torrent daemon
- samba share
- mysql + php + nginx
- software to queue, rename and organize your downloads (I'm using sickbeard+ couchpotato)
Operative systemI'm choosing debian armhf, but feel free to try ubuntu arm or arch arm.
Follow either Guillaume's or Roman's instructions on how to install.
Torrent daemonI chose to use transmission-daemon over deluge (and didn't try any other) because deluged + deluge-web was eating up to 30MB of ram, where as transmission-daemon uses 2MB of ram, and the Mele has only 512MB.
Configuration# apt-get install transmission-daemon
# service transmission-daemon stop
# vi /etc/transmission-daemon/settings.json
set rpc-whitelist-enabled to false
at the end of the file if you want transmission to pick up the torrents placed in that folder (both couchpotato and sickbeard can do that)
# service transmission-daemon start
Log in to the default port http://127.0.0.1:9091. The default password is transmission.
On the webui I set up a watch directory because sickbeard stores the torrent files there, and transmission loads them.
Configuration#apt-get install samba-common-bin samba-common samba
Each samba share configuration is unique to the user, but I've set a share with read-write, anonymous access.
At the end of the /etc/samba/smb.cnf file add
path = /path/to/share
read only = no
writeable = yes
guest ok = yes
Mysql + php + nginx
#apt-get install nginx php5 php5-mysql php5-fpm mysql-server-5.5 mysql-client-5.5 php5-mysql
Mysql configurationRemote access
I'm assuming you used 'root' for your username.
mysql -u root
If you didn't set up a password
mysql> SET PASSWORD FOR 'ROOT'@'LOCALHOST' = PASSWORD('your_new_password');
To gain remote access with the username
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'your_password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
comment out the line that says
bind-address = 127.0.0.1
#service mysql restart
Optimize the ram usage of mysql
nginxI chose nginx because of it's small memory footprint and high performance. Check benchmarks vs apache to see the difference.
A webserver's config changes totally, depending the needs of the host. Here's an example link
Couchpotato, SickBeard#apt-get install git-core python2.7 python-cheetah
$ git clone git://github.com/RuudBurger/CouchPotato.git
$ git clone git://github.com/midgetspy/Sick-Beard.git
Follow on-screen intructions for both.
MiscHere's the server running all the processes (no couchpotato)
Mount ntfs with write permission
#apt-get install ntfs-3g
#mount /dev/sd# /path/you/want
Overclock#echo '1110000' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Ledsuse "1" to turn them on, you might need to run #insmod sun4i-gpio
power off blue led
echo "0" > /sys/devices/virtual/misc/sun4i-gpio/pin/ph20
power off red led
echo "0" > /sys/devices/virtual/misc/sun4i-gpio/pin/ph10