Installing Joomla! as a local server
Off the Beat: Bruce Byfield's Blog
Recently, I installed Joomla! as a local web server so I could develop a site for a friend. Almost at once, I ran into the problems that plagues most free software documentation. The problem is not a lack of information, but too much information, much of it obsolete, and little of it covering the most common situations on a modern desktop. Nor was most of it succinct.
In fact, the process was not difficult. What was difficult was finding the relevant information. In the hopes of saving other people a few hours, here's my summary of the process:
Installing the environment
Running Joomla! requires a local web server (typically Apache), PHP, and a database (usually MySQL).
A popular way to set up this environment is to download and install XAMPP, which contains all the necessary packages. XAMPP contains everything you will need for a local web server, but, as the web page warns, it is configured to be as open as possible for convenience, and should not be used except as a local web server. It is simply too vulnerable to use in a live site.
To use XAMPP, download the latest version and uncompress the files to /opt while logged in as the root user. You can start XAMPP by running /opt/lampp/lampp start. A series of messages gives the progress of its start.
If you receive messages that another web server and instance of MySQL is running, you will have to close these down when before using XAMPP. Halt XAMPP with /opt/lampp/lampp stop and enter the commands apachectl stop (assuming you are using Apache) followed by /etc/init.d/mysql stop before restarting XAMPP. Note that these commands may interfer with other applications that are using Apache and MySQL.
However, because of the package systems used by most GNU/Linux distributions, it is not actually that much harder to install the pieces of the Joomla! environment separately than to use XAMPP. The only catch is that, in addition to Apache, PHP, and MySQL, you also need to install libapache2-mod-php5 and php5-mysql (to give the Ubuntu/Debian names for the packages) as well.
Whether you are using XAMPP or separate components, you can test that they are running properly by opening a web browser and going to the site http://localhost. If the page displays, then installation has been successful.
Creating the database
Before you can install Joomla!, you need to create a MySQL database. According to the information you can find online, this should be a simple matter on a new installation, since all you need to do is to log in to MySQL as the root user, with the password "root."
Unfortunately, if you have KDE installed, you already have MySQL installed -- and the user created for KDE's purposes may not be root. To find the user you need to log in, you need to look in /etc/mysql at the configuration files stored there. In Ubuntu and Debian, the file debian.cnf will contain the user and password information.
Armed with this information, you can type the command mysql --user= [user] --password=[password]. For the password, copy and paste to minimize the chances of error. When the mysql prompt appears, you may want to enter the command SHOW DATABASE; to see what other databases you have running so you don't interfer with any.
Then enter the command create database [database name];. When you receive a message that reads something like Query OK, I row affected (0.01 sec), you have created the database successfully. The database is blank, and will be populated by Joomla! as you work. Type exit to leave MySQL and continue.
Installing Joomla!
Joomla! is not packaged by most distributions, so you need to download the zip file from the project site (http://www.joomla.org/download.html).
After you unzip the download, log in as root and move the resulting directory to the web server's root folder. If you are using XAMPP, the root folder is /opt/lampp/htdocs; if you are using a separate Apache web server, it is /var/www/. Either way, enter the command chown -R 777 [directorypath] to make it accessible, followed by mv [directorypath] [newname] to give it a unique name.
Some directions suggest that you install directly to the root directory, but that assumes that you will never have more than one site being developed at one time. Installing the unzipped Joomla! download to a sub-directory makes working with multiple sites possible, and also helps you to keep track of the project that you are working on.
Configuring Joomla!
You can tell whether you have installed correctly by entering in a web browser http://localhost/[sitename]. If installation is successful, you will see the first page of the Joomla! installation wizard -- and the start of the next part of the process.
The wizard is largely self-expanatory (as it should be). However, take special notice of the Pre-Installation check, which tells you what the settings should be, and what they actually are, dividing the settings into the ones you need if Joomla! is to work at all, and the ones that are not necessary but that you may want to edit at all. You are unlikely to have any problems, but, if any are indicated, correct them before continuing with configuration.
You should also pay attention to the database configuration. The host name will generally be localhost, the user name and password the ones you used to log in to MySQL. If you forget the name of the database you created to use with Joomla!, then you can enter MySQL and use the command SHOW DATABASE; to find it.
You can forget about the FTP configuration for now. The whole point of working on a local server is the convenience of ignoring such details. You will not be using FTP until the time comes to upload your site to a live server.
The last page of the wizard is Main Configuration. There, you enter a password for the admin user of the Joomla! site, and choose whether or not to install sample data to help you learn. The page also contains settings for migrating a site from older versions of Joomla!
Finally, open a terminal and remove the file INSTALL.php and the installation directory from the site's top level directory. Until you do, you will not be able to use Joomla!
Logging in to Joomla!
With these steps, you are ready to start working with your site. To login, type in a web browser http://localhost/[sitename]/administrator, and log in as the admin user, with the password you created while configuring the site.
Your first step should be to familiarize yourself with the Joomla! backend that appears when you log in with the admin account. Probably the first tools that you should browse is the Global Configuration. There, you can alter the time zone from the default of UTC, and alter anything set in the configuration wizard. You might also want to create some users that are more limited than admin so that you can experiment as you develop the site.
As you go deeper into Joomla!, you will have a new concept or two to learn, such as the relations between sections and categories and web pages. However, if you are momentarily baffled by how to do something, you can console yourself by the thought that Joomla! itself is relatively sane, and no problems are likely to cause you anything like the trouble that setting up Joomla! in the first place did.
Comments
comments powered by DisqusSubscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
Thanks
Tanks
Thanks a lot
I have always found Joomla to be overly
Paul - http://www.connetu.com
I have always found Joomla to be overly
Well, I have had
http://www.shredmonkey.net/
Joomla! Ubuntu Documentation
Thanks for this reminder of the importance of keeping documentation current and organized and relevant. I put a call out to our developer community and there were four people who stepped up to help provide improved documentation. So, I am hopeful that we can get this situation under control before the 1.6 release, and then someone will be asking you for your input, to see if we hit the mark!
http://www.alltogetherasawh...blogs/joomla-ubuntu-super-hero
Thanks so much for helping your friend get started with J! and do not hesitate to contact us when you have questions or want to share feedback.
Big fan of your work for some time.
Amy
http://AllTogetherAsAWhole.org - J! devs and site builders network
Not so common common sense
Related discussion on Joomla support forum
http://forum.joomla.org/viewtopic.php?p=1638275
In response I got 'lectured' about how umask works, grrr, before I finally found a succinct how-to ... on the Ubuntu support site!
https://help.ubuntu.com/com...la#Configure%20Access%20Rights