D-link DNS-320

Install Transmission BitTorrent Client on Dlink DNS-320

This guides assume you already have fun_plug 0.5 installed and running.

This guides are divided into 3 main section namely download packages, install & configure.

Download

Transmission v2.82

Curl v7.18

Install

1. Run PuTTY and log into DNS-320

2. Change directory to “/mnt/HD/HD_a2” & copy both packages into “/ffp/pkg” folder.

3. Install Curl

funpkg -i /ffp/pkg/curl-7.18.1.tgz

3. Install Transmission

funpkg -i /ffp/pkg/transmission-2.82-1.tgz

Configure

1. Edit Transmission start script to change home directory setting

vi /ffp/start/transmission.sh

Look for

TRANSMISSION_HOME=/mnt/HD_a2/.transmission-daemon

Change to

TRANSMISSION_HOME=/mnt/HD/HD_a2/.transmission-daemon

Save the file.

2. Configure by issuing the following command. Make sure you change USERNAME & PASSWORD to your preferred username & password.

su nobody -c "/ffp/bin/transmission-daemon -f -g /mnt/HD/HD_a2/.transmission-daemon -w /mnt/HD/HD_a2/Downloads -t -u USERNAME -v PASSWORD -a 127.0.0.1,192.168.*.*"

Wait for a while, transmission should be up and running.

3. Verify that transmission is running properly by opening transmission web interface. Type http://<your NAS IP>:9091/ in your browser to access the Web interface. After entering username & password you should see torrent que page.

4. You may now press CTRL-C in putty terminal & issue the following command to start transmission

/ffp/start/transmission.sh start

5. If you need to change the configuration such as to white list IPs to connect to Transmission Client, you may edit the following file

/.transmission-daemon/settings.json

7. You may want to download Transmission Remote GUI for Windows, Linux or Mac OS X.


How to Install Lighttpd & PHP on Dlink DNS-320

I just obtain my new D-link DNS-320 NAS Storage which supposed to replace my older DNS-323 that died recently. As before, I need to install Webserver Lighttpd & PHP. This guide assumed that you have installed Fonz fun_plug in your DNS-320. This guide should work on D-link DNS-325 as well.

I choose fonz fun_plug version 0.5 instead of version 0.7 as I am unable to get it working correctly.

This guides are divided into 3 main section namely download packages, install, configure & finishing up. I also include some optional guides.

Download

1. Download lighttpd packages

2. Download PHP packages

Install

1. Run PuTTY and log into DNS-320

2. Change directory to “/mnt/HD/HD_a2” & create “pkg” folder inside “ffp” folder. If you are copying from a Windows PC you may need to set permission to copy.

cd /mnt/HD/HD_a2
mkdir -p /ffp/pkg
chmod -R 0777 /ffp/pkg

3. Copy all packages downloaded above into the folder “/ffp/pkg

4. Update & install Lighttpd packages

funpkg -u /ffp/pkg/lighttpd-1.4.29-1.tgz
funpkg -i /ffp/pkg/openssl-0.9.8k-1.tgz

5. Install PHP packages

funpkg -i /ffp/pkg/php-5.2.17-3.tgz
funpkg -i /ffp/pkg/curl-7.23.0-1.tgz
funpkg -i /ffp/pkg/libiconv-1.12-3.tgz

Configure

1. Create all folders required by Lighttpd

mkdir -p /ffp/opt/srv/mysql
mkdir -p /ffp/opt/srv/www/pages
mkdir -p /ffp/opt/srv/www/logs
mkdir -p /ffp/opt/srv/tmp

2. Create a symbolic link

ln -s /ffp/opt/srv/ /srv

3. Symbolik link above will be lost when you restart your DNS-320. To make it permanent, edit “/ffp/etc/fun_plug.init” file. If you are editing it from a Windows PC you may need to set permission to edit.

chmod 0777 /ffp/etc/fun_plug.init

4. Open your favoutrite text editor (don’t use notepad or it will corrupt the files) and open “/ffp/etc/fun_plug.init” file. Add the following at the end.

ln -s /ffp/opt/srv/ /srv

5.  Copy Lighttpd & PHP configuration files

cp /ffp/etc/examples/lighttpd.conf-dns320 /ffp/etc/lighttpd.conf
cp /ffp/etc/examples/php.ini-wolfuli /ffp/etc/php.ini

6. Stating up Lighttpd webserver

chmod a+x /ffp/start/lighttpd.sh
chmod a+x /ffp/start/kickwebs_dns320.sh
sh /ffp/start/kickwebs_dns320.sh start
sh /ffp/start/lighttpd.sh start

Finishing up

1. Your Lighttpd with PHP support should be running by now. Root folder of the web server is located at “/ffp/opt/srv/www/pages“. Test it by create a file named “index.php” which contains the following.

<h1>This is normal HTML</h1>
But the <u>following table</u> is generated by PHP:
<?php
phpinfo();
?>

2. Open web browser and point it to “http://dns320-ip/“. Change “dns320-ip” to your DNS-320 IP address. You should see both notmal HTML & PHP generated output. Your DNS-320 admin page had move to “http://dns320-ip:81/”

Optional

1. For me, I would like to change Lighttpd port to “8080” & revert back admin page to port “80“. To do this, I need to edit “/ffp/etc/lighttpd.conf” file. If you are editing it from a Windows PC you may need to set permission to edit.

chmod 0777 /ffp/etc/lighttpd.conf

i. Find the following

server.port = 80

and change it to

server.port = 8080

ii. Find the following

$SERVER["socket"] == ":81" {

and change it to

$SERVER["socket"] == ":80" {

2. I also would like to enable directory listing. On the same “/ffp/etc/lighttpd.conf” file.

i. Find the following

#dir-listing.activate        = "enable"

and change it to

dir-listing.activate        = "enable"

3. To apply the changes, you have to restart Lighttpd.

sh /ffp/start/lighttpd.sh restart

4. By now, your web server serving port should change to “8080” and admin page port back to “80“. Test it on your web browser.