Installing Joomla on Debian Linux
m (→Install xammp: updated xampp version) |
m (Made miscellaneous improvements) |
||
| Line 9: | Line 9: | ||
You will need to install apache2, mysql-server-5.0, mysql-client-5.0 and php5 in order to have a web-server for Joomla!. | You will need to install apache2, mysql-server-5.0, mysql-client-5.0 and php5 in order to have a web-server for Joomla!. | ||
| − | === | + | === XAMPP or LaMp? === |
| − | + | XAMPP automatically configures Ownership LaMp requires use of the CHOWN command. | |
| + | == XAMPP == | ||
| + | Download [http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/ XAMPP] for Linux to your your Home folder. | ||
| − | == | + | === Install XAMPP === |
| − | + | Open Terminal and enter: | |
| − | = | + | <source lang="bash"> |
| − | + | sudo tar xvfz xampp-linux-1.7.4.tar.gz -C /opt | |
| − | + | </source> | |
| − | (replace ''xampp-linux-1.7.4.tar.gz'' with the version of | + | |
| + | (replace ''xampp-linux-1.7.4.tar.gz'' with the version of XAMPP you downloaded). | ||
It has been reported that the MYSQL database of xampp 1.7.4 does not work with Joomla 1.5.22 | It has been reported that the MYSQL database of xampp 1.7.4 does not work with Joomla 1.5.22 | ||
This installs ... Apache2, mysql and php5 as well as an ftp server. | This installs ... Apache2, mysql and php5 as well as an ftp server. | ||
| − | + | ||
| − | + | <source lang="bash"> | |
| + | sudo /opt/lampp/lampp start | ||
| + | </source> | ||
and | and | ||
| − | + | <source lang="bash"> | |
| + | sudo /opt/lampp/lampp stop | ||
| + | </source> | ||
starts/stops all the services | starts/stops all the services | ||
| − | === Test your | + | === Test your XAMPP localhost server === |
Open your Browser and point it to | Open your Browser and point it to | ||
http://localhost | http://localhost | ||
The index.php will redirect to | The index.php will redirect to | ||
| − | http://localhost/ | + | http://localhost/xampp |
There you will find instructions on how to change default usernames/passwords. On a PC that does not server files to the Internet or LAN then changing the defaults is personal choice. | There you will find instructions on how to change default usernames/passwords. On a PC that does not server files to the Internet or LAN then changing the defaults is personal choice. | ||
| Line 51: | Line 58: | ||
Create a folder for your Joomla on the localhost server | Create a folder for your Joomla on the localhost server | ||
| − | FTP the unpacked Joomla installation files to the newly created Joomla folder. | + | FTP the unpacked Joomla installation files to the newly created Joomla folder. |
| − | + | ||
'''Important:''' | '''Important:''' | ||
| − | * The | + | * The XAMPP installation sets the correct Ownership of the files and permissions. |
* Using the '''CHOWN command''' will '''cause Ownership problems with xampp'''. | * Using the '''CHOWN command''' will '''cause Ownership problems with xampp'''. | ||
* '''Using nautilus''' to manipulate folders/files on localhost will '''cause Ownership problems with xampp'''. | * '''Using nautilus''' to manipulate folders/files on localhost will '''cause Ownership problems with xampp'''. | ||
| Line 66: | Line 72: | ||
In your Terminal type | In your Terminal type | ||
| − | + | <source lang="bash"> | |
| − | + | sudo gedit /opt/lampp/etc/php.ini | |
| + | </source> | ||
| − | locate | + | In the <tt>php.ini</tt> file, locate |
| − | + | <source lang="ini"> | |
| + | error_reporting = | ||
| + | </source> | ||
And change the value to | And change the value to | ||
| − | + | <source lang="ini"> | |
| + | error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED | ||
| + | </source> | ||
| − | locate | + | Also locate |
| − | + | <source lang="ini"> | |
| + | display_errors = On | ||
| + | </source> | ||
And change the value to | And change the value to | ||
| − | + | <source lang="ini"> | |
| + | display_errors = Off | ||
| + | </source> | ||
Stop then restart xampp for the new settings to take effect | Stop then restart xampp for the new settings to take effect | ||
| − | |||
FTP layer is NOT needed | FTP layer is NOT needed | ||
| − | |||
'''Database info''' | '''Database info''' | ||
| − | Host | + | '''Host''': <code>localhost</code> |
| − | + | ||
| − | Default Database name | + | '''Default Database name''': <code>test</code> |
| − | + | ||
| − | Default Database user | + | '''Default Database user''': <code>root</code> |
| − | + | ||
There is no default Password. | There is no default Password. | ||
| Line 107: | Line 117: | ||
http://localhost/yournewjoomlafolder/administrator | http://localhost/yournewjoomlafolder/administrator | ||
| − | === | + | === Create a link in the Ubuntu menu === |
| − | '''To create a GUI for | + | '''To create a GUI for XAMPP connected to your Ubuntu menu''' |
Open up the Terminal and type | Open up the Terminal and type | ||
| − | + | <source lang="bash"> | |
| + | sudo gedit /usr/share/applications/xampp-control-panel.desktop | ||
| + | </source> | ||
Then copy the following into the gedit and save. | Then copy the following into the gedit and save. | ||
| − | + | <source lang="ini"> | |
| − | + | [Desktop Entry] | |
| − | + | Encoding=UTF-8 | |
| − | + | Name=XAMPP Control Panel | |
| − | + | Comment=Start and Stop XAMPP | |
| − | + | Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py" | |
| − | + | Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg | |
| − | + | Terminal=false | |
| − | + | Type=Application | |
| − | + | Categories=GNOME;Application;Network; | |
| + | StartupNotify=true | ||
| + | </source> | ||
== LaMp == | == LaMp == | ||
| − | + | You will find instructions on [http://wiki.debian.org/LaMp wiki.debian.org]. Make sure that you have installed bzip2 for extracting the downloaded Joomla! package. | |
You can check this by the following command: | You can check this by the following command: | ||
| − | + | <source lang="bash"> | |
| − | + | $ dpkg -l | awk '/^ii bzip2/ {print $1" "$2}' | |
| + | ii bzip2 | ||
| + | </source> | ||
Note that the dollar sign '$' shell prompt is indicating you're a ''regular user''. We will later see a hash mark (#) shell prompt, which indicates that you're the super user ''root'' after issuing an '''su''' or '''sudo'''. The first policy for a secure linux system administration on the command line (but under X also) is to issue commands with the lowest permission as possible. | Note that the dollar sign '$' shell prompt is indicating you're a ''regular user''. We will later see a hash mark (#) shell prompt, which indicates that you're the super user ''root'' after issuing an '''su''' or '''sudo'''. The first policy for a secure linux system administration on the command line (but under X also) is to issue commands with the lowest permission as possible. | ||
If bzip2 is not installed, you won't get an output. Then you can quickly install it via aptitude: | If bzip2 is not installed, you won't get an output. Then you can quickly install it via aptitude: | ||
| − | + | <source lang="bash"> | |
| + | $ su -c "aptitude install bzip2" | ||
| + | </source> | ||
Here we see the first command executed with toot permissions, because a regular user is not allowed to install new software. The '-c' option passes the following command to '''su''' and hereafter it terminates instead of switching to a root shell. | Here we see the first command executed with toot permissions, because a regular user is not allowed to install new software. The '-c' option passes the following command to '''su''' and hereafter it terminates instead of switching to a root shell. | ||
| Line 142: | Line 160: | ||
=== Configure MySQL === | === Configure MySQL === | ||
It is time to create a database for Joomla! You can do this by the following commmands: | It is time to create a database for Joomla! You can do this by the following commmands: | ||
| − | + | <source lang="bash"> | |
| + | $ mysqladmin -u root -p create joomla | ||
| + | </source> | ||
You may replace ''joomla'' with the name of choice for Joomla!'s database. | You may replace ''joomla'' with the name of choice for Joomla!'s database. | ||
Now create a MySQL user different from root for Joomla!'s database | Now create a MySQL user different from root for Joomla!'s database | ||
| − | + | <source lang="bash"> | |
| − | + | $ mysql -u root -p | |
| − | + | mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES \ | |
| + | -> ON joomla.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword'; | ||
| + | </source> | ||
Make sure you replace ''joomla'' with the name of Joomla!'s database from above. Replace ''yourusername'' with the user name you choose for the MySQL user accessing Joomla!'s database, and replace ''yourpassword'' with your password of choice for the MySQL user. | Make sure you replace ''joomla'' with the name of Joomla!'s database from above. Replace ''yourusername'' with the user name you choose for the MySQL user accessing Joomla!'s database, and replace ''yourpassword'' with your password of choice for the MySQL user. | ||
Activate the settings and quit : | Activate the settings and quit : | ||
| − | + | <source lang="bash"> | |
| − | + | mysql> FLUSH PRIVILEGES; | |
| + | mysql> \q | ||
| + | </source> | ||
After disconnecting from the database server, you should remove the login information of your just new created MySQL user by editing MySQL's history file. | After disconnecting from the database server, you should remove the login information of your just new created MySQL user by editing MySQL's history file. | ||
| − | + | <source lang="bash"> | |
| + | $ vi ~/.mysql_history | ||
| + | </source> | ||
You can use any editor of your choice such as '''nano''', '''vi''' or '''emacs''' that is installed on your system. | You can use any editor of your choice such as '''nano''', '''vi''' or '''emacs''' that is installed on your system. | ||
=== Get Joomla! source === | === Get Joomla! source === | ||
| − | Now it is time to download the Joomla! sources. Currently you will find download links on the [http://joomlacode.org/download.html joomlacode.org] download page. For version 1.5.11, you may do the following from command line, assuming your current working directory is your home folder '''/home/user''': | + | Now it is time to download the Joomla! sources. Currently you will find download links on the [http://joomlacode.org/download.html joomlacode.org] download page. For version 1.5.11, you may do the following from command line, assuming your current working directory is your home folder '''/home/user''': |
| − | + | <source lang="bash"> | |
| − | + | $ wget http://joomlacode.org/gf/download/frsrelease/10209/40306/Joomla_1.5.11-Stable-Full_Package.tar.bz2 | |
| − | + | $ cd /var/www | |
| − | + | $ su | |
| − | + | # mkdir -m 0755 joomla | |
| − | + | # cd joomla | |
| + | # tar -xvjf /home/user/Joomla_1.5.11-Stable-Full_Package.tar.bz2 | ||
| + | </source> | ||
Here is the first time we see this hash mark (#) shell prompt. We call '''su''' without any options, because we want to issue root commands more than only one time. Calling '''su''' that way will prompt us for the super user's password and then change the actual shell environment, repectively $UID and $EUID. | Here is the first time we see this hash mark (#) shell prompt. We call '''su''' without any options, because we want to issue root commands more than only one time. Calling '''su''' that way will prompt us for the super user's password and then change the actual shell environment, repectively $UID and $EUID. | ||
| Line 174: | Line 202: | ||
=== Set ownerships and permissions === | === Set ownerships and permissions === | ||
If you want to allow writing in the entire joomla folder, simply do | If you want to allow writing in the entire joomla folder, simply do | ||
| − | + | ||
| + | <source lang="bash"> | ||
| + | # chown -R www-data:www-data /var/www/joomla | ||
| + | </source> | ||
If you want a more restrictive approach, do this instead: | If you want a more restrictive approach, do this instead: | ||
| − | + | <source lang="bash"> | |
| − | + | # 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 chown -R www-data:www-data $i; done | ||
| + | </source> | ||
Now set file and directory permissions: | Now set file and directory permissions: | ||
| − | + | <source lang="bash"> | |
| − | + | # find /var/www/joomla -type f -exec chmod 0644 {} \; | |
| + | # find /var/www/joomla -type d -exec chmod 0755 {} \; | ||
| + | </source> | ||
| − | === | + | === Configure Joomla! === |
Open your favourite web-browser, and point it to the page http://localhost/joomla. Replace ''localhost'' with your servers IP or domain name if it you are installing on a remote system. | Open your favourite web-browser, and point it to the page http://localhost/joomla. Replace ''localhost'' with your servers IP or domain name if it you are installing on a remote system. | ||
| Line 211: | Line 246: | ||
When you reach the final screen with congratulations on installing Joomla!, you should remove the installation directory. From root terminal: | When you reach the final screen with congratulations on installing Joomla!, you should remove the installation directory. From root terminal: | ||
| − | + | <source lang="bash"> | |
| − | + | # rm -rf /var/www/joomla/installation/ | |
| − | + | # exit | |
| + | $ | ||
| + | </source> | ||
And that's it! Now you can login into the admin interface of your fresh installed Joomla! 1.5.9. | And that's it! Now you can login into the admin interface of your fresh installed Joomla! 1.5.9. | ||
<noinclude>[[Category:Installation]]<noinclude> | <noinclude>[[Category:Installation]]<noinclude> | ||
Revision as of 07:23, 13 July 2011
Contents |
Preface
This document guides you through the manual installation of Joomla! on Debian GNU Linux or one of its derivatives such as Ubuntu, Knoppix or GRML. Note that this guide applies to Joomla!
&
. It has been successfully tested on Debian 4.0 [Etch], Debian 5.0 [Lenny], Ubuntu 8.04 LTS [Hardy Heron] and Ubuntu 10.10 [maverick]. It will work for all Debian based Linux distribution as well.
Also note that this guide assumes, you're installing Joomla! in a single hosting environment, running PHP as module. If you want to run multiple web sites as a web hosting service provider, for security reasons you should consider setting up an suPHP (php5-cgi, libapache2-mod-suphp) environment, where every virtual apache host runs under its own UID.
Installing Joomla!
Prerequisites
You will need to install apache2, mysql-server-5.0, mysql-client-5.0 and php5 in order to have a web-server for Joomla!.
XAMPP or LaMp?
XAMPP automatically configures Ownership LaMp requires use of the CHOWN command.
XAMPP
Download XAMPP for Linux to your your Home folder.
Install XAMPP
Open Terminal and enter:
sudo tar xvfz xampp-linux-1.7.4.tar.gz -C /opt
(replace xampp-linux-1.7.4.tar.gz with the version of XAMPP you downloaded). It has been reported that the MYSQL database of xampp 1.7.4 does not work with Joomla 1.5.22
This installs ... Apache2, mysql and php5 as well as an ftp server.
sudo /opt/lampp/lampp start
and
sudo /opt/lampp/lampp stop
starts/stops all the services
Test your XAMPP localhost server
Open your Browser and point it to
http://localhost
The index.php will redirect to
http://localhost/xampp
There you will find instructions on how to change default usernames/passwords. On a PC that does not server files to the Internet or LAN then changing the defaults is personal choice.
Get Joomla
Download the latest Joomla instalation zip [1]
Unzip to your hard drive
Connect to localhost with an FTP client Default
nobody lampp
Create a folder for your Joomla on the localhost server
FTP the unpacked Joomla installation files to the newly created Joomla folder.
Important:
- The XAMPP installation sets the correct Ownership of the files and permissions.
- Using the CHOWN command will cause Ownership problems with xampp.
- Using nautilus to manipulate folders/files on localhost will cause Ownership problems with xampp.
Configure Joomla
In your Browser type
http://localhost/yournewjoomlafolder
In the first Joomla installation screen if error reporting is shown as on then:
In your Terminal type
sudo gedit /opt/lampp/etc/php.ini
In the php.ini file, locate
error_reporting =
And change the value to
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
Also locate
display_errors = On
And change the value to
display_errors = Off
Stop then restart xampp for the new settings to take effect
FTP layer is NOT needed
Database info
Host: localhost
Default Database name: test
Default Database user: root
There is no default Password.
Administrator password is your choice.
Installing Sample Data is recommended for the novice user.
After installation delete the installation directory and point your Browser to:
http://localhost/yournewjoomlafolder
or
http://localhost/yournewjoomlafolder/administrator
To create a GUI for XAMPP connected to your Ubuntu menu
Open up the Terminal and type
sudo gedit /usr/share/applications/xampp-control-panel.desktop
Then copy the following into the gedit and save.
[Desktop Entry] Encoding=UTF-8 Name=XAMPP Control Panel Comment=Start and Stop XAMPP Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py" Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg Terminal=false Type=Application Categories=GNOME;Application;Network; StartupNotify=true
LaMp
You will find instructions on wiki.debian.org. Make sure that you have installed bzip2 for extracting the downloaded Joomla! package.
You can check this by the following command:
$ dpkg -l | awk '/^ii bzip2/ {print $1" "$2}' ii bzip2
Note that the dollar sign '$' shell prompt is indicating you're a regular user. We will later see a hash mark (#) shell prompt, which indicates that you're the super user root after issuing an su or sudo. The first policy for a secure linux system administration on the command line (but under X also) is to issue commands with the lowest permission as possible.
If bzip2 is not installed, you won't get an output. Then you can quickly install it via aptitude:
$ su -c "aptitude install bzip2"
Here we see the first command executed with toot permissions, because a regular user is not allowed to install new software. The '-c' option passes the following command to su and hereafter it terminates instead of switching to a root shell.
Configure MySQL
It is time to create a database for Joomla! You can do this by the following commmands:
$ mysqladmin -u root -p create joomla
You may replace joomla with the name of choice for Joomla!'s database.
Now create a MySQL user different from root for Joomla!'s database
$ mysql -u root -p mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES \ -> ON joomla.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';
Make sure you replace joomla with the name of Joomla!'s database from above. Replace yourusername with the user name you choose for the MySQL user accessing Joomla!'s database, and replace yourpassword with your password of choice for the MySQL user.
Activate the settings and quit :
mysql> FLUSH PRIVILEGES; mysql> \q
After disconnecting from the database server, you should remove the login information of your just new created MySQL user by editing MySQL's history file.
$ vi ~/.mysql_history
You can use any editor of your choice such as nano, vi or emacs that is installed on your system.
Get Joomla! source
Now it is time to download the Joomla! sources. Currently you will find download links on the joomlacode.org download page. For version 1.5.11, you may do the following from command line, assuming your current working directory is your home folder /home/user:
$ wget http://joomlacode.org/gf/download/frsrelease/10209/40306/Joomla_1.5.11-Stable-Full_Package.tar.bz2 $ cd /var/www $ su # mkdir -m 0755 joomla # cd joomla # tar -xvjf /home/user/Joomla_1.5.11-Stable-Full_Package.tar.bz2
Here is the first time we see this hash mark (#) shell prompt. We call su without any options, because we want to issue root commands more than only one time. Calling su that way will prompt us for the super user's password and then change the actual shell environment, repectively $UID and $EUID.
Set ownerships and permissions
If you want to allow writing in the entire joomla folder, simply do
# chown -R www-data:www-data /var/www/joomlaIf you want a more restrictive approach, do this instead:
# 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 chown -R www-data:www-data $i; done
Now set file and directory permissions:
# find /var/www/joomla -type f -exec chmod 0644 {} \; # find /var/www/joomla -type d -exec chmod 0755 {} \;
Configure Joomla!
Open your favourite web-browser, and point it to the page http://localhost/joomla. Replace localhost with your servers IP or domain name if it you are installing on a remote system.
You will be guided through the final steps of setting up Joomla!, have your MySQL user, password and database name available.
When you reach the final screen with congratulations on installing Joomla!, you should remove the installation directory. From root terminal:
# rm -rf /var/www/joomla/installation/ # exit $
And that's it! Now you can login into the admin interface of your fresh installed Joomla! 1.5.9.