Installing LAMP stack
I’ve setup another computer at my desk to act as my project repository and backup (I was hoping to migrate my work on the laptop before reformatting it). I’ve already installed KahelOS on it two weeks ago and played with it a bit just to get comfortable.
Finally, I was ready to move the projects but first I got to install the lamp stack. Lamp stands for linux-apache-mysql-php/perl/python. It is a popular free/open source software combination that is used all over the world.
$ sudo pacman -Sy apache mysql php php-apache
After the install, I went to /srv/http and made a html index test file:
/srv/http/index.html
<html>
<head>
<title>Apache Test</title>
</head>
<body>
It works!
</body>
</html>
I browsed on the laptop to check if robin correctly serves html page (robin is the name of the repository/backup computer). Yup! It works. Now, for a php test:
/srv/http/index.php
<?php phpinfo(); ?>
I removed the index.html file and then browsed again. This time it didn’t work. I checked apache’s configuration. The php module wasn’t included. I also found a ‘php5_module.conf’ in /etc/httpd/conf/extra. Quickly scanning it shown that it is the configuration to enable apache to handle php files.
So I added this at the bottom of the apache configuration:
/etc/httpd/conf/httpd.conf
...
LoadModule php5_module modules/libphp5.so
Include conf/extra/php5_module.conf
I didn’t test mysql just yet. I think that it will be better to do that when the projects come in.
Learn more about LAMP…
Loading...
A note on the configuration of php-apache:
Make sure the following lines in httpd.conf are also commented out:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
If the lines are not commented out, sometimes the configuration conflicts and the php loading/configurations are not loaded. I haven’t pinpointed the exact reason for this but I suspect it has something to do with threaded module loading (resulting to randomizations).
(also posted in kahelos.org/forum)
agi - November 10, 2009 at 3:10 pm
I suddenly remembered that ’sudo’ won’t work if logged in as a normal user on a fresh KahelOS install.. I’ll cover that on the next post.
agi - November 10, 2009 at 8:46 pm
Here’s how to configure sudo: http://kahelamp.wordpress.com/2009/11/10/a-week-ago/
agi - November 10, 2009 at 9:56 pm
[...] I already have version 5.3 installed and running (see on a previous post). Now I got to downgrade. Luckily for me, KahelOS is based on Arch, and still has compatibility [...]
Symfonic Downgrade « Kahel-AMP! - November 12, 2009 at 7:40 pm