05 June, 2008

Joomla Installation Notes

Joomla is an open-source content management system licensed under the GPL license.
Today I tried installing it on my laptop to give it a go. The thought is maybe to use
some of the tools in a personal project. So here are some installation details.
The linux distribution installed on my laptop is Ubuntu 8.04LTS.

Steps:
1) Install LAMP subsystem
apt-get instal apache2 php5-mysql libapache2-mod-php5 mysql-server

The post-processing script requests for the mysql server a username (root) and a password (supplied at prompt).

2) Create Database

mysql -u root -p

The previously supplied password is provided and we enter the command line of the mysql server.

show databases;

Will show the databases.

drop database db_name;

Will remove the database

To useful links here and here

create database joomla;

To create a database for joomla!

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON joomla.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';

Set's a user and a password and gives the right permissions.


FLUSH PRIVILEGES;

quit

To quit mysql.

3) Allow userdirs in apache

In /etc/apache2

do symbolic links in the mods-enabled directory to userdir.load userdir.mod
ln -s ../mods-available/userdir.load userdir.load
ln -s ../mods-available/userdir.conf userdir.conf

Edit as needed the userdir.conf file (by default the public_html directory is enabled at
each user directory).

And finally apply the changes by restarting apache:
/etc/init.d/apache2 restart

4) Now create in the home directory the public_html directory
and download and extract the jumla tar-ball.

tar xvfj Joomla_1.5.3-Stable-Full_Package.tar.bz2

cd joomla_dir

touch configuration.php; chown www-data.www-data configuration.php;


The following commands should help fix the permissions
<pre>cd joomla
PLACES='
administrator/backups
administrator/components
administrator/language
administrator/language/en-GB
administrator/modules
administrator/templates
components
images
images/banners
images/stories
language
language/en-GB
language/pdf_fonts
modules
plugins
plugins/content
plugins/editors
plugins/editors-xtd
plugins/search
plugins/system
plugins/user
plugins/xmlrpc
tmp
templates
cache
administrator/cache
'
for i in $PLACES; do
sudo chown -R www-data:www-data $i
done
</pre><pre>find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

5) Now the web installation of joomla can commence.
Point a browser to the joomla directory and follow the installation steps.

6) As instructed by the web installer, delete the installation directory and we are ready
to go!!!!

Check permissions by going in the admin interface and selecting directory permissions. There everything should appear as writeable.


Some small notes:
a) .htaccess can be used to control php behaviour locally for the joomla installation
b) max upload size should probably be modified, by editing php.ini, to a larger size.