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

Please post any helpful and useful tips to maximize your fellow ReadyNAS users' experience.

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

Postby kiokoman » Wed May 23, 2012 6:04 am

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:

Code: Select all
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

Code: Select all
nano /etc/frontview/apache/httpd.conf


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

Code: Select all
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:

Code: Select all
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

Code: Select all
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

Code: Select all
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

Code: Select all

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
Last edited by kiokoman on Wed May 30, 2012 12:13 pm, edited 2 times in total.
kiokoman
ReadyNAS Newbie
 
Posts: 14
Joined: Wed May 23, 2012 5:28 am
ReadyNAS: Pro

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

Postby horim80 » Thu May 24, 2012 11:35 pm

Thanks~!!!
User avatar
horim80
ReadyNAS Padawan
 
Posts: 359
Joined: Thu Jul 24, 2008 1:47 am
Location: Anyang, South of Korea
ReadyNAS: Pro

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

Postby Epitome » Wed Jul 18, 2012 5:04 am

I get an error trying to install phpmyadmin:

Code: Select all
Setting up phpmyadmin (4:2.9.1.1-13) ...
dpkg: error processing phpmyadmin (--configure):
subprocess post-installation script returned error exit status 20
Errors were encountered while processing:
phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I install phpmyadmin correctly?
Epitome
ReadyNAS Newbie
 
Posts: 1
Joined: Wed Jul 18, 2012 2:56 am
ReadyNAS: Ultra

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

Postby crnet.de » Fri Jul 20, 2012 3:45 am

Big Thanks - the PHP-Part we shuold nail somewhere.
And: Did you
Code: Select all
apt-get update
before your first Step?
ReadyNASs:
Pro 4 @ Home for my stuff
2 x NVX @ Customer sites
2100 @ Datacenter for VM Storage
User avatar
crnet.de
ReadyNAS User
 
Posts: 55
Joined: Fri Mar 11, 2011 12:38 pm
ReadyNAS: 2100

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

Postby y_nk » Sat Aug 04, 2012 8:11 pm

Hi,

I'm currently trying to play with apache-ssl too.
I've deleted the /frontview/ui/resources/html/redirect.html in order to provide a cool landing page.
However, if i try to reach "/" of my webserver, it redirects me automatically to /admin. I've to type /index.html" to stop it. I read all the http.confg and didnt see any kind of redirection... Any clue ?

Thanks
y_nk
ReadyNAS Newbie
 
Posts: 2
Joined: Sat Aug 04, 2012 8:07 pm
ReadyNAS: Duo v2

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

Postby y_nk » Sat Aug 04, 2012 8:12 pm

My bad, cache issue.
y_nk
ReadyNAS Newbie
 
Posts: 2
Joined: Sat Aug 04, 2012 8:07 pm
ReadyNAS: Duo v2

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

Postby johk » Thu Nov 08, 2012 2:55 am

Hi,
Would this work if I want to run several instances of Joomla on my Readynas NV+v2?
johk
johk
ReadyNAS Newbie
 
Posts: 16
Joined: Thu Nov 01, 2012 4:02 am
ReadyNAS: NV+ v2

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

Postby kullyrai » Mon Dec 17, 2012 6:31 am

Hi,
I recently bought a ReadyNAS Duo v2 (arm) and wanted to set-up my own php webserver on it.

The ReadyNAS has the official firmware RAIDiator v5.3.7

I tried to install PHP5 and phpmyadmin as per the instructions above, but I received the following error message:


Code: Select all
root@ReadyNAS:/# apt-get install nano libapache2-mod-php5 php5 php5-mysql php5-gd phpmyadmin

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libapache2-mod-php5 : Depends: libonig2 (>= 5.2.0) but it is not going to be installed
                       Depends: libqdbm14 (>= 1.8.74) but it is not going to be installed
                       Depends: php5-common (= 5.3.3-7+squeeze14) but it is not going to be installed
                       Recommends: php5-cli but it is not going to be installed
libncurses5-dev : Depends: libc-dev
libncursesw5-dev : Depends: libc-dev
php5 : Depends: php5-common (>= 5.3.3-7+squeeze14) but it is not going to be installed
php5-gd : Depends: libgd2-xpm (>= 2.0.36~rc1~dfsg) but it is not going to be installed
           Depends: libt1-5 (>= 5.1.0) but it is not going to be installed
           Depends: libx11-6 but it is not going to be installed
           Depends: libxpm4 but it is not going to be installed
           Depends: php5-common (= 5.3.3-7+squeeze14) but it is not going to be installed
php5-mysql : Depends: php5-common (= 5.3.3-7+squeeze14) but it is not going to be installed
phpmyadmin : Depends: php5-mcrypt but it is not going to be installed
              Depends: dbconfig-common but it is not going to be installed
              Depends: libjs-mootools (>= 1.2.4.0~debian1-1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Should I proceed with the 'apt-get -f', or could this cause issues?

thanks
kullyrai
kullyrai
ReadyNAS Newbie
 
Posts: 16
Joined: Mon Dec 17, 2012 6:22 am
ReadyNAS: Duo v2

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

Postby kullyrai » Mon Dec 31, 2012 6:14 am

Sorry for bumping the thread, but has anyone else been able to get PHP5 installed on their ReadyNAS Duo v2?

thanks
kullyrai
kullyrai
ReadyNAS Newbie
 
Posts: 16
Joined: Mon Dec 17, 2012 6:22 am
ReadyNAS: Duo v2

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

Postby charliwest » Fri Feb 15, 2013 4:37 pm

Did you ever go ahead with the -f install option?
charliwest
ReadyNAS Newbie
 
Posts: 21
Joined: Tue Jan 19, 2010 12:01 am
Location: Netherlands
ReadyNAS: NV+ v2

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

Postby kullyrai » Sat Feb 16, 2013 2:41 am

Hi charliwest,
No, I didn't, I didn't want to do it unless I got confirmation from someone experienced than me if it would be ok.

Unfortunately, no one who has ever managed to successfully install it has got back to me..
kullyrai
ReadyNAS Newbie
 
Posts: 16
Joined: Mon Dec 17, 2012 6:22 am
ReadyNAS: Duo v2

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

Postby charliwest » Sat Feb 16, 2013 9:45 am

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
charliwest
ReadyNAS Newbie
 
Posts: 21
Joined: Tue Jan 19, 2010 12:01 am
Location: Netherlands
ReadyNAS: NV+ v2

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

Postby kullyrai » Mon Feb 18, 2013 3:49 am

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:
Code: Select all
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)

Code: Select all
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
kullyrai
ReadyNAS Newbie
 
Posts: 16
Joined: Mon Dec 17, 2012 6:22 am
ReadyNAS: Duo v2

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

Postby rampa99 » Sun Mar 31, 2013 1:13 am

you should just add the
Code: Select all
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
ReadyNAS Newbie
 
Posts: 5
Joined: Sat Mar 30, 2013 6:45 am
ReadyNAS: Duo


Return to User Submitted Tips



Who is online

Users browsing this forum: No registered users and 1 guest