Table of Contents
apt-get
apt-get
is the package management system for Debian and as such contains packages compiled for a number of architectures/systems, including the Netgear ReadyNAS Duo. This means you can install programs/applications from the huge plethora of packages that are in the Debian repositories.
NB - it is possible that apt-get
is already installed on your system (if you're using an x86 based ReadyNAS) by default as part of the System Toolbox, I never checked this first, and instead installed the APT
package directly (as opposed to part of the System Toolbox Add-on). If you're using a non-x86 (i.e. sparc) based system like the ReadyNAS Duo I am using you will need to follow the instructions below.
Installation
- Download the APT package and install it from Frontview.
- Ensure you have Enabled Root SSH.
- ssh to your ReadyNAS as root (or if you've disabled root ssh connect as normal user and
su
to root). - Update the
apt-get
database : <code bash> ReadyNAS:~/ # apt-get update </code> - Thats it, all done, you now have up-to-date
apt-get
repositories for your ReadyNAS at your disposal.
Installing packages
There are a number of useful packages that are worth installing and configuring that are either pre-requisites to other tasks described within these pages or will save you a lot of time/effort.
Warning : Be very careful when installing packages with apt-get
, you can easily mess up your system because sometimes apt-get
decides that the libraries and packages you have installed need updating/replacing. If you are prompted whether to go ahead with the install of a given package, look very carefully at exactly what is being installed, upgraded and removed. I personally would strongly recommend not upgrading or removing any packages.
bzip2
A common compression format for which the ReadyNAS does not come equipped to handle, so its useful to install this. As root
…
ReadyNAS:~/ # apt-get install bzip2
nano
The default text editor on the ReadyNAS is vi and being an emacs user I find it awkward to use. However, I use nano on my gentoo systems all the time for quick and fast editing of text files and its far easier and intuitive to use. Thankfully there is a version in apt-get
repositories install it as root using
ReadyNAS:~/ # apt-get install nano
You can now use nano to edit text files using nano /path/to/filename
. The common commands and key-strokes for cutting, pasting, saving and exiting are shown at the bottom of the screen, but when you want to save changes and exit, use Ctrl+o
to write the file and then Ctrl+x
to exit.
keychain
Whilst you have ssh access to your ReadyNAS you currently have to enter your password each and every time you want to log in. Keychain allows password-less automatic ssh access between hosts. ToDo - Work out if this is possible and finish writing up!
lshw
Its useful to know what hardware there is inside a given system and lshw is the ideal tool for finding this out (it even produces html output!).
ReadyNAS:~/ # apt-get install lshw
tree
tree is a very handy utility for displaying the directory and file structure within a given path, and is something I commonly use. It wasn't already installed on the ReadyNAS so I decided to install it as I knew I'd use it in the future.
ReadyNAS:~/ # apt-get install tree
PHP & CGI Environment
This is a pre-requisite to installing DokuWiki as DokuWiki is written in PHP and requires CGI. The instructions are provided in the ReadyNAS Developers Centre, and follow naturally from having installed apt-get
, you only need to install one Apache module for php
- Ssh to your ReadyNAS and as
root
installlibapache2-mod-php5
with: <code bash> ReadyNAS:~/ # apt-get install libapache2-mod-php5 </code> - Ensure that
/etc/frontview/apache/httpd.conf
Apache configuration file hasindex.php
listed underDirectoryIndex
: <code bash> ReadyNAS:~/ # grep 'index.php' /etc/frontview/apache/httpd.conf DirectoryIndex redirect.html index.html index.htm index.php </code> - If this is missing (it wasn't when I did this) use
nano
to edit the file and addindex.php
to the end of the line (nano -w /etc/frontview/apache/httpd.conf
). - Restart the Apache server (I diverge from the official documentation here, instead preferring to use the system
init
script that is designed for starting/stopping/restarting services): <code bash> ReadyNAS$ /etc/init.d/apache2 restart </code>
You're ready to forge ahead with installing DokuWiki.
Links
readynas linux howto nano keychain php cgi