Creating a LAMP server Fedora Core


This was done on Fedora Core 10 OS but I suspect will work with most version above. The original guide is here

But the brief guide is as follows

yum install httpd

chkconfig httpd on

yum install mysql mysql-server

chkconfig mysqld on

yum install php php-mysql

if you want python and perl
yum install mod_python MySQL-python
yum install perl mod_perl perl-DBD-mysql

service httpd start

To just test if this works turn off the firewall
service iptables stop

If you want to perminatly turn it off
chkconfig iptables off

Then issue this

echo “<?php phpinfo(); ?>” > /var/www/html/index.php

Open a web browser and http://x.x.x.x where x is the server ip address or name, you should get a php config page. If you don’t then you are on your own I am afraid, start by checking the httpd logs.

To remove the text file

rm -f /var/www/html/index.php

You now have a working LAMP server

Sometime you will need the mod_rewrite module

vi /etc/httpd/conf/httpd.conf

Add this line

RewriteEngine on

Also change this line

AllowOverride None to    AllowOverride all

Note I think this should only be done on internal and test servers, please check this setting out before you put it into production

For more details on the RewriteEngine see here

Don’t forget to restart the httpd service everytime you make a change to this file

service httpd restart

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