View Single Post
  #3  
Old 4th April 2013, 09:54
Hairy Hairy is offline
HowtoForge Supporter
 
Join Date: Mar 2013
Location: USA
Posts: 57
Thanks: 6
Thanked 27 Times in 16 Posts
Default

Quote:
Originally Posted by SunnyD View Post
use the following:

Code:
yum install phpMyAdmin
Please note the case. If you install phpMyAdmin, it will install 3.5.7. If you install phpmyadmin (all lowercase), it will install 2.11.xx.

Also note: phpMyAdmin requires PHP 5.2 and MySQL 5, so if you plan on running with older version or allowing multiple versions of PHP, the newer version of phpMyAdmin may not work for you.
Also, note that the configuring phpMyAdmin is different than phpmyadmin. To setup phpMyAdmin follow these steps:

Code:
yum -y install phpMyAdmin
cp /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php
vim /usr/share/phpMyAdmin/config.inc.php
Then, make sure to change 'cookie' to 'http' like the following:

Code:
$cfg['Servers'][$i]['auth_type'] = 'http';
Then, edit the phpMyAdmin.conf file. Type the following line in your SSH Terminal Window:

Code:
vim /etc/httpd/conf.d/phpMyAdmin.conf
Then, comment out the /usr/share/phpmyadmin block as folows:

Code:
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

#<Directory /usr/share/phpMyAdmin/>
#   <:IfModule mod_authz_core.c>
#     # Apache 2.4
#     <RequireAny>
#       Require ip 127.0.0.1
#       Require ip ::1
#     </RequireAny>
#   </IfModule>
#   <IfModule !mod_authz_core.c>
#     # Apache 2.2
#     Order Deny,Allow
#     Deny from All
#     Allow from 127.0.0.1
#     Allow from ::1
#   </IfModule>
#</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/lib/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/frames/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc.  This may break your mod_security implementation.
#
#<IfModule mod_security.c>
#    <Directory /usr/share/phpMyAdmin/>
#        SecRuleInheritance Off
#    </Directory>
#</IfModule>
Then, restart httpd with the following:

Code:
/etc/init.d/httpd restart
I Hope that helps someone!
Reply With Quote