In web development, Joomla stands as a robust and versatile Content Management System (CMS). It allows you to build dynamic websites and online applications with ease. This comprehensive guide will walk you through the process of installing and setting up Joomla 2.5.3 on CentOS 6/RHEL 6. This version of Joomla, released on March 15, 2012, is a security release that addresses two high-priority issues: Privilege Escalation and Password Change.
This tutorial is applicable not only to CentOS 6/RHEL 6 but also to other versions such as CentOS 5.1, CentOS 5.2, CentOS 5.3, CentOS 5.4, CentOS 5.5, CentOS 5.6, CentOS 5.7, CentOS 6.x, and RHEL 5.x. Whether you’re a seasoned webmaster or a beginner, this guide will provide you with the knowledge you need to get your Joomla site up and running.
Step 1: Download Joomla 2.5.3 Stable Package
The first step in installing Joomla 2.5.3 is to download the stable package from the official Joomla download sites. You can do this using the wget command. Here is the command you need to run:
wget http://joomlacode.org/gf/download/frsrelease/16804/73116/Joomla_2.5.3-Stable-Full_Package.zip
This command will download the Joomla 2.5.3 Stable Package to your server.
[root@rhel6 ~]# wget http://joomlacode.org/gf/download/frsrelease/16804/73116/Joomla_2.5.3-Stable-Full_Package.zip --2012-03-24 03:59:13-- http://joomlacode.org/gf/download/frsrelease/16804/73116/Joomla_2.5.3-Stable-Full_Package.zip Resolving joomlacode.org... 206.123.111.164 Connecting to joomlacode.org|206.123.111.164|:80... connected. HTTP request sent, awaiting response... 302 Found Location: http://downloads.joomlacode.org/frsrelease/7/3/1/73116/Joomla_2.5.3-Stable-Full_Package.zip [following] --2012-03-24 03:59:14-- http://downloads.joomlacode.org/frsrelease/7/3/1/73116/Joomla_2.5.3-Stable-Full_Package.zip Resolving downloads.joomlacode.org... 206.123.111.167 Connecting to downloads.joomlacode.org|206.123.111.167|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7984960 (7.6M) [application/zip] Saving to: âJoomla_2.5.3-Stable-Full_Package.zip 100%[==========================================================>] 7,984,960 55.7K/s in 2m 41s 2012-03-24 04:01:55 (48.5 KB/s) - Joomla_2.5.3-Stable-Full_Package.zip
Step 2: Unzip the Package
Once the download is complete, you need to unzip the package into your web server’s document root. Here is the command to do that:
unzip Joomla_2.5.3-Stable-Full_Package.zip -d /var/www/html/joomla253
This command will extract all the files from the Joomla package into a directory named joomla253 in your web server’s document root.
Step 3: Create a Database for Joomla 2.5.3
Joomla needs a database to store all its data. Therefore, the next step is to create a database for Joomla 2.5.3. Here are the commands to do that:
[root@rhel6 ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.1.47 Source distribution Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database joomla253db; Query OK, 1 row affected (0.00 sec) mysql> CREATE USER 'joomla253user'@'localhost' IDENTIFIED BY 'joomla253password'; Query OK, 0 rows affected (0.01 sec) mysql> GRANT ALL PRIVILEGES ON joomla253db.* to joomla253user@localhost; Query OK, 0 rows affected (0.00 sec) mysql> SHOW GRANTS FOR 'joomla253user'@'localhost'; +----------------------------------------------------------------------------------------------------------------------+ | Grants for joomla253user@localhost | +----------------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'joomla253user'@'localhost' IDENTIFIED BY PASSWORD '*F421F24167FCE0B4DAE4130DFB268C7897CF0C3D' | | GRANT ALL PRIVILEGES ON `joomla253db`.* TO 'joomla253user'@'localhost' | +----------------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.01 sec) mysql> exit Bye
These commands will create a new database named joomla253db, create a new user named joomla253user with the password joomla253password, grant all privileges on the joomla253db database to the joomla253user, and then exit the MySQL shell.
Step 4: Copy and AllowWritable to configuration.php
Next, you need to copy the sample configuration file and make it writable. Here are the commands to do that:
cp /var/www/html/joomla253/installation/configuration.php-dist /var/www/html/joomla253/configuration.php chmod 777 /var/www/html/joomla253/configuration.php
These commands will copy the sample configuration file to the main Joomla directory and then change the permissions of the configuration file to make it writable.
Step 5: Turn Off Output Buffering on PHP
For Joomla to work correctly, you need to turn off output buffering on PHP. You can follow our guide on How to Turn Off or Disable Output Buffering for php.ini on PHP 5.3.2 to do this.
Step 6: Open Your Web Browser and Navigate to the Joomla Installation Page
Now, you can open your web browser and navigate to the Joomla installation page. This can be done by entering the following URL in your browser’s address bar:
http://serveripaddress/joomla253
Replace “serveripaddress” with the IP address of your server.
Step 7: Follow the Joomla Installation Wizard
The Joomla installation wizard will guide you through the rest of the installation process. You will need to:
Select your preferred language.
Check the pre-installation requirements and recommendations.
Accept the Joomla license.
Enter your database details.
Complete the main configuration and install sample data if needed.
Step 8: Finalize the Installation
After completing the installation wizard, you need to finalize the installation by disabling write access to the configuration.php file and removing the installation folder. Here are the commands to do that:
chmod 664 /var/www/html/joomla253/configuration.php rm -rf /var/www/html/joomla253/installation
These commands will change the permissions of the configuration.php file to make it non-writable and then remove the installation folder.
Accessing Your Joomla Site
Congratulations! You have successfully installed Joomla 2.5.3 on your CentOS 6/RHEL 6 server. You can now access your Joomla site by navigating to:
http://serverip/joomla253/
To access the administrator’s page, navigate to:
http://serverip/joomla253/administrator/
Again, replace “serverip” with the IP address of your server.
Commands Mentioned
- wget – used to download files from the internet
- unzip – used to extract files from a zip archive
- mysql – used to interact with the MySQL database system
- cp – used to copy files and directories
- chmod – used to change the permissions of files and directories
- rm – used to remove files and directories
Conclusion
Installing Joomla on your CentOS 6/RHEL 6 server is a straightforward process that involves downloading the Joomla package, creating a database, configuring PHP, and following the Joomla installation wizard.
By following this guide, you should now have a fully functional Joomla site on your server.
Remember, maintaining a website involves more than just installing the CMS. You need to ensure that your server is properly configured and secured.
FAQ
-
What is Joomla?
Joomla is a popular, open-source Content Management System (CMS) that allows you to build dynamic websites and online applications. It offers a wide range of features, including page caching, RSS feeds, printable versions of pages, news flashes, blogs, search, and support for language internationalization.
-
Why do I need to disable output buffering on PHP for Joomla?
Output buffering can interfere with Joomla’s ability to send data to the user’s browser in a timely manner. By disabling output buffering, you ensure that Joomla can send data as soon as it’s ready, improving the responsiveness of your website.
-
What is the purpose of the configuration.php file in Joomla?
The configuration.php file in Joomla contains the settings for your Joomla website, such as database connection details, site metadata, and other configuration options. It’s a crucial file that Joomla needs to operate correctly.
-
Why do I need to remove the installation folder after installing Joomla?
The installation folder contains scripts and files used during the installation process. Leaving it on your server after installation can pose a security risk as a malicious user could potentially use it to reconfigure your site. Therefore, it’s recommended to remove it after installation.
-
Can I install Joomla on other types of servers apart from CentOS 6/RHEL 6?
Yes, Joomla can be installed on various types of servers as long as they meet the minimum requirements. These include a web server (Apache, Nginx, Microsoft IIS, or LiteSpeed), PHP 7.2.5 or higher, and MySQL 5.6 or higher or PostgreSQL 11.0 or higher.