Diff for "Joomla"


Differences between revisions 34 and 35
Revision 34 as of 2013-12-02 04:21:27
Size: 9793
Editor: cpe-67-242-170-182
Comment:
Revision 35 as of 2013-12-08 03:24:20
Size: 4646
Editor: cpe-67-242-170-182
Comment: Updated documentation to Ubuntu 13.10 and Joomla 3.1.5
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<Include(Tag/Unsupported)>>

##Tag added: Applies to unsupported versions of Ubuntu

<<Include(Tag/NeedsUpdating)>>
##Tag added: Guide applies to Joomla 1.0; Joomla 1.5 installation differs somewhat and requires additional steps (notably FTP configuration)
Line 10: Line 3:
= About Joomla! = = About Joomla =
Line 12: Line 5:
[[http://www.joomla.org/|Joomla!]] is an award-winning Content Management System (CMS) that will help you build websites and other powerful online applications. Modern CMSes like Joomla allow you to organize and update web-sites without using any local editor; all editing is done online. [[http://www.joomla.org/|Joomla]] is an award-winning content management system (CMS), which enables you to build Web sites and powerful online applications. Many aspects, including its ease-of-use and extensibility, have made Joomla the most popular Web site software available. Best of all, Joomla is an open source solution that is freely available to everyone.
Line 14: Line 7:
This guide applies to Ubuntu 6.06 LTS (Dapper Drake) as well as to 7.04 (Feisty Fawn) == Joomla Community Documentation ==
Line 16: Line 9:
Tested this guide with 10.04 Lucid - works perfectly, with some minor differencies: Jommal provides an [[http://docs.joomla.org/|online collaborative community manual]] for Joomla! users, developers or anyone interested in learning more about Joomla! Currently, they have over 4000 articles written and maintained by Joomla! community members.
Line 18: Line 11:
 * new mysql root password is automatically requested on
 `aptitude install mysql-server` - no need for entering commands manually
 * mambots folder does not exist in the joomla 1.5.21 version.
 `chown -R www-data:www-data $i` issues warnings (that do not harm). See the 2nd example for Joomla 1.5.x.
= Version Information =
Line 23: Line 13:
= Alternative to manual installation = {{attachment:IconsPage/important.png}} This guide was written for Ubuntu Server 13.10 and Joomla 3.1.5. The guide may work for other version of Ubuntu or other Debian based distributions, but they have not been tested. If you have success with using this guide on other versions of Ubuntu or other Debian based distributions please feel free to add a note to this document.
Line 25: Line 15:
Some users may prefer to skip manual installation by using the unofficial pre-integrated [[http://www.turnkeylinux.org/joomla|TurnKey Joomla Appliance]] based on Ubuntu LTS.
Line 27: Line 16:
= Pre-Install Requirements = = Pre-Installation Steps =
Line 29: Line 18:
Note that this guide works for Joomla! 1.0 and Joomla! 1.5. == Install Prerequisites ==
Line 31: Line 20:
''Any new install should be done with the newest 1.5.''

== Install the LAMP stack ==

Use [[InstallingSoftware| any method]] to install the Apache2, Mysql and Php stack. You will need the following packages:
The following command will install the necessary prerequisites for Joomla:
Line 38: Line 23:
apache2 php5-mysql libapache2-mod-php5 mysql-server sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server php5-json phpmyadmin php5-curl unzip
Line 41: Line 26:
Set a mysql-root password (not the same as a root password, but a password for mysql) During installation of mysql you will be prompted for the mysql root user password. You will want to write this information down for use later.
Line 43: Line 28:
{{{
mysql -u root
{{attachment:my-sql-config.png}}
Line 46: Line 30:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
mysql> SET PASSWORD FOR 'root'@'yourhostname' = PASSWORD('yourpassword');
}}}

Where you should change 'yourhostname' in last line. Each successful mysql command will show:

'''Query OK, 0 rows affected (0.00 sec)'''

Quit the mysql prompt:

{{{
mysql> \q
}}}
You should now have a functional LAMP stack and a password for the mysql root user.

Visit [[ApacheMySQLPHP|Apache PHP MySQL]] for more information on LAMP.
= Installation =
Line 65: Line 34:
You should download the latest stable version from the official [[http://www.joomla.org/download.html|Joomla Download]] page. Unpack it and then copy it to your webserver directory.

'''NOTE''' - the default root directory for Apache2 is /var/www. If you intend to use Joomla exclusively you don't need to create a 'joomla' sub-folder as instructed in their official documentation.
Next set two variables for downloading and extracting Joomla.
Line 70: Line 37:
# Change for new version
SOURCEPKG=Joomla_1.5.14-Stable-Full_Package.tar.bz2
SOURCEWWW=http://joomlacode.org/gf/download/frsrelease/10785/42653/Joomla_1.5.14-Stable-Full_Package.tar.bz2
SOURCEPKG=Joomla_3.1.5-Stable-Full_Package.zip
SOURCEWWW=http://joomlacode.org/gf/download/frsrelease/18622/83487/Joomla_3.1.5-Stable-Full_Package.zip
}}}
Line 74: Line 41:
# Get it Once the variables are set you need to make a temporary directory to download the Joomla package, extract it and then delete the zip file.

{{{
Line 78: Line 47:
unzip $SOURCEPKG
rm -f $SOURCEPKG
}}}
Line 79: Line 51:
# Unpack it
tar xvjf $SOURCEPKG
== Move Joomla! ==
Line 82: Line 53:
# Cleanup
rm -f $SOURCEPKG
Next the files need to be moved and the ownership changed
Line 85: Line 55:
# Move {{{
Line 88: Line 58:
sudo chown -R www-data:www-data /var/www/joomla
Line 90: Line 61:
== Configure Access Rights ==

The default folder rights will block various Joomla functions so you need to change the rights. There is the quick/easy way, and the more sophisticated way; choose one: (For Joomla 1.0.x)
== Change Permissions ==
Line 95: Line 63:
# A. Quick but less secure. Allow writing in whole joomla subtree
sudo chown -R www-data:www-data /var/www/joomla

# or B. More secure (recommended). Allow writting only in places Joomla! needs to write to (more secure)
sudo chown -R root:root /var/www/joomla
cd /var/www/joomla
PLACES='
administrator/backups
administrator/components
administrator/modules
administrator/templates
cache
components
images
images/banners
images/stories
language
mambots
mambots/content
mambots/editors
mambots/editors-xtd
mambots/search
media
modules
templates
'
for i in $PLACES; do
    sudo chown -R www-data:www-data $i
done
}}}

For Joomla 1.5.x, use below in your Joomla installation folder.

{{{
sudo chown -R root:root *
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
media
modules
plugins
plugins/content
plugins/editors
plugins/editors-xtd
plugins/search
plugins/system
plugins/user
plugins/xmlrpc
templates
cache
administrator/cache
logs
tmp
'
for i in $PLACES; do
    sudo chown -R www-data:www-data $i
done
}}}

Handle file and directory permissions:

{{{
cd /var/www/joomla
cd /var/www/joomla/
Line 173: Line 68:
== Configure MySQL ==
Line 175: Line 69:
You need to create a new database dedicated to Joomla. You can do this with PhpMyAdmin or via the command line: == Create the Database ==
Line 177: Line 71:
''I believe the Joomla 1.5 install does it automatically, and prompts you for a name'' Next the Joomla database needs to be created. You will be prompted for the password you chose during the install.
Line 185: Line 79:

== Grant Permissions to the Database ==


Next you want to add a user and permissions to the newly created database.
Line 187: Line 87:

mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON joomla.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';
mysql>  GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON joomla.* TO ‘joomla@'localhost IDENTIFIED BY password;
mysql> \q
Line 193: Line 93:
== Modify Joomla Files ==

open libraries/joomla/filter/input.php, modify the file and restart apache
Line 194: Line 98:
mysql> FLUSH PRIVILEGES; sudo nano libraries/joomla/filter/input.php
Line 197: Line 101:
Quit the mysql prompt: find the following
Line 200: Line 104:
mysql> \q $source = preg_replace(‘/&#(\d+);/me’, “utf8_encode(chr(\\1))”, $source); // decimal notation
$source = preg_replace(‘/&#x([a-f0-9]+);/mei’, “utf8_encode(chr(0x\\1))”, $source); // hex notation
Line 203: Line 108:
Open history file for MySQL commands and delete the above SQL, since the password is in readable format! change those lines to the following
Line 206: Line 111:
gedit ~/.mysql_history $source = preg_replace_callback(‘/&#x(\d+);/mi’, function($m){return utf8_encode(chr(’0x’.$m[1]));}, $source); // decimal notation
$source = preg_replace_callback(‘/&#x([a-f0-9]+);/mi’, function($m){return utf8_encode(chr(’0x’.$m[1]));}, $source); // hex notation
Line 209: Line 115:
== Reload Apache2 == == Restart Apache ==
Line 211: Line 117:
You may need to force-reload apache2 so that it knows to use the php module if you haven't done so since you installed the LAMP stack. restart apache
Line 214: Line 120:
sudo /etc/init.d/apache2 restart sudo service apache2 restart
Line 217: Line 123:
= Perform Joomla Installation = == Start the Web Based Setup ==
Line 219: Line 125:
Point your browser to ''localhost/joomla'', and follow the onscreen instructions. after these changes you should be able to continue through the web installer and configure your instance of Joomla. The final screen should look like the one below. Remember to remove the installation directory.
Line 221: Line 127:

== Pre-installation check ==

If everything is listed in green, you may proceed.

{{attachment:screenshot1.jpg}}

== Licence ==

Joomla! is GPLed.

{{attachment:screenshot2.jpg}}

== Database configuration ==

Configure the database name, username and password.

{{attachment:screenshot3.jpg}}

== Name your site ==

Give your site a name

{{attachment:screenshot4.jpg}}

== More site information ==

Enter site URL and administrator user and password

{{attachment:screenshot5.jpg}}

== Finish install and remove installation directory ==


You will be asked to remove the installation directory once configuration is complete.

{{{
sudo rm -R /var/www/joomla/installation/
}}}

{{attachment:screenshot6.jpg}}

Please refer to the [[http://help.joomla.org/content/category/15/99/132/|Joomla! installation manual]] for more details, specially to [[http://help.joomla.org/component/option,com_easyfaq/task,view/id,167/Itemid,268/|Joomla! Administrator's Security Checklist]].

= Basics of Administering Joomla =

There is a "Quick Start Guide" on the official Joomla.org web-site which does a walk-through of the install, as well as using several of the administration features. One thing it does not do is provide a 'philosophical' overview of how Joomla organizes things.

Quick Points:
 *The Administator menus are non-intuitive at first, mostly because they refer to an advanced system of Content Types
 *The most high-level form of editing is done in Extensions > Module Manager.

''This section needs a lot of work. Or just use the official Joomla! documentation!''

== Types of Content ==
'''Sections'''
 *General grouping (with Categories and Articles beneath it)
 *FYI - The 'order' the Sections are listed in the Section Manager is just cosmetic.

'''Categories'''
 *Each Category grouping is assigned to a Section

'''Articles'''
 *Main form of individual content!
 *Must be assigned a Section and Category; you cannot mismatch these, i.e., choose a Category from an unselected Section.
 *Can also be assigned to the Front Page (separate from the required Section/Category assignment)

'''Menu Links'''
 *Each link is assigned a 'type' e.g. blog listing (with assigned Section/Category)

== Types of Layout ==
'''Menus'''
 *Menu items link to pre-defined module-types, or to stand-alone Modules.
 *Not every Template displays every Menu, e.g. RokWebify only displays "top"
 *Menu items can be moved between menus by editing them (in their original location)

'''Modules'''
 *Groups of content which can assigned on-screen areas.
 *Some modules let you add other Content, others are pre-defined, e.g. Breadcrumbs.
 *Module positioning is specified as left, right, or footer.

'''Front Page'''
 *A 'special' screen with it's own layout settings
 *Individual articles can be 'forced' to the Front Page; not recommended except for permanent info.

'''Templates'''
 *Pre-defined set of menus, module positions and artwork.
 *Different templates support different positioning options.
 *If you switch templates you may end-up with unexpected positioning changes, e.g. if a module is 'assigned' to an unsupported position-option.
 *If you switch templates you may lose menus, ie., they'll still be defined in Admin but ignored by template.
 *You can customize the XML/CSS of templates but you risk breaking things.
{{attachment:final-install-joomla.png}}

About Joomla

Joomla is an award-winning content management system (CMS), which enables you to build Web sites and powerful online applications. Many aspects, including its ease-of-use and extensibility, have made Joomla the most popular Web site software available. Best of all, Joomla is an open source solution that is freely available to everyone.

1. Joomla Community Documentation

Jommal provides an online collaborative community manual for Joomla! users, developers or anyone interested in learning more about Joomla! Currently, they have over 4000 articles written and maintained by Joomla! community members.

Version Information

IconsPage/important.png This guide was written for Ubuntu Server 13.10 and Joomla 3.1.5. The guide may work for other version of Ubuntu or other Debian based distributions, but they have not been tested. If you have success with using this guide on other versions of Ubuntu or other Debian based distributions please feel free to add a note to this document.

Pre-Installation Steps

1. Install Prerequisites

The following command will install the necessary prerequisites for Joomla:

sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server php5-json phpmyadmin php5-curl unzip

During installation of mysql you will be prompted for the mysql root user password. You will want to write this information down for use later.

my-sql-config.png

Installation

1. Download Joomla!

Next set two variables for downloading and extracting Joomla.

SOURCEPKG=Joomla_3.1.5-Stable-Full_Package.zip
SOURCEWWW=http://joomlacode.org/gf/download/frsrelease/18622/83487/Joomla_3.1.5-Stable-Full_Package.zip

Once the variables are set you need to make a temporary directory to download the Joomla package, extract it and then delete the zip file.

mkdir joomla
cd joomla
wget $SOURCEWWW
unzip $SOURCEPKG
rm -f $SOURCEPKG

2. Move Joomla!

Next the files need to be moved and the ownership changed

cd ..
sudo mv joomla /var/www/
sudo chown -R www-data:www-data /var/www/joomla

3. Change Permissions

cd /var/www/joomla/
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;

4. Create the Database

Next the Joomla database needs to be created. You will be prompted for the password you chose during the install.

mysqladmin -u root -p create joomla

Where joomla is the name you picked for the mysql database that joomla will use. You can call it anything you want.

5. Grant Permissions to the Database

Next you want to add a user and permissions to the newly created database.

mysql -u root -p
mysql>  GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON joomla.* TO ‘joomla’@'localhost’ IDENTIFIED BY ‘password’;
mysql> \q

You do not want to have Joomla use the mysql root user to access the database. The above command creates a mysql user (other than the mysql root user) with some priviledges to use the joomla database. You will need to chose the yourusername and yourpassword. If the command was successful, activate the new permissions:

6. Modify Joomla Files

open libraries/joomla/filter/input.php, modify the file and restart apache

sudo nano libraries/joomla/filter/input.php

find the following

$source = preg_replace(‘/&#(\d+);/me’, “utf8_encode(chr(\\1))”, $source); // decimal notation
$source = preg_replace(‘/&#x([a-f0-9]+);/mei’, “utf8_encode(chr(0x\\1))”, $source); // hex notation

change those lines to the following

$source = preg_replace_callback(‘/&#x(\d+);/mi’, function($m){return utf8_encode(chr(’0x’.$m[1]));}, $source); // decimal notation
$source = preg_replace_callback(‘/&#x([a-f0-9]+);/mi’, function($m){return utf8_encode(chr(’0x’.$m[1]));}, $source); // hex notation

7. Restart Apache

restart apache

sudo service apache2 restart

8. Start the Web Based Setup

after these changes you should be able to continue through the web installer and configure your instance of Joomla. The final screen should look like the one below. Remember to remove the installation directory.

final-install-joomla.png

Joomla (last edited 2021-10-12 01:49:26 by arthurjohnston)