Mambo
From InstallationWiki
| Official Page |
| Project Documentation |
| Download |
|
Mambo (formerly named Mambo Open Source or MOS) is a free software / open source content management system (CMS) for creating and managing websites through a simple web interface. Mambo is released under the terms of the GNU General Public License (GPL)Version 2. It is written with the PHP programming language and uses the MySQL database.
In this tutorial we will cover how to install Mambo on a local machine running in an Apache/MySQL/PHP (AMP) environment. We will not cover the installation of AMP here; you can find a walkthrough of installing the XAMPP package here. XAMPP is a free software package that includes PHP, MySQL, Apache, etc. and is a quick way to get yourself a working AMP development environment.
Since in this tutorial we are only dealing with creating a local installation for testing purposes, rather than covering how to deploy and set up Mambo on a remote web server.
The steps to install and configure Mambo are simple:
1. Download and extract the Mambo files.
2. Copy the files to the web server root.
3. Step through the screens of the Mambo web installer.
4. Create another, less powerful database user to run the site under.
5. Remove the installation directory.
6. Test it out!
Let's get started.
Contents |
[edit] Downloading Mambo
The latest version of Mambo can be downloaded from http://www.mambo-code.org.
There is a link to this page from the Download Mambo link on the homepage of the mambo-foundation.org web site, www.mambo-foundation.org.
[edit] Mambo Lite and Complete
From version 4.6 of Mambo onwards, Mambo comes in two flavors, Complete and Lite. Mambo Complete is the full Mambo package, with all the standard components and templates already included. Mambo Lite is a cut-down version of the full Mambo package, intended for people who know they don't want all the features of Mambo straight away. The Lite package lacksis missing a number of the standard components and templates, but still has enough for you to run a functional Mambo site.
Importantly, Mambo Lite contains the Content component, which drives the content management functionality of Mambo, and is the main focus of this article. Wherever we use a feature of Mambo that is not included in the Mambo Lite package, we will highlight it. All the things included in Mambo cComplete but not in Mambo Lite can be downloaded and installed from Mamboxchange site. So, you are not cutting yourself off from Mambo's full potential by installing the Lite version, but it does mean you will have to do some more work to get extra parts installed.
In this article, since we are taking our first steps, we will work with the Complete package so that we can get a picture of everything that's available in standard Mambo.
Should you choose to install and work with the Mambo Lite package, you will find that installation steps are identical.
You will find that you can download in each package in a variety of compressed formats, like ZIP (.zip extension), GZIP (.tar.gz extension), etc. We will grab the ZIP file for the Complete package. It is a larger file than the GZIP version.
[edit] Extracting Mambo
Once you have downloaded Mambo, extract the contents of the Mambo ZIP archive to the the root of your c:\ drivehard drive..
If you don't have a tool for extracting the files, you can download an evaluation edition (or buy a full edition) of WinZip from www.winzip.com.
There are also free, and powerful, extracting tools such as ZipGenius (http://sourceforge.net/projects/zipgenius/http://www.zipgenius.it/index_eng.htm) and 7-Zip (http://sourceforge.net/projects/sevenzip/) among others.
In the Mambo folder, you will find a number of subfolders; some of these include:
-
components:Contains the PHP code for the components that will make up your Mambo site. Components are the essence of Mambos operation. We will start looking at them as soon as we've got Mambo installed!
-
modules: Contains the PHP code for Mambo's modules. Modules are 'mini-functionality' units and usually provide snippet views of components.
-
mambots: Contains the PHP code for Mambo mambots. Mambots are "little" plugins that hook into various parts of the system, and perform various tasks like filtering or preparing outputa kind of "filter".
-
language: Contains language files that allow the language of Mambo's interface to be changed.
-
images: Contains images used in the display of the Mambo site. This is where images used in your pieces of content will go.
-
templates: Contains the Mambo templates. The use of templates allows you to completely change the look of a PHP-NukeMambo site with a click of a button. Within eachtemplatefolder is theCSSfor that template, along with images used by it.
-
includes: Contain the core code that powers Mambo.
-
administrator: Contains code to power the administration area of your site.
[edit] Putting Mambo Files into the Web Server Root
In this article, we are going to use two installations of Mambo. The first will install the sample data, and will be accessed with the followingis URL,once we have installed Mambo:
http://localhost/mambo/
The second installation will be blank; it will have no sample data and we will work with this to create our example site, Zak Springs. This installation will be accessed via http://localhost/zaksprings/. For now, we'll concentrate on the first installation.
The first thing we need to do is to copy the folder containing the extracted Mambo files into our web server root directory ((\xampp\htdocs\ if you are using XAMPP). Once you've copied that folder, rename it to mambo, and we're ready to go.
We will refer to the mambo folder in the web server root as the 'root of our Mambo installation'. Once the Zak Springs site is created, the zaksprings folder that will contain its code and will be the root of that Mambo installation. The fact that we have two installations should not cause confusion.
[edit] Installing Mambo
Open up your web browser and navigate to http://localhost/mambo/. You should see the following screen:
This first screen shows the status of a number of settings required to install Mambo. When a setting has a value that could prevent or compromise the Mambo installation, it is shown in red. If you scroll down the screen, you will see the write-access of the folders in the Mambo installation:
On your local machine, the most of the settings in the Directory and File Permissions section will show as Writeable. This is not likely to be the same when you attempt to install Mambo on web -hosting server, since that will have different permissions. Some of Mambo's operations requires write-access to the filesystem, which means that PHP must have write-permission to the file-systemfilesystem (for consistency). On a typical web server, PHP will have limited write-access to the filesystem, but this is not a problem that we will likely experience on our local machines.
Everything looks fine on the preinstallation check, so go ahead and click the Next button. The next screen shows us the license agreement for Mambo. We have to check the box to accept the license agreement and click the Next button before we can continue:
[edit] Database Setup
The third screen in the web installer is where we set up the details of our database.
We need to specify:
- The name of the server that the database server is running on (usually localhost unless you know otherwise).
- A MySQL user account that will be used to access the database (usually root unless you know otherwise), and the password to go with this database user account. Many MySQL installations have the root password left blank. If you don't know the password for the root account to MySQL, it's probably blank!
The default name of the database we want to create is mambo.
A table prefix for all the tables in the database. This is something added to the front of the name of each table in the Mambo database, to make the table names a bit more "unique". This means that the Mambo tables can live in a database along with another application (some web hosts may restrict the number of databases you are able to create) without the name of any table clashing with the name of a table from another application. We'll leave this at the default value of mos_.
There are three further options: Drop Existing Tables, Backup Old Tables, and Install Sample Data. Drop Existing Tables and Backup Old Tables are used if you are creating a new Mambo installation into a database that already has one.
The third option is Install Sample Data - we will leave it checked. This will install some sample information into will install "something" (suggestion: placeholder data or sample information) into our Mambo database, so that we've got things to look at as we take our first steps.
Once you've entered your database details here, click the Next button to continue. A dialog box will popup checking if you've entered your settings correctly. If you think you have, click OK.
The next screen prompts you for the name of your Mambo site. This name will appear in the title of pages from the site, in the subject of emails sent from the site, and so on. We'll just enter Mambo Site for now. After entering the site name, click on Next to proceed.
[edit] Site Details
The next step of the web installer is where you confirm the details of your site, and the details of a Super Administrator account. The Super Administrator is an account with ultimate power over your Mambo site, and will be used to do most of the configuration work on setting up the Mambo site..
The URL that will be used to access the site, and the Ppath on your machine to the Mambo installation are already provided forto you.
You also have to provide an email address for your Super Administrator account. This is an account with ultimate power over your Mambo site, and will be used to do most of the configuration work on setting up the Mambo site. Put your own email address into the Your Email field.
Next you have to provide a password for the Super Administrator account. The account is called admin, and it may be tempting as it maybe to enter admin for the password., But bear in mind that you had better remember to change ithat before you actually put your site live. One thing with Mambo is that the place for the administrators to log on is the same for virtually every Mambo site on the Internet, and if you've still got that Super Administrator account with the username of admin and the password of admin, then it wont take long before someone else has taken control of your site. It is however, possible to change the name of this account later.
A random, strong, password is suggested for you. If you don't want to change that, make a note of it! If you do change the password, make a note of it!
Once you've entered your email address and decided on the password, click Next to move on.
Your installation is complete. The name of the Super Administrator account and its password are displayed, along with a form for you to register your Mambo installation. This is not required, but will help to give the creators of Mambo a better idea of exactly what people are intending to do with the system.
You now have two choices, view the front end of the site from the View Site link, or have a nosey roundabout way through the Administration arealink. We'll stick with the front end for now, so click the View Site link.
[edit] Testing the Installation
Finally, we are ready to gostart the installation.
Click the View Site link from the web installer, or enter the URL http://localhost/mambo/ into your browser. You should see the following screen:
Let's do as we're told, and delete the installation directory from our Mambo folder. In case there is some confusion with the term installation folder (after all, the Mambo folder is our installation), ifthen you look in the folder containing your Mambo files (in the root directory), and you will see that there is a folder called installation. This is the folder you will want to delete.
The reason you need to remove this folder is that it contains the pages for the installer we have just used. If somebody were to access these pages again, they could, in principle, reinstall your site!
If you want to reinstall Mambo at any point, you can simply copy the installation folder (it should still be where you extracted it to!) back into your working live or production Mambo folder, delete the configuration.php file, and installation can begin again. We'll soon see more about the significance of the configuration.php file in a moment. Instead of deleting the installation folder, you could rename it.
If you working on your live site, you should delete the installation folder rather than renaming it. If you rename it, someone could still access it and reinstall your site! Since we are working in a local development environment, this is not so much of a problem. you ,are ,
After deleting (or renaming) the installation folder, you should get your first taste of Mambo:
If this is what you see in your browser, then you can are almost ready to goproceed further.
[edit] Creating a Database User
Now that things seem to be working fine, we will create a database user that can access only the Mambo database. This user is not a human, but will be used by Mambo to connect to the database while it performs its data-handling activities. The advantage of creating a database user is that it adds an extra level of security to our installation. Mambo will be able to work with data only in this database (ofin the MySQL server), and no other. Also, Mambo will be restricted in the operations it can perform on the tables in thise database. This will be useful in case our system is hacked by some outside evil.
The reason we did not do this before was that Mambo creates its own database, and creates tables in thereat. ThisIt requires a user account with a lot of privileges to do this kind of a thing. The root database account has the" ultimate power", and can do this quite easily. Once the database is set up, the demands on the database in terms of creation are less, and so we do not really need this extra power on a regular basis. Thus we will switch to another user.
Also, we do it now so that we can assign privileges only to the Mambo database. Until thate database is created, you cant really do that. Now that the database is created, it's an ideal time to switch to our less powerful, but still powerful enough, database user.
For our database work, we'll be using the phpMyAdmin tool. phpMyAdmin is part of the XAMPP installation (detailed in Appendix A), or can be downloaded from www.phpmyadmin.net, if you don't already have it. phpMyAdmin provides a powerful web interface for working with your MySQL databases. If you're familiar with phpMyAdmin, or prefer to use the command- line for working with MySQL, this section wont present any problems.
First of all, open your browser and navigate to http://localhost/phpmyadmin/, or whatever the location of your phpMyAdmin installation is.
We will need to create a username for our MySQL user to access the mambo database. Let's call our user mamboer and go with the password mambopassword. However, in order to add an extra level of security we will introduce some digits into mambo password, and some other slight twists, into our password in order to strengthen it, and so use the word mamb071Passv0rd as our database user -password.
To create the database user, click the SQL tab in phpMyAdmin, and enter the following into the Run SQL query/queries on database textbox:
GRANT ALL PRIVILEGES ON mambo.* TO mamboer@localhost
IDENTIFIED BY mamb071Passv0rd
WITH GRANT OPTION
Your screen should look like this:
Click the Go button, and the database user will be created:
[edit] Switching to the New Database User
Now that the user is created, we'll make a quick modification to the Mambo configuration to use this MySQL user account.
Enter the URL http://localhost/mambo/administrator into your browser, and you'll be taken to the login page for the Aadministrator aArea:
Here you need to enter the account details of yourthe Super Administrator account that you created during the last step of the web installer. Enter the username (admin) and password (you did make a note if it didnt you!...?...) and click the Login button.
You will find yourself in the Administrator area, also known as the back end of the site. From here, you control your site. For now, select the Global Configuration option from the Site menu at the top of the page:
Click on the Database tab, and enter the details of the MySQL database user we just created in phpMyAdmin:
Click the Save button, and the configuration settings will be updated.
Now click the Logout link in the top-right hand side of the page, and you will be returned to the front- end of the site.
We are ready to get started!
[edit] Still Having Problems?
If Mambo is still not working, and you have followed the steps in this tutorial, then there is something wrong elsewhere, and it is likely that you will find the answer by scouring the forums at http://forum.mambo-foundation.org/. These forums contains many questions (and solutions) on installation (both local and on remote web servers) from users attempting to get their site running.
[edit] Summary
In this article, we have walked through the typical steps to install Mambo on a local machine running an AMP environment.
We looked at where you get Mambo from, and also considered the two flavors of Mambo that you can get; Complete and Lite. Lite is a cut-down version of Complete, but contains the main functionalities required to get a Mambo site up and running. We chose to install the Complete version, but if you went for the Lite version, then you can simply install all the missing features as you go. We will see how to do that as we progress.
Installing Mambo was straightforward; we extracted the downloaded files, and then copied them into a folder in the root of our web server. Browsing to that folder in our web browser brought up the installation "wizard", which stepped us through the installation process.
We had to provide the details of our database server so that Mambo could connect to it and create the required database tables. We also had to provide the password for the SuperAdministrator account. As we will see, this account can be used to do anything on your Mambo site, so choosing a strong password, and keeping that password safe is very important.
The final step to installation is to remove a folder called installation from inside the folder containing the Mambo code. Once this folder has been removed, Mambo is ready for action.
We made one last change to the standard installation in this tutorial; we created a new database user with access only to the Mambo database, and then re-configured to connect to the database using this account. This is a first step towards increasing the security of our Mambo site.
[edit] Additional References
- For instructions on Designing Mambo Templates, click here
- For instructions on Customizing Mambo Templates, click here
[edit] Source
The source of this content is Chapter 2: Setting up the Development Environment of Learning Mambo: A Step-by-Step Tutorial to Building Your Website by Douglas Paterson (Packt Publishing, 2007).
