From my recent posts it may have become clear that I am “playing around” with Fedora 19, which is currently at Beta level. Besides the “regular” installation with Gnome 3.8 I have created a separate VM on which I installed the LXDE spin. Not for LXDE but for OpenBox which comes included with that spin. The installation was straight forward and I have opted for most of the default settings. With regard to setup I have basically opted to also install the items as I have described in my blog post “Fedora 15 with OpenBox” (only did not install xscreensaver). Furthermore I slightly modified the menu and provided myself with the option to “Log Out”, “Reboot” or “Shutdown” (opposed to only log out which comes with the default menu). The end result of this installation is as shown below.

Fedora 19 with OpenBox

Fedora 19 with OpenBox

After having read about the change in the MySQL license and the fact that Fedora 19 will use MariaDB instead of MySQL, I wondered if setting up a LAMP server with MariaDB would already be possible. This post will describe how I installed a (sort of) LAMP.

The first thing I decided to do differently, after all I was looking at OpenBox because it is lightweight, to replace Apache with a more lightweight webserver. A quick search using yum resulted in finding lighttpd. As they describe on their site:

Security, speed, compliance, and flexibility — all of these describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems.

Furthermore I also wanted php support (for using phpMyAdmin) which requires the installation of lighttpd-fastcgi and php-cli. As such I issued the command
yum install lighttpd lighttpd-fastcgi php-cli

Next I tried whether the web server would start by issuing the command
service lighttpd start

And yes … it did!  ;-)

lighttpd running

lighttpd running

For the configuration of fastcgi I had to use my good friend Google, but it comes down to the following. In the file “/etc/lighttpd/lighttpd.conf” add the line: include “conf.d/fastcgi.conf”. I have added it in the section to load the modules
## Load the modules.
include "modules.conf"
include "conf.d/fastcgi.conf"

Additionally in the file ” /etc/lighttpd/conf.d/fastcgi.conf” the fastcgi.server has to be defined. I have done this as follows:
fastcgi.server = ( ".php" =>
("localhost" =>
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"

Next cd-ed into the director /var/www/lighttpd and created a php directory. In this php directory I created a file called “test.php” with the following content:

Next restarted the web server (not sure if it is necessary, but just to be sure) and checked if it worked. The result …

php test

php test

Next I decided to install the MariaDB server, client and phpMyAdmin by issuing the command
yum install mariadb-server mariadb-client php-mysql phpMyAdmin

Next started the server, which as I understood for compatibility reasons, can be started with the command
service mysqld start

Setting the root password for MariaDB and setting up basic configuration can easily be done with the command

This will take you through some questions for which I followed the suggestions except for the deletion of the test databases. Next, again just to be sure, stopped the MariaDB and the web server and restarted both. Then wanted to test phpMyAdmin but that failed.  :(

So I searched for the installation path of phpMyAdmin and found that it was installed in /usr/share/phpMyAdmin. So I cd-ed into /var/www/lighttpd and created a symlink as follows
ln -s /usr/share/phpMyAdmin/ phpMyAdmin

Now phpMyAdmin also works!

phpMyAdmin running

phpMyAdmin running

All in all there were some little humps to overcome, but in general it was not too hard to install a (sort of) LAMP in Fedora 19 using an alternative web server and the replacement of MySQL, MariaDB.

Now find the time to “play around” some more.  :D

About these ads