In addition to its impressive feature list, Elgg is an admin's dolly. It can install in the popular Linux web application rollout stack of Linux, Apache, MySQL, and PHP, fondly referred to as LAMP. As MySQL and PHP can run under Windows operating system as well, you can set up Elgg to serve your purpose for such an environment.
Let's look at setting up the Linux, Apache, MySQL, PHP web server environment. There are several reasons for the LAMP stack's popularity. While most people enjoy the freedom offered by these Open Source software, small business and non-profits will also be impressed by its procurement cost: $0.
The critical difference between setting up Elgg under Windows or Linux is installing the operating system. The Linux distribution I'm using to set up Elgg is Ubuntu Linux (http://www.ubuntu.com/). It's available as a free download and has a huge and active global community, should you run into any problems.
Covering step-by-step installation of Ubuntu Linux is too much of a digression for this book. Despite the fact that Ubuntu isn't too difficult to install, because of its popularity there are tons of installation and usage documentation available all over the Web. Linux.com has a set of videos that detail the procedure of installing Ubuntu (http://www.linux.com/articles/114152). Ubuntu has a dedicated help section (https://help.ubuntu.com/) for introduction and general usage of the distribution.
Apache is the most popular web server used on the Internet. Reams and reams of documents have been written on installing Apache under Linux. Apache's documentation sub-project (http://httpd.apache.org/docs-project/) has information on installing various versions of Apache under Linux.
Ubuntu, based on another popular Linux distribution, Debian, uses a very powerful and user-friendly packaging system. It's called apt-get and can install an Apache server within minutes. All you have to do is open a terminal and write this command telling apt-get what to install:
apt-get install apache2 apache2-common apache2-doc apache2-mpm-prefork apache2-utils libapr0 libexpat1 ssl-cert
This will download Apache and its most essential libraries. Next, you need to enable some of Apache's most critical modules:
a2enmod ssl
a2enmod rewrite
a2enmod include
The rewrite module is critical to Elgg, so make sure it's enabled, else Elgg wouldn't work properly.
That's it. Now, just restart Apache with: /etc/init.d/apache2 restart
.
Installing MySQL isn't too much of an issue either. Again, like Ubuntu and Apache, MySQL can boast of a strong and dedicated community. This means there's no dearth of MySQL installation or usage related documentation (http://www.mysql.org/doc/).
If you're using MySQL under Ubuntu, like me, installation is just a matter of giving apt-get a set of packages to install:
apt-get install mysql-server mysql-client libmysqlclient12-dev
Finally, set up a password for MySQL with:
mysqladmin -h yourserver.example.com -u root password yourrootmysqlpassword
You might think I am exaggerating things a little bit here, but I kid you not, PHP is one of the most popular and easy to learn languages for writing web applications. Why do you think we are setting up out Linux web server environment to execute PHP? It's because Elgg itself is written in PHP! And so are hundreds and thousands of other web applications.
So I'm sure you've guessed by now that PHP has a good deal of documentation (http://www.php.net/docs.php) as well. You've also guessed it's now time to call upon Ubuntu's apt-get package manager to set up PHP:
apt-get install libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-mysqli
As you can see, in addition to PHP, we are also installing packages that'll hook up PHP with the MySQL database and the Apache web server.
That's all there is to setting up the LAMP architecture to power your Elgg network.