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...

No comments:

Post a Comment