Difference between revisions of "Joomla 3"

From SME Server
Jump to navigationJump to search
m (Added Webapps category)
(Revised to change ownership and permissions)
Line 41: Line 41:
  
 
===Download and extract the Joomla! package===
 
===Download and extract the Joomla! package===
Download the Joomla! package (either version 3.2.7 if you have chosen not to upgrade PHP, or the most recent version if you have upgraded PHP) to joomla/html and unzip it.  You can do this from the command line like this (substituting the link for the most recent version):
+
Download the Joomla! package (either version 3.2.7 if you have chosen not to upgrade PHP, or the most recent version if you have upgraded PHP) to joomla/html and unzip it.  You can do this from the command line like this (substituting the link for the most recent version).  These commands will also move the .zip file out of your web-accessible space, and set ownership and permissions appropriately.
  
 
  [root@e-smith ~]# '''cd ~joomla/../html'''
 
  [root@e-smith ~]# '''cd ~joomla/../html'''
Line 47: Line 47:
 
  [root@e-smith html]# '''unzip Joomla_3.3.6-Stable-Full_Package.zip'''
 
  [root@e-smith html]# '''unzip Joomla_3.3.6-Stable-Full_Package.zip'''
 
  [root@e-smith html]# '''rm index.html'''
 
  [root@e-smith html]# '''rm index.html'''
 +
[root@e-smith html]# '''mv Joomla_3.3.6-Stable-Full_Package.zip ../files/'''
 +
[root@e-smith html]# '''chown -R apache:www *'''
 +
[root@e-smith html]# '''find . -type f -exec chmod 644 {} \;'''
 +
[root@e-smith html]# '''find . -type d -exec chmod 755 {} \;'''
  
 
===Configure Joomla! using its web installer===
 
===Configure Joomla! using its web installer===
Line 55: Line 59:
 
[[File:joomla_installer4.png|960px]]
 
[[File:joomla_installer4.png|960px]]
  
Since the Joomla! package was extracted as the root user, the web server can't remove the installation folder.  Thus, if you click on the "Remove installation folder" button, you'll get an error message.  You'll need to remove it from the command line, like this:
+
If you receive an error message when you click on the "Remove installation folder" button, you may need to remove it from the command line, like this:
  
 
  [root@e-smith html]# '''rm -rf installation'''
 
  [root@e-smith html]# '''rm -rf installation'''
Line 77: Line 81:
 
  Allow from 192.168.x.0/24
 
  Allow from 192.168.x.0/24
  
--[[User:DanB35|DanB35]] ([[User talk:DanB35|talk]]) 17:33, 10 October 2014 (CEST)
+
--[[User:DanB35|DanB35]] ([[User talk:DanB35|talk]]) 20:01, 10 October 2014 (CEST)

Revision as of 20:01, 10 October 2014

Warning.png Work in Progress:
This page is a Work in Progress. The contents off this page may be in flux, please have a look at this page history the to see list of changes.


PythonIcon.png Skill level: Medium
These instructions assume familiarity with basic shell commands


Installing Joomla! 3 on SME Server 9.0

Overview

Joomla! is a powerful, flexible content management system (CMS) that is in wide use across the Internet. This How-To will cover configuration of the SME 9.0 server to support Joomla! 3, and installation of Joomla! 3 on the SME 9.0 server. It will not cover configuration or use of Joomla! itself; those subjects are covered by the Joomla! documentation and many other sources.

As of this writing, the most recent version of Joomla! 3 is 3.3.6. This version requires PHP 5.3.10 or greater, which is a greater version than installed by default with SME 9.0. You can either upgrade PHP following these instructions, or install Joomla! 3.2.7, which will work with the stock version of PHP.

Installation of Joomla! involves creating an ibay to house Joomla!, creating a MySQL user for Joomla!, downloading and extracting the Joomla! package, and going through the Joomla! web setup.

Create the ibay

Create an ibay for Joomla! to live in. You can call it anything you want, but I'll use joomla for this example. I used the following settings: Joomla ibay.png

Create the MySQL user

You should set up a database user just for Joomla!, rather than using the root user. To do this, log in to your SME server as root and do the following:

[root@e-smith ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 110981
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> grant all on joomla.* to joomla@localhost identified by 'password';
Query OK, 0 rows affected (0.05 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> quit
Bye

You should, of course, replace 'password' above with a secure password.

Download and extract the Joomla! package

Download the Joomla! package (either version 3.2.7 if you have chosen not to upgrade PHP, or the most recent version if you have upgraded PHP) to joomla/html and unzip it. You can do this from the command line like this (substituting the link for the most recent version). These commands will also move the .zip file out of your web-accessible space, and set ownership and permissions appropriately.

[root@e-smith ~]# cd ~joomla/../html
[root@e-smith html]# wget https://github.com/joomla/joomla-cms/releases/download/3.3.6/Joomla_3.3.6-Stable-Full_Package.zip
[root@e-smith html]# unzip Joomla_3.3.6-Stable-Full_Package.zip
[root@e-smith html]# rm index.html
[root@e-smith html]# mv Joomla_3.3.6-Stable-Full_Package.zip ../files/
[root@e-smith html]# chown -R apache:www *
[root@e-smith html]# find . -type f -exec chmod 644 {} \;
[root@e-smith html]# find . -type d -exec chmod 755 {} \;

Configure Joomla! using its web installer

Using a web browser, browse to http://yourserver/joomla. The installer is pretty self-explanatory, as shown below: Joomla installer1.png Joomla installer2.png Joomla installer3.png Joomla installer4.png

If you receive an error message when you click on the "Remove installation folder" button, you may need to remove it from the command line, like this:

[root@e-smith html]# rm -rf installation

Now you can browse to your Joomla! site at http://yourserver/joomla. It should look like this: Joomla site.png

You can go to the administration backend at http://yourserver/joomla/administrator. Once you log in with the admin user and password you specified in the installer, it should look like this:

Joomla backend.png

Security

I wanted to restrict access to the administration backend to my LAN, so an outside user couldn't even get to the login page. To do this, I created an .htaccess file like this:

[root@e-smith html]# nano administrator/.htaccess

The contents of the file look like this:

Order Deny,Allow
Deny from all
Allow from 192.168.x.0/24

--DanB35 (talk) 20:01, 10 October 2014 (CEST)