2010/12/24

How to install Apache PHP MySQL PhpMyAdmin on Fedora


installing Apache, PHP, MySQL




    yum -y install httpd php mysql mysql-server php-mysql

 

installing php extensions (optional)



    yum -y install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring



that MySQL starts automatically whenever the system boots


    chkconfig --add mysqld
    /etc/init.d/mysqld on 

 

start MySQL


 

    /etc/init.d/mysqld start

 
set password


 

    mysqladmin -u root password 'yourpassword'


 

that Apache starts automatically whenever the system boots


 

    chkconfig httpd on


 

start Apache

 

    /etc/init.d/httpd start


test  


    vi /var/www/html/phpinfo.php


<?php
    phpinfo();
?>
 


open a browser ( http://localhost/phpinfo.php )









    yum -y install phpmyadmin

    vi /etc/httpd/conf.d/phpMyAdmin.conf



...

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from 127.0.0.1
   Allow from ::1
</Directory>
Alias /phpmyadmin /usr/share/phpMyAdmin

...



change the authentication in phpmyadmin from cookie to http

 

    vi /usr/share/phpMyAdmin/config.sample.inc.php

 
...

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';

...
 


    /etc/init.d/httpd restart


 

open a browser ( http://localhost/phpmyadmin/ )




 

httpd.conf location(/etc/httpd/conf/httpd.conf)
php.ini location(/etc/php.ini)





finished!