Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Installing PHP5 on Readynas Duo v2 (should work on all ARM)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-05-30
08:07 AM
2012-05-30
08:07 AM
Since i'm not a big fan for paying for things that are easily done by myself, I thought
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:
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:
Then find the lines loading modules, for ex. :
Append these lines to this section in the file:
Now find this line:
and change it to:
Now we need to restart apache by typing:
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
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:
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:
sudo /etc/frontview/apache2/httpd.conf
Then find the lines loading modules, for ex. :
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
Append these lines to this section in the file:
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
AddHandler php5-script .php
Now find this line:
DirectoryIndex redirect.html index.html index.htm
and change it to:
DirectoryIndex redirect.html index.html index.htm index.php
Now we need to restart apache by typing:
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
Solved! Go to Solution.
Message 1 of 8
Labels:
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-06-30
07:17 AM
2014-06-30
07:17 AM
For the beginners like me, you can just buy https://rnxtras.com/addons/php-5-4-readynas-5-arm
Worked perfectly well on ma RND2000 ARM 5.3.10
😄
Message 8 of 8
All Replies
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-05-30
01:34 PM
2012-05-30
01:34 PM
Re: Installing PHP5 on Readynas Duo v2 (should work on all A
Now we're going to install MySQL and phpMyAdmin
2. Installing and configuring MySQL
This is a pretty straight forward process. Start by installing the package with apt-get:
Then proceed into the MySQL console by typing:
Now create a user (or as many as you need) with this command:
When you've created all the users you need, proceed with the following:
Write down your freshly created password and store it in a secure location.
For example in a file in /root. A note in your drawer isn't a very good option.
You don't have to create a database at this point since this will be very easily done from phpMyAdmin.
2. Installing and configuring phpMyAdmin
Go to your www-root and download the latest phpMyAdmin version with wget using the URL found here:
In this example we will be using tar.gz.
Extract the file using the following command:
Now change the name of phpMyAdmin into something a little easier to write, for example phpadm by typing the following:
Now you should be able to access phpMyAdmin from your external url followed by /phpadm.
Use the username and password created in MySQL to log in.
2. Installing and configuring MySQL
This is a pretty straight forward process. Start by installing the package with apt-get:
sudo apt-get install mysql-server
Then proceed into the MySQL console by typing:
sudo mysql
Now create a user (or as many as you need) with this command:
CREATE USER '<username>'@'localhost' IDENTIFIED BY '<42-digit password>';
When you've created all the users you need, proceed with the following:
FLUSH PRIVILEGES;
exit
Write down your freshly created password and store it in a secure location.
For example in a file in /root. A note in your drawer isn't a very good option.
You don't have to create a database at this point since this will be very easily done from phpMyAdmin.
2. Installing and configuring phpMyAdmin
Go to your www-root and download the latest phpMyAdmin version with wget using the URL found here:
http://www.phpmyadmin.net/home_page/downloads.php
In this example we will be using tar.gz.
Extract the file using the following command:
sudo tar xvzf <filename>
Now change the name of phpMyAdmin into something a little easier to write, for example phpadm by typing the following:
sudo mv <dirname> phpadm
Now you should be able to access phpMyAdmin from your external url followed by /phpadm.
Use the username and password created in MySQL to log in.
Message 2 of 8
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-06-13
03:07 PM
2012-06-13
03:07 PM
Re: Installing PHP5 on Readynas Duo v2 (should work on all A
hello,
when i try to download/install MySQL and use
sudo apt-get install mysql
i get this response:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql
what could i be doing wrong?
Please help, i would really like to use MySQL.
kind regards,
Tom
when i try to download/install MySQL and use
sudo apt-get install mysql
i get this response:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql
what could i be doing wrong?
Please help, i would really like to use MySQL.
kind regards,
Tom
Message 3 of 8
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-06-14
04:15 AM
2012-06-14
04:15 AM
Re: Installing PHP5 on Readynas Duo v2 (should work on all A
Sorry. I'll update the guide. The package name is mysql-server, not just mysql. 🙂
Message 4 of 8
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-07-17
03:26 AM
2012-07-17
03:26 AM
Re: Installing PHP5 on Readynas Duo v2 (should work on all A
Can I ask a complete newbie question..but when you say "Go to your www-root and download the latest phpMyAdmin"
What do you mean by www-root...I cant find this anywhere and setting up a http service does not seem to help matters.
Also you may wish to correct the line of code below from:
to
What do you mean by www-root...I cant find this anywhere and setting up a http service does not seem to help matters.
Also you may wish to correct the line of code below from:
sudo apt-get install mysq-serverl
to
sudo apt-get install mysql-server
Message 5 of 8
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-07-17
06:26 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-06-29
06:33 PM
2014-06-29
06:33 PM
Re: Installing PHP5 on Readynas Duo v2 (should work on all A
Hey,
I have a ReadyNAS Duo v2 (Série: 2UM221E700702) with firmware RAIDiator 5.3.10..
Would this work on this config?
I'm totally newbie, I'm 17'000 km far from my readynas which I can access with the Remote. How can I access the root and where should I type these commands?
Thanks
Updated : I've installed Enable root SSH access. But still, I don't know what to do next...
Updated number 2 : Downloaded APT_1.0 from http://kb.netgear.com/app/answers/detail/a_id/12272, but I get the message : "Invalid update image" when I try to install the APT utility add-on.
I have a ReadyNAS Duo v2 (Série: 2UM221E700702) with firmware RAIDiator 5.3.10..
Would this work on this config?
I'm totally newbie, I'm 17'000 km far from my readynas which I can access with the Remote. How can I access the root and where should I type these commands?
Thanks
Updated : I've installed Enable root SSH access. But still, I don't know what to do next...
Updated number 2 : Downloaded APT_1.0 from http://kb.netgear.com/app/answers/detail/a_id/12272, but I get the message : "Invalid update image" when I try to install the APT utility add-on.
Message 7 of 8
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-06-30
07:17 AM
2014-06-30
07:17 AM
For the beginners like me, you can just buy https://rnxtras.com/addons/php-5-4-readynas-5-arm
Worked perfectly well on ma RND2000 ARM 5.3.10
😄
Message 8 of 8