Monday, June 15, 2009

Home Server Project - Configuring PHPMyAdmin

The steps are getting tougher :) I had to spend a complete day trying to setup phpMyAdmin on the server. It was crazy.

I was able to install php and php-mysql correctly. phpMyAdmin is needed to manage databases using browser. I could otherwise login to CLI and manage things well. Decided to configure phpMyAdmin and it ate up whole day.

First I was stopped by SELinux...

Jun 14 12:16:16 atom setroubleshoot: SELinux is preventing the /usr/sbin/httpd from using potentially mislabeled files (/var/www/phpMyAdmin-3.1.5-english). For complete SELinux messages. run sealert -l b25683a9-e1ea-429d-aa13-4130012ee64d

Tried renaming folders but no luck. One option was to disable SELinux but it was not straightforward either. after a lot of searches and reads, found the simple solution. The error itself asks to run sealert command. Ran it and it tells what to do to stop this from happening!

Next was the Apache authentication prompt. It turned out to be lack of configuration for authusers and authgroups, well not easily again, took another hour I think :)

Now page would just indicate on top corner - PHP 5.2+ required. This was a bummer. I thought it was there, but it wasn't. The DVD ISO was on the client laptop, so thought of copying it over to server and see if php 5.2 was there. The copy software indicated 40 mins ETA for copying over 54Mbps WIFI connection. "Why not copy it by 1Gbps crosscable network?", I asked myself.

The copy broke after connecting using crossover link. Apparently the server lost DNS servers by this and sshd broke. grrrrrrrrr....

Another hour worth of fiddling finally got this done. Just to tell me that the default php that came with installation was 5.1.

Next step was to download PHP 5.2 manually and compile. It was done and next problem - PHP would work fine on cli, just wont enable itself with httpd :|

I decided to go back completely on 5.1. I had avoided pointing to CentOS repo since begining. I tried doing it now. I had to manually edit repo files to replace $releaseserver by "5". And it was faily quick.

Finally at night the brain worked. I installed older version of phpMyAdmin and that was all that I needed to do in morning :) :) :)

Hopefully I can start writing php-mysql toy-code tomorrow!