How to setup a local webserver (LAMP) in fedora 9
In this post I am going to write how I was setting up my local webserver in Fedora 9. The server was build up with Apache, MySQL and PHP. Generally known as LAMP.
I am not going to write articles with hundred of lines for each command rather going to show the steps what I did. I believe it will help to many like me.
Important : Before starting to use the command, change the user to root (eg: type su at the command-line and enter the password for the root account)
Step 1. Installig MySQL
First install the MySQL. Use the yum command as follows.
yum install mysql mysql-serverIf you want MySQL server with graphical user interface, use the following command instead
yum install mysql mysql-server mysql-administrator mysql-gui-commonThen we need to add the service to auto start and start the MySQL service.
1 2 3 | chkconfig --add mysqld chkconfig mysqld on /etc/init.d/mysqld start |
Now need to setup password for root account
mysqladmin -u root password PASSWORDReplace the PASSWORD with your password.
Step 2. Installing Apache
Type the following command
yum install httpdThis will install the Apache webserver in the system. After installation, the service must be set to start automatically and start it.
1 2 | chkconfig httpd on service httpd start |
Step 3. Installing PHP
Following command will install the PHP and the necessary component to work with MySQL database.
yum install php php-mysqlNow we successfully setup the LAMP in local system. To ensure the installation, restart httpd
service httpd restart
and then create a PHP script under /var/www/html/index.php and enter this ( <?php phpinfo(); ?> ). Open up the web browser and type http://localhost/
Additional Packages
yum install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpcThats it, next post I will show how to setup the phpMyAdmin to manage mysql database.









Hai,
I landed here after a google search for “setup a local webserver in fedora” and i found this article was really helpfull.
Thank you to the author.
cheers!
This is great job i was looking for something like this , I dint try this but it looks it will work out . I will write when Iam done .Thank you great job.
Welcome Hashim.
I was setting up to my fedora 9 and thought it would be helpful to some one. I am happy to share my experiences with everybody. Please do not forget to comment once you have setup successfully. It might help some others as well.
Nice post,Thank you.I was searching for this for some time now.hope it works in fedora 11
Wonderful article. I been looking for one on a similar note. I guess you always have something up your sleeve.