Time for action – installing Bitnami WAMP stack
concrete5 is a PHP
application which uses PHP as its programming language in combination with a MySQL database. There are lots of possibilities to meet the requirements of concrete5. The preferred web server is Apache but IIS like any web server supporting PHP works as well, but only Apache is supported by the core team.
If you already have a server or a local Apache, PHP, and MySQL set up, you can skip this step and continue with the Downloading concrete5 section a few pages ahead. Otherwise, we are going to need to install Bitnami WAMP stack on your local computer by following these simple steps:
Go to http://bitnami.org/stacks/ and select the MAMP stack for Mac OS, WAMP for Windows, and LAMP for Linux. On the next page, click on Installer and double-click the EXE as soon as it has been downloaded. You should see the following window or a dialog you have to confirm if files downloaded from the Internet aren't executed directly on your computer:
Click on Next to get
to the next installation screen. Here you'll see a screen with a number of preselected components. We don't need them, as we're going to install concrete5 as our Content Management System (CMS) and framework. phpMyAdmin can't be unselected, but that's okay.
Click on Next once
more and you'll be asked to specify the installation folder. You can keep the suggested value but feel free to change it if you prefer a different location. For this book, we used Version 5.4.10. Your version might be higher. Cause the WAMP folder will have the version number in the name, all follow-up.
Click on Next again
and you'll be asked to enter the MySQL password for the user root. It's important to keep it saved as this is the main user to access your database. You'll need this password later when we install concrete5.
There are a few more screens; click on Next and you'll have to enter the port number for Apache as well as MySQL in the following screen. You can keep the port number 80 for Apache and 3306 for MySQL. However, it might be possible that another application is already using one or both of these ports, in which case you have to disable the existing application or use a different port number. It's not a problem if you change these numbers; just make sure that you remember the port numbers as you'll need them later when we install concrete5.
After you've clicked
your way through all the screens and confirmed the launch process at the end, you should have a running MySQL server as well as a working Apache web server with all necessary components to run a concrete5 site on your local computer. Before we install concrete5, let's make a small change to the MySQL configuration. MySQL table names are not case sensitive on Windows. This will cause some problems if you want to move your site to a Linux server where MySQL is by default set up with case sensitive table names. If you don't feel comfortable with this change, it's not necessary, but recommended if you move your site to another server at some point.
To change this, if you
work with concrete5, do the following:
Go to the directory where you've installed Bitnami and open the folder mysql; it should look as follows:
The my.ini file contains several settings related to MySQL. Open the file and insert the following line immediately after the mysqld section:
The mysql section should look like as follows:
Now that MySQL
is properly configured, locate the manager tool in your start menu. You should be able to find it in All Programs | Bitnami WAMP Stack | Manager tool and open it. You should see the following dialog:
Select MySQL Database and click on the Restart button in the right pane. The buttons go gray. When the buttons return to their regular state the restart of MySQL is complete.
If
everything worked you should be able to open your browser and enter http://localhost/.
Note
If you had to change the port of your Apache service, make sure you append it to the hostname. Port number 80 is the default port to access websites and can be omitted. However, if you had to change to a different number like 8000, you have to use an address like this: http://localhost:8000/.
There's also one small change we have to make to the Apache configuration in order to make sure we can use a file called .htaccess, which allows concrete5 to change certain Apache configurations. Follow these steps:
Go to the directory where you've installed Bitnami and open the folder apache2 and then conf.
Within that directory, open the file called httpd.conf.
Look for a section which starts with <Directory "C:/BitNami/wampstack-5.4.10-0/apache2/htdocs"> and then look after a property called AllowOverride. You'll have to change its value from None to All.
The
relevant part should look like as follows afterwards:
After you've saved the change, go to the Bitnami Manager tool, select the Apache Web Server process, and restart it.
The
Bitnami WAMP Stack setup package installed a working web server, including PHP with the most commonly used modules and a MySQL database. This is what a lot of web applications need, and you can use this environment for other CMSs as well.
You've also had a quick look at one MySQL configuration file to avoid problems when moving your data to a Linux server. If you want to know more about this setting, the MySQL documentation is going to answer almost any question about table names: http://dev.mysql.com/doc/refman/5.5/en/identifier-case-sensitivity.html.
We also enabled support for .htaccess files in Apache. We'll need it later in this chapter when we enable pretty URLs.
Pop quiz – requirements for concrete5
Like any other software, concrete5 needs certain things to run. Try to answer the following questions.
Q1. Which of the following server-side programming language(s) has been used to build concrete5?
PHP
Microsoft ASP
Java
All of the above
Q2. Which of the following database(s) can you use with concrete5?
PostgreSQL
MySQL
Oracle
All of the above
Q3. Which of the following operating system(s) can you use to run concrete5?
Microsoft Windows
Mac OS X
Linux
All of the above
Q4. Name the web server(s) you can use to run concrete5:
Microsoft IIS
Nginx
Apache
lighttpd