Table of Contents

DNS323 Installation

Hardware

HW: 2 x Samsung 501LJ (500GB)

Preparation

in System-Netwerkgeraete I see:

dlink-A80930 192.168.178.26 00:1C:F0:A8:09:30

so DNS is accessible from the network

enter @ login screen:

  User Name: 'admin'
  Password: (blank)
  
  Configuration - Raid 1 (Mirroring) - 498 GB

formats disks

  Tools - Time
  
    NTP Server: ntp1.dlink.com
    Time Zone: GMT+1
    Daylight Saving Time: EU
  
  Tools - Firmware
  
    Current Firmware Version :  	 1.03
    Firmware Date : 	 03/30/2007

mount DNS323 from LINUX machine called VENUS

  jens@VENUS:~$ ls -latr /mnt
  insgesamt 8
  drwxr-xr-x  2 root root 4096 2006-05-22 16:00 .
  drwxr-xr-x 21 root root 4096 2008-04-17 13:02 ..
  jens@VENUS:~$ sudo mount -t cifs //192.168.178.26/Volume_1 /mnt -o username=admin
  Password:
  jens@VENUS:~$ ls -latr /mnt
  insgesamt 2052
  drwxr-xr-x 21 root root 4096 2008-04-17 13:02 ..
  drwxrwxrwx  1 root root    0 2008-04-25 18:51 .lpd
  drwxrwxrwx  4 root root    0 2008-04-25 18:51 .
  jens@VENUS:~$

You can see above /mnt was empty before mounting and shows now the .lpd directory now. So - it works!

