Joomla

From SME Server
Jump to navigation Jump to search


Joomla for SME Server

  Skill level: medium
The instructions on this page require a basic knowledge of linux.


Maintainer

Dietmar Berteld
mailto:dietmar@berteld.com

Description

With this RPM you can use the popular Content-Management-System (CMS) Joomla on your SME 7.x. You can install it as one single package in a very comfortable way. For more information see http://www.joomla.org/.

Installation and Uninstall

Initially check the current version available from http://mirror.contribs.org/smeserver/contribs/dberteld/joomla/ which at the time of writing is smeserver-joomla-1.5.1-2.noarch.rpm

Download and install using the following commands (Please remember to replace the version number in the command with the currently available version number or the download will fail)

cd /tmp
wget http://mirror.contribs.org/smeserver/contribs/dberteld/joomla/smeserver-joomla-1.5.1-2.noarch.rpm 
yum localinstall smeserver-joomla*.rpm

For uninstall use the following command

rpm -e smeserver-joomla

You can ignore the yum-comments signal event post-upgrade and signal-event reboot.

Use

You can find joomla in the /opt/joomla directory. For using Joomla start your browser with the URL http://servername/joomla and logon with the user admin + password admin as administrator.

Redirection

If you want to redirect your joomla installation to your favorite URL, use this Redirection Tutorial.


  Warning:
For security-reasons, change your admin-password after your first login !



Configuration

Initial configuration (in the Joomla control panel) requires permissions on the configuration.php file to be made web accessible. This should only be done temporarily as anyone can have access to the file when it is in web accessible write mode.

cd to the folder where configuration.php is located eg if in /opt/joomla then do

cd /opt/joomla

or if installed to an ibay

cd /home/e-smith/files/ibays/joomla/html/

to see the current permissions (and you should make a note of them)

ls -al configuration.php

to TEMPORARILY change to a suitable value to allow Joomla control panel to make and save changes

chmod 770 configuration.php

Then make & save your changes in Joomla

Then you MUST change permissions back to safe values to prevent anyone from accessing the config file eg

chmod 640 configuration.php

Have much fun with Joomla as your preferred CMS !

Search Engine Friendly URLS - SEF/SEO

In order to use Joomla SEF URL's you need to do the following:

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla 92joomla

Now edit 92joomla and add a line for the AllowOverride directive as below

$OUT .= "<Directory /opt/joomla>\n";
$OUT .= "    order deny,allow\n";
$OUT .= "    deny from all\n";
$OUT .= "    allow from $allow\n";
$OUT .= "    AllowOverride all\n";
if ($pass)
{
    $OUT .= "    AuthName \"$joomla{'Name'}\"\n";
    $OUT .= "    AuthType Basic\n";
    $OUT .= "    AuthExternal pwauth\n";

Close and save the file, then

expand-template /etc/httpd/conf/httpd.conf
sv t httpd-e-smith

Now assuming joomla is installed in /opt/joomla

cd /opt/joomla
mv htaccess.txt .htaccess

Edit .htaccess

Uncomment the Rewritebase line and change it to

RewriteBase /joomla

Save and close the file. This assumes that the 92joomla template fragment also set

Alias /joomla /opt/joomla

If you have set and wish to use a different URL by

config setprop joomla URL foo

you will need to set

RewriteBase /foo

Equally if you have redirected a VirtualDomain to point to your joomla application directly (www.virtualdomain.com instead of www.virtualdoamin.com/joomla) you will need to set

RewriteBase /
  Note:
You will only be able to use whatever URL you set RewriteBase to in .htaccess even though other aliases might exist. For example if you have redirected a virtualdomain and set RewriteBase to /, /joomla and /foo won't work correctly. You may get to the home page but after that the SEF rewrites will fail


Now, in Joomla Administration go to Global Configuration - Site and set

Search Engine Friendly URLS - yes
Use Apache mod_rewrite      - yes

Save the page, exit Administration and reload your Joomla site