Tuesday, March 8, 2011

Deploying Elgg: Installation

The instruction provided by Elgg are pretty good, so lets see how it goes:

Step 1. Upload Elgg to Site's document root.

Elgg provides anonymous SVN access so uploading to my web server's root directory was no problem.

[wilktech@elggserver ~]$ cd /var/www/html
[wilktech@elggserver /var/www/html]$ svn co http://code.elgg.org/elgg/trunk elgg
[wilktech@elggserver /var/www/html]$ cd


Step 2. Create data folder for elgg's data. Make sure the web server can write to it.


[wilktech@elggserver ~]$ mkdir /var/www/elggdata
[wilktech@elggserver ~]$ chown apache:apache /var/www/elggdata


Step 3. Create a database.


[wilktech@elggserver ~]$ mysql -uroot -p

...Enter password...

mysql> CREATE database myelggdata;


Step 4. Install your crontab.

Skipping this for now. Will probably bite me in the end.

Step 5. Visit your Elgg site.

Now I get to a nice GUI for finishing the install. The requirements check tells me that I'm missing a few PHP packages. Time to install them:


[wilktech@elggserver ~]$ su -
[root@elggserver ~]$ yum install php-xml
[root@elggserver ~]$ yum install php-ldap
...
[root@elggserver ~]$ yum install php-mstring


Okay refresh and now its complaining that the web server does not have access to create a few files in my elgg directory.  I'll temporarily change permissions...

[wilktech@elggserver ~]$ chmod -R 777 /var/www/html/elgg


Hmmm... didn't work. Wonder why? Oh well, I'll go ahead and do this manually as detailed in the installation instructions. First, return permissions:


[wilktech@elggserver ~]$ chmod -R 755 /var/www/html/elgg



...now copy and edit the files...

[wilktech@elggserver ~]$ cp /var/www/html/elgg/engine/settings.example.php /var/www/html/elgg/engine/settings.php
[wilktech@elggserver ~]$ vi /var/www/html/elgg/engine/settings.php

[wilktech@elggserver ~]$ cp /var/www/html/elgg/htaccess_dist /var/www/html/elgg/.htaccess


Hmmm... Now I get complaints about my data directory not being writable by the web service. Opening up permissions didn't work again. Probably a SELinux problem. I'll need to do some research...

Friday, February 25, 2011

Deploying Elgg: The Server

My web server is my own machine running Fedora 14 running Apache 2.2.17, mysql 5.1.55, and PHP 5.3.5 (also known as the LAMP bundle). Aside from the extra work configuring the server, control over the web server should be nice in the long run since I don't have to deal with the restrictions of a third-party host.

Fedora 14 includes the SELinux firewall which runs with numerous restrictions by default. A cheap and dirty solution to most SELinux headaches is to turn if off. However, I'd like to do this the right way so I'll do my best to manage the SELinux headaches by adjusting permissions as needed. We'll see how that goes.

Deploying Elgg: Ground Zero

This is my first post in what I hope will be a series detailing my experiences deploying Elgg for a private social networking site.  I chose the Elgg platform since it is open-source and has a community of developers providing lots of plug-ins that I would like to use to customize the site.  I'm also new to PHP and thought the experience might expand my horizons as a software developer.

Here goes nothing...