How-To setup Fedora Linux 15 as LAMP server

This short guide demonstrates how to setup Fedora 15 as a LAMP server containing Apache, PHP, Perl, Python, Ruby and MySQL.

You have to use the shell and be able to use the machine as  root.


sudo
yum install httpd
yum install php php-devel php-gd php-imap php-ldap php-mysql 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 curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
yum install mysql mysql-devel mysql-server
yum install httpd-devel ruby ruby-devel
yum install mod_python
yum install mod_perl
yum install perl-HTML-Parser perl-DBI perl-Net-DNS perl-Digest-SHA1 perl-ExtUtils-AutoInstall perl-NetAddr-IP perl-Archive-Tar
/etc/init.d/httpd restart

Now you have got everything installed except for mod_ruby – so that`s the next step;

cd /tmp
wget http://modruby.net/archive/mod_ruby-1.3.0.tar.gz
tar zxvf mod_ruby-1.3.0.tar.gz
cd mod_ruby-1.3.0/
./configure.rb --with-apr-includes=/usr/include/apr-1
make
make install
/etc/init.d/httpd restart

You have to add mod_ruby by hand in /etc/httpd/conf.d/ruby.conf
By adding

LoadModule ruby_module modules/mod_ruby.so

31 thoughts on “How-To setup Fedora Linux 15 as LAMP server

  1. Hello Ramon

    You saved my day. I install fedora for first time and stuck in it. But your guide help to install amp tools for web development.

    Thanks Man.

  2. Hello, thanx for the tut. By the way, do I need the xyz-dev, odbc and mssql libraries, as well as the perl and python ones if I just wanna install a simple PHP mysql training place on my virtualbox, learn html,js,xml,php&mysql synatx, and maybe try to develop a few themes for some of the popular CMS’es (DRUPAL, Joomla, WordPress…) . I’m aready somewhat experienced in basics of those. Not interested in Perl and Python, at least for now.

      • Thanks dude, yours too.

        By the way, I have installed (100% by your instructions) LAMP on a Fedora with LXDE on VirtualBox and gave it a static IP in my own home network. Now inside of the VBox I see the fedora start page and all, but when I call for it from the Host OS Browser (Win XP) I don’t get a response. Before I was able to do this with Ubuntu server, OpenSSH and default LAMP installation (but I broke the VBox down while trying to install Openbox GUI). Any ideas? And another q: why was Apache root directory on Ubuntu in /var/www and on fedora in /var/www/html? Thanks for your quick response 🙂

  3. Hey,

    Am getting this error on fedora 15. Help

    [root@localhost mod_ruby-1.3.0]# ./configure.rb –with-apr-includes=/usr/include/apr-1
    checking for a BSD compatible install… /usr/bin/install -c
    checking whether we are using gcc… yes
    checking Ruby version… 1.8.7
    checking for static Apache module support… no
    checking for dynamic Apache module support… ./configure.rb:171: command not found: apxs -q INCLUDEDIR
    ./configure.rb:171: command not found: apxs -q LIBEXECDIR
    configure.rb: error: failed to exec apxs
    [root@localhost mod_ruby-1.3.0]#

      • Thanks, but httpd-devel asked me for many dependencies while package apache2-devel was not found. I installed LAMP successfully though.

    • Very many thanx Ramoonus. First i wonder if this creates any problem regarding the fact that the LoadModule for ruby does not work and then what to do about it, and then how the hell do you learn this stuff I had to go through hell before I found your tutorial…. But anyway, keep it up! Great work.

      • the ruby part might be outdated and therefore cause problems

        how do I learn this? from books…

      • Thanks man for the good work. ja bless. i have a small problem . need to extend my linux partion am using fedora 15 distro. how do i do this ? ext4 filesys.

        thanks

      • you should look into the tool; gpart or the gparted linux distribution
        this tool allows easy partitioning
        but beware … its not fool proof

  4. Ramoonus,

    iam getting an error,iam unable to log into mysql,when iam opening localhost/phpmyadmin its asking for user and password..please help

  5. Cool after installing how to lunch te server.? where you i put my php file etc.. I’m a an old windows user -)

  6. hi

    this is very use full link..i use always when install new system and phpmyadmin…

    wow..

  7. very use full for the beginners. Thanks for nice information it saved my time…thanks a lot..

  8. Very useful and provides me everything that is required at the time of working with LAMP server in My Fedora 15 Operating system
    Thanks a Lot

Leave a Reply

Your email address will not be published. Required fields are marked *