i'd take the time to write down how i went about to install and configure PHP5, MySQL and phpMyAdmin
on the ReadyNAS Duo v2. (pun partially intended, although readynasxtras provide a whole set of other
packages as opt in the payed add-on...)
This assumes you've already got EnableRootAccess up and running.
1. Installing and configuring PHP5.
First off, we need to install the PHP5-package with apt-get. Log in to your NAS via SSH to get started.
As the security aware users we are (;-)) the root account is ofc disabled for login, so we'll have to
do these operations as sudoers instead. Type:
- Code: Select all
sudo apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi
Some of the packages will probably be marked as installed or set to manually. This is natural so just
type Y and sit back while the packages is being installed.
After this we have to add the php5_module and trigger php-files to be handled by the php5-module.
Type:
- Code: Select all
sudo /etc/frontview/apache2/httpd.conf
Then find the lines loading modules, for ex. :
- Code: Select all
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
Append these lines to this section in the file:
- Code: Select all
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
AddHandler php5-script .php
Now find this line:
- Code: Select all
DirectoryIndex redirect.html index.html index.htm
and change it to:
- Code: Select all
DirectoryIndex redirect.html index.html index.htm index.php
Now we need to restart apache by typing:
- Code: Select all
sudo killall apache-ssl
sudo apache-ssl -f /etc/frontview/apache/httpd.conf
You should now be able to use PHP on your ReadyNAS!
I'm going to write an instruction for how to install and configure MySQL and phpMyAdmin as well in the
upcoming posts but since I have to leave now this will have to do for the time being.
Cheers,
Simon
