Install apache php mysql phpmyadmin on Fedora 13

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5.00 out of 5)

If you want to host a database driven website on your computer, LAMP (Linux Apache MySql Php) or WAMP (Windows Apache MySql Php, use XAMPP to make your life easier) is the way to go. In addition you would need to install phpmyadmin as well to manage the database. Going for linux based web-server is recommended just for the sake of convenience and security, giver you are comfortable with it.

Step 1: Install mysql client and server in the first step. Become root by typing “su -“ at a terminal

yum install mysql mysql-server

After the installation you can restart the mysql-server by doing this

/etc/init.d/mysqld restart

Next you need to setup the root password for the server, start the setup process by doing this


You would be asked for the current root password which is blank to begin with, next you would be asked to set the new root password for the mysql server, after which you would be asked a few Y/n questions, answers to which are not difficult to guess. I chose Y for all of them.

Step 2: Install apache2 its called httpd inside Fedora after the installation start the server

yum install httpd
/etc/init.d/httpd start

Now you can test if your web-server is up and running by opening the http://localhost in your web browser. You should see a page like this.

Step 3: Time to install and test php support. Install it by doing

yum install php mod_suphp

Before we test for php support, you need to restart http server by doing this

/etc/init.d/httpd restart

Now create a test.php file using your favorite text editor, say gedit

gedit /var/www/html/test.php

and paste the following content in it and save the file.


Remember: the /var/www/html is your root web folder, whatever you put in there would become visible to the rest of the world via your web server. Now open the file you created above by pointing your browser to http://localhost/test.php, if you have followed the steps so far correctly you should see something like this

Step 4: Install additional php related packages, especially the one necessary to communicate with mysql and other webserver modules etc.

yum install php-mysql php-magickwand  php-devel php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magpierss php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel

Restart the http server  by doing

/etc/init.d/httpd restart

Now to ensure that the web server as well as mysql server starts on its own at every boot, do the following (while being root with su – and not su alone)

chkconfig --levels 235 httpd on
chkconfig --levels 235 mysqld on

Step 5: Finally install phpmyadmin

yum install phpmyadmin

Restart apache (httpd) again. If you want to allow phpmyadmin connection from other locations other than localhost, then modify the following file

gedit /etc/httpd/conf.d/phpMyAdmin.conf

by commenting out the following lines

<Directory /usr/share/phpMyAdmin/>
order deny,allow
deny from all
allow from
allow from ::1

basically replacing the lines above with

#<Directory /usr/share/phpMyAdmin/> #   order deny,allow #   deny from all #   allow from #   allow from ::1 #</Directory>

Now you are all set just restart the httpd again by doing

/etc/init.d/httpd restart

And you should have a perfect web server running. You can access the phpmyadmin from http://your_server_address/phpmyadmin

You might also like

Install Apache MySQL PHP phpmyadmin (LAMP) on Linux Mint 11 Katya Installing...
Install Apache MySQL PHP phpmyadmin (LAMP) on Ubuntu 11.04 Installing...
Install Apache MySQL PHP phpmyadmin (LAMP) on Ubuntu 10.04 or Mint Linux 9 Installing...
Install Apache php phpmyadmin MySql If you want...

About the Author

has written 346 posts on this blog.

Meditating towards his "nerdvana", lifehacker is a teacher by the day and a nerdy blogger by the night. He lives to learn and yearns to learn living.

12 Comments on “Install apache php mysql phpmyadmin on Fedora 13”

  • ld wrote on 21 June, 2010, 11:37

    You’re missing a ‘d’ in ‘httpd’ above in Step 2.

    Like or Dislike: Thumb up 0 Thumb down 0


  • lifehacker wrote on 21 June, 2010, 12:33

    Thanks for pointing it out, sorry about the typo!

    Like or Dislike: Thumb up 0 Thumb down 0


  • Pierre Loubert wrote on 3 August, 2010, 10:25

    How would I go about setting up phpMyAdmin with virtual hosts? I’ve been trying to figure this out for a week now, install, uninstall, diffrent sites have diffrent installation instructions but none cover installation with vhosts.

    I’m pretty new to Linux and I admit I’m a bit discouraged. I have installed with much complications LAMP but it is running with no errors!

    I read the documentation included with phpMyAdmin and they just have us copy the files in a sub-directory of the server, but I get file not found errors with this method.

    Like or Dislike: Thumb up 0 Thumb down 0


  • Khoa wrote on 19 October, 2010, 5:19

    Thank you for the article. It works like a charm! I got no single problem following your guide from start to the end. Very well written.

    Like or Dislike: Thumb up 0 Thumb down 0


    lifehacker Reply:

    Most welcome @Khoa, Glad to be of help.

    Like or Dislike: Thumb up 0 Thumb down 0


  • moe wrote on 19 December, 2010, 1:02

    Wow I followed the instructions and it worked!!! I did not have to read 20 other forums and 50 wikipedia articles this is AWESOME!!! wait… why was that so easy… did i just install a trojan???

    Thanks again

    Like or Dislike: Thumb up 0 Thumb down 0


    lifehacker Reply:

    @moe, LOL!

    Like or Dislike: Thumb up 0 Thumb down 0


  • Jashid wrote on 2 May, 2011, 7:28

    Good website to refer with…

    Thank you

    Like or Dislike: Thumb up 0 Thumb down 0


  • tamashebi wrote on 22 September, 2011, 3:15

    thanks, i have installed web server on fedora 15!

    Like or Dislike: Thumb up 0 Thumb down 0


  • Mike wrote on 9 May, 2013, 10:05

    In step 4 I get “No package php_xxx available” for all php related packages. Any idea what I have missed? Thanks!!

    Like or Dislike: Thumb up 0 Thumb down 0



  1. Fedora 13 LAMP « MSH
  2. Install LAMP Apache, MySQL, PHP, and phpMyAdmin on Fedora « Justin Tung

Write a Comment

Gravatars are small images that can show your personality. You can get your gravatar for free today!


Copyright © 2019 Hack Your Life!. All rights reserved.
Proudly powered by WordPress. Developed by Deluxe Themes