[HOWTO] Setup MySQL, Apache and PHP in Fedora 15

This is a simple guide to setup LAMP (Linux, Apache, MySQL and PHP). I am assuming you have Linux (Fedora 15) installed. The following commands will install the necessary packages to run Apache, MySQL and PHP.

su #for root login, enter password when prompted
yum install mysql-server
service mysqld start
mysqladmin -u root password PASSWORD_HERE
yum install phpmyadmin

Now, you should have necessary packages installed.
To run the apache and mysql services, enter the following in command prompt. This should be done each time you need to use unless you want those services to start with your OS.

su #for root login, enter password when prompted
service mysqld restart
service httpd restart

The directory where you can put in your files is /var/www/html/ and you can access phpMyAdmin by navigating to http://localhost/phpmyadmin

If you want the services to start with your OS, you will need to run the following:

su #for root login, enter password when prompted
chkconfig --add httpd
chkconfig httpd on
chkconfig --add mysqld
chkconfig mysqld on

Hope this helps.

  • Alex

    Thanks !

  • Shubhamgcool

    thanks a lot

  • eCubeH

    Thanks. Much Simpler than using the tar files. And worked cleanly!

  • Deviousdevil437

    Thanks Dude!

  • mike

    Thank you!

  • Joefb7

    hi new to this, i just installed this because im trying to run some of my own php files to test for a future website. i know what i put down to be the password, but i don’t know what i should put for the user name.

  • Huy Pham

    hi, i had installed with your tutorial but i can’t use mod_rewrite, can you help me?
    i had checked and see mod_rewrite is enabled.

  • Helpd!

  • Ahsan

    As simple as it can be…! Saved my time…

  • Shell Tux

    it’s working on fedora 16!
    Esto funciona en Fedora 16!

  • Unhappy_verse

    Its amazing, working very fruitfully, time consuming.

  • Manikandan

    ya its good working. its help full