install fun_plug 0.4 and addons

  jens@VENUS:/mnt$ ls -latr
  insgesamt 2052
  drwxr-xr-x 21 root root 4096 2008-04-17 13:02 ..
  drwxrwxrwx  1 root root    0 2008-04-25 18:51 .lpd
  drwxrwxrwx  4 root root    0 2008-04-25 23:53 .
  jens@VENUS:/mnt$ sudo cp -r /home/jens/Download/DNS323NAS_FunPlug_0_4/* /mnt
  jens@VENUS:/mnt$ ls
  addon  fun_plug  fun_plug.d  README.txt
  jens@VENUS:/mnt$             
  
   login as admin
   Configuration - Tools - System - Restart - Wait ~60s
  jens@VENUS:~$ telnet 192.168.178.26
  Trying 192.168.178.26...
  Connected to 192.168.178.26.
  Escape character is '^]'.
  
  
  BusyBox v1.8.1 (2007-11-20 23:39:08 CET) built-in shell (ash)
  Enter 'help' for a list of built-in commands.
  
  / # exit
  Connection closed by foreign host.
  jens@VENUS:~$  

OK!

Getting the NFS server up and running

using telnet

  / # funpkg.sh /mnt/HD_a2/addon/portmap-6.0.tgz
  Unpacking /mnt/HD_a2/addon/portmap-6.0.tgz ...
  Writing package log /mnt/HD_a2/fun_plug.d/packages/portmap-6.0 ...
  Installing files to /mnt/HD_a2/fun_plug.d ...
  Cleaning up
  / # funpkg.sh /mnt/HD_a2/addon/unfs3-0.9.18.tgz
  Unpacking /mnt/HD_a2/addon/unfs3-0.9.18.tgz ...
  Writing package log /mnt/HD_a2/fun_plug.d/packages/unfs3-0.9.18 ...
  Installing files to /mnt/HD_a2/fun_plug.d ...
  Cleaning up
  / # chmod 755 /mnt/HD_a2/fun_plug.d/start/unfsd.sh
  / # sh /mnt/HD_a2/fun_plug.d/start/unfsd.sh start
  Starting rpc.portmap...
  Creating default exports file...
  / 192.168.178.0/24(rw,no_root_squash)
  /mnt/HD_a2 192.168.178.0/24(rw,no_root_squash)
  Starting unfsd...

on LINUX client

  jens@VENUS:/etc$ cd /media
  jens@VENUS:/media$ sudo mkdir meinefreigabe
  jens@VENUS:/media$ sudo mount 192.168.178.26:/ /media/meinefreigabe
  jens@VENUS:/media$ ls
  cardreader  cdrom0  hda2  hda5  meinefreigabe  sda2
  cdrom       hda1    hda3  hda6  sda            sdb2
  jens@VENUS:/media$ cd meinefreigabe/
  jens@VENUS:/media/meinefreigabe$ ls
  bin      etc        lib         proc  sys  var
  default  home       lost+found  root  tmp  web
  dev      image.cfs  mnt         sbin  usr  welcome.msg
  jens@VENUS:/media/meinefreigabe$

as shown above it is now possible to see the files on DNS323

install addon dropbear for ssh support

  jens@VENUS:/mnt$ telnet 192.168.178.26
  Trying 192.168.178.26...
  Connected to 192.168.178.26.
  Escape character is '^]'.
  
  
  BusyBox v1.8.1 (2007-11-20 23:39:08 CET) built-in shell (ash)
  Enter 'help' for a list of built-in commands.
  
  / # funpkg.sh /mnt/HD_a2/addon/dropbear-0.50.tgz
  Unpacking /mnt/HD_a2/addon/dropbear-0.50.tgz ...
  Writing package log /mnt/HD_a2/fun_plug.d/packages/dropbear-0.50 ...
  Installing files to /mnt/HD_a2/fun_plug.d ...
  Cleaning up
  / # which dropbear
  /mnt/HD_a2/fun_plug.d/bin/dropbear
  / # cd /mnt/HD_a2/fun_plug.d/start
  /mnt/HD_a2/fun_plug.d/start # sh dropbear.sh start
  Generating DSA host key...
  Will output 1024 bit dss secret key to '/mnt/HD_a2/fun_plug.d/etc/dropbear/dropbear_dsa_host_key'
  Generating key, this may take a while...
  Public key portion is:
  ssh-dss ...
  Starting dropbear ...
  /mnt/HD_a2/fun_plug.d/start #   
  
 

on VENUS

  jens@VENUS:/etc$ ssh -l admin 192.168.178.26
  admin@192.168.178.26's password:
  
  
  BusyBox v1.8.1 (2007-11-20 23:39:08 CET) built-in shell (ash)
  Enter 'help' for a list of built-in commands.
  
  ~ $ exit
  Connection to 192.168.178.26 closed.
  jens@VENUS:/etc$   

lighttpd web server install

on DNS323

  mkdir /mnt/HD_a2/www
  mkdir /mnt/HD_a2/www/logs
  
  vi /mnt/HD_a2/www/index.html 
  <html>
    <body>
        Hello World from DNS-323
    </body>
  </html> 
  
  funpkg.sh /mnt/HD_a2/addon/lighttpd-1.4.18.tgz
  
  cd /mnt/HD_a2/fun_plug.d/etc
  
  cp /mnt/HD_a2/fun_plug.d/etc/lighttpd.conf-sample /mnt/HD_a2/fun_plug.d/etc/lighttpd.conf
  
  vi /mnt/HD_a2/fun_plug.d/etc/lighttpd.conf
  
     server.document-root        = "/mnt/HD_a2/www/"
     server.port                = 3000   
  
  
  /mnt/HD_a2/fun_plug.d/etc # sh /mnt/HD_a2/fun_plug.d/start/lighttpd.sh start

to verify status (running is what we expect): /mnt/HD_a2/fun_plug.d/etc # sh /mnt/HD_a2/fun_plug.d/start/lighttpd.sh status

if /mnt/HD_a2/fun_plug.d/etc/lighttpd.conf was changed /mnt/HD_a2/fun_plug.d/etc # sh /mnt/HD_a2/fun_plug.d/start/lighttpd.sh restart

for debug (simulates start with error output): /mnt/HD_a2/fun_plug.d/etc # ${SBINDIR}/lighttpd -f ${ETCDIR}/lighttpd.conf

in firefox: http://192.168.178.26:3000/ works OK!

add php support to lighttpd

on VENUS

  jens@VENUS:/mnt$ sudo cp /home/jens/Download/DNS323NAS_FunPlug_0_3/php-5.2.4.tgz /media/meinefreigabe/mnt/HD_a2/addon

on DNS323

  /mnt/HD_a2/www # funpkg.sh /mnt/HD_a2/addon/php-5.2.4.tgz
  Unpacking /mnt/HD_a2/addon/php-5.2.4.tgz ...
  Writing package log /mnt/HD_a2/fun_plug.d/packages/php-5.2.4 ...
  Installing files to /mnt/HD_a2/fun_plug.d ...
  Cleaning up
  /mnt/HD_a2/www #

make sure that you can run “php -v” and “php-cgi -v”

  /mnt/HD_a2/www # which php
  /mnt/HD_a2/fun_plug.d/bin/php
  /mnt/HD_a2/www # php -v
  PHP 5.2.4 (cli) (built: Sep  5 2007 21:33:10)
  Copyright (c) 1997-2007 The PHP Group
  Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
  /mnt/HD_a2/www # php-cgi -v
  PHP 5.2.4 (cgi-fcgi) (built: Sep  5 2007 21:33:09)
  Copyright (c) 1997-2007 The PHP Group
  Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
  /mnt/HD_a2/www #

adjust configuraton

  /mnt/HD_a2/fun_plug.d/etc # vi lighttpd.conf 
  /mnt/HD_a2/fun_plug.d/etc # diff lighttpd.conf lighttpd.conf-sample
  --- lighttpd.conf       Sat Apr 26 16:38:25 2008
  +++ lighttpd.conf-sample        Tue Nov 20 23:43:53 2007
  @@ -21,7 +21,7 @@
   #                               "mod_auth",
   #                               "mod_status",
   #                               "mod_setenv",
  -                               "mod_fastcgi",
  +#                               "mod_fastcgi",
   #                               "mod_proxy",
   #                               "mod_simple_vhost",
   #                               "mod_evhost",
  @@ -37,7 +37,7 @@
  
   ## a static document-root, for virtual-hosting take look at the
   ## server.virtual-* options
  -server.document-root        = "/mnt/HD_a2/www/"
  +server.document-root        = "/mnt/HD_a2/www/pages/"
  
   server.upload-dirs = ( "/mnt/HD_a2/tmp" )
  
  @@ -50,11 +50,11 @@
  
   ## php support
   ## uncomment the following lines and the mod_fastcgi module above
  -fastcgi.server = ( ".php" => ((
  -    "bin-path"  => "/mnt/HD_a2/fun_plug.d/bin/php-cgi",
  -    "socket"    => "/tmp/php-cgi.socket",
  -    "max-procs" => 2
  -)))
  +#fastcgi.server = ( ".php" => ((
  +#    "bin-path"  => "/mnt/HD_a2/fun_plug.d/bin/php-cgi",
  +#    "socket"    => "/tmp/php-cgi.socket",
  +#    "max-procs" => 2
  +#)))
  
  
   ## set the event-handler (read the performance section in the manual)
  @@ -146,7 +146,7 @@
   ######### Options that are good to be but not neccesary to be changed #######
  
   ## bind to port (default: 80)
  -server.port                = 3000
  +server.port                = 8080
  
   ## bind to localhost (default: all interfaces)
   #server.bind                = "grisu.home.kneschke.de"
  @@ -184,10 +184,10 @@
   dir-listing.show-readme     = "enable"
  
   ## enable debugging
  -debug.log-request-header   = "enable"
  -debug.log-response-header  = "enable"
  -debug.log-request-handling = "enable"
  -debug.log-file-not-found   = "enable"
  +#debug.log-request-header   = "enable"
  +#debug.log-response-header  = "enable"
  +#debug.log-request-handling = "enable"
  +#debug.log-file-not-found   = "enable"
  
   ### only root can use these options 
   #
  /mnt/HD_a2/fun_plug.d/etc #  

restart lighttpd

  /mnt/HD_a2/fun_plug.d/etc # sh /mnt/HD_a2/fun_plug.d/start/lighttpd.sh restart
  Starting lighttpd...
  /mnt/HD_a2/fun_plug.d/etc # sh /mnt/HD_a2/fun_plug.d/start/lighttpd.sh status
  running
  /mnt/HD_a2/fun_plug.d/etc #

running is good.
Create a simple php

  /mnt/HD_a2/www # more hello.php
  <html>
   <head>
     <title>PHP-Test</title>
      </head>
       <body>
        <?php echo '<p>Hallo Welt</p>'; ?>
         </body>
         </html>
  /mnt/HD_a2/www #

in firefox: http://192.168.178.26:3000/hello.php

  /mnt/HD_a2/www # vi info.php
  /mnt/HD_a2/www # more info.php
  <?PHP
  phpinfo ();
  ?>
  /mnt/HD_a2/www # 

in firefox: http://192.168.178.26:3000/info.php

OK - works!