Installing Apache, PHP, PhpMyadmin and MySQL on Fedora Core

1. Install Apache (httpd), PHP, MySQL (server and client),
   and the component that allows php to talk to mysql. 

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

2. Configure the new services to start automatically 

   /sbin/chkconfig httpd on
   /sbin/chkconfig --add mysqld
   /sbin/chkconfig mysqld on
   /sbin/service httpd start
   /sbin/service mysqld start
  3.setup the mysql database root password.
    # mysqladmin -u root password 'new-password'    
  
  4.After set the password start the localhost
    # /etc/init.d/httpd start

open the browser and give this URL http://localhost/ the default
test page will display.

Test php:

The document root of the default web site is  /var/www/html.
We will now create a small PHP file (info.php) in that directory
create the php file in the name of info.php

#vim /var/www/html/info.php

<?php
    phpinfo();
 ?>

Now we call that file in a browser (e.g. http://localhost/info.php):

To get more MySQL support in PHP.

#yum install php-mysql php-gd php-imap php-ldap php-odbc
 php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand
 php-magpierss php-mapserver php-mbstring php-mcrypt
 php-mhash php-mssql php-shout php-snmp php-soap php-tidy


Now restart Apache2:

# /etc/init.d/httpd restart

Now reload http://localhost/info.php in your browser and scroll down to

the modules section again. You should now find lots of new modules there,

including the MySQL module:

phpMyAdmin:

phpMyAdmin is a web interface through which you can manage 

your MySQL databases.

#yum install phpmyadmin

Restart Apache:

# /etc/init.d/httpd restart

then go to browser give this on your URL 
http://localhost/phpmyadmin/
 




		
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: