NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

kiokoman's avatar
kiokoman
Aspirant
May 23, 2012

How to Install PHP5 and phpmyadmin joomla(arm) duo v2

work on T33 and T41
you need to Enable Root SSH on the ReadyNAS.

my english is not very good so i will make it short:


apt-get install nano libapache2-mod-php5 php5 php5-mysql php5-gd phpmyadmin


after that you have to manually configure /etc/frontview/apache/httpd.conf
i hate vi so i'm using nano


nano /etc/frontview/apache/httpd.conf


just add this after "LoadModule addonhandler_module /frontview/lib/mod_addonhandler.so" :


LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
AddType application/x-httpd-php .php
PHPIniDir /etc/php5/apache2



and this at the end of the file:


Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php

<IfModule mod_php5.c>
AddType application/x-httpd-php .php

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>


after that save the file (ctrl+x y) and restart apache


killall apache-ssl
apache-ssl -f /etc/frontview/apache/httpd.conf


php shouldnow work, and phpmyadmin is available to http://ip-readynas/phpmyadmin

to be able to use phpmyadmin you must create a user with mysql command, for example:
change username and some_pass with what you desire


mysql -u root
GRANT ALL PRIVILEGES ON *.* TO
'username'@'localhost'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;


if u want to use joomla u must create a database
change the username and some_pass accordingly



mysql> CREATE DATABASE page;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON page.* TO "username"@"localhost"
-> IDENTIFIED BY "some_pass";
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

mysql> EXIT


you are now ready to configure joomla

15 Replies

Replies have been turned off for this discussion
  • I now also get
    tzdata-java : Depends: tzdata (= 2012g-0squeeze1) but 2012c-0squeeze1 is to be installed
    Thats the one I'm really worried about as it will update the version and not sure how the readynas will react. If you only have what you posted above I believe you're ok, its just going to install extra bits not replace anything, but not 100% sure
  • Hi charliwest,
    Thanks for the tip.
    I went ahead with the 'apt-get install -f' command, and after it had completed I then ran the main 'apt-get install' command with all the php packages again, and I now have php installed and working.
    phpmyadmin also works, although I have noticed that when I try to start mysql, I get the following errors:

    root@ReadyNAS:~# /etc/init.d/mysql status
    MySQL is stopped..
    root@ReadyNAS:~#
    root@ReadyNAS:~#
    root@ReadyNAS:~#
    root@ReadyNAS:~# /etc/init.d/mysql start
    Starting MySQL database server: mysqld ..
    Checking for corrupt, not cleanly closed and upgrade needing tables..
    root@ReadyNAS:~# Could not open required defaults file: /etc/mysql/debian.cnf
    Fatal error in defaults handling. Program aborted
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    ^C
    root@ReadyNAS:~#


    After this though, it is working and I can connect to mysql, both via command line and phpmyadmin and access the databases (created new user and test database for web development testing)


    root@ReadyNAS:/etc/mysql#
    root@ReadyNAS:/etc/mysql# ps -ef | grep mysql
    root 3864 1 0 10:24 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe
    admin 3979 3864 0 10:24 pts/0 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=admin --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
    root 3980 3864 0 10:24 pts/0 00:00:00 logger -t mysqld -p daemon.error
    root 4261 3573 0 10:51 pts/0 00:00:00 grep mysql
    root@ReadyNAS:/etc/mysql#


    Is there a way to remove the startup errors, and also have mysql start automatically on ReadyNAS startup?

    thanks
    kullyrai
  • you should just add the
    apt-get update
    apt-get install -f


    at the start of the tutorial cause it was what was missing to make it work for me.
  • rampa99 wrote:
    you should just add the
    apt-get update
    apt-get install -f


    at the start of the tutorial cause it was what was missing to make it work for me.


    I can tell you from bitter experience that it's not a good idea to go forcing (-f) apt to ignore errors willy nilly. Imagine an unbootable system and TBs of data lost.

  • sudo killall apache-ssl
    sudo apache-ssl -f /etc/frontview/apache/httpd.conf


    is there a way to run this command on boot as when i restart i loose it booting this httpd.conf

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More