Obtaining and Installing PHP, Apache, and MySQL

As mentioned in the previous section, we are going to make use of a package installation in order to simplify the task of creating a workable development environment. You will notice that most software installation is really about learning a single process and repeating it for whatever software you need. More often than not, you will:

  1. Go to the software producer's site
  2. Find the download page
  3. Download the software
  4. Unpack the software or run the executable file, depending on the method of installation
  5. Install the software
  6. Configure your installation
  7. Test your setup

That sounds easy enough; so head on over to http://apache2triad.net/, which is the homepage for the Apache2Triad project and click the Downloads link in the left-hand box towards the bottom of the screen. (Feel free to browse around to learn more about this useful enterprise.) This will take you to the downloads page on the SourceForge site at: http://sourceforge.net/project/showfiles.php?group_id=93507.

Select the package you wish to use—for the purposes of this book, release package 1.5.3 was used. At the time of writing, this was the latest stable release, but you should feel free to use a later version, if there is one, as this will not affect how you follow along here. Once you have clicked Download for a package you will be presented with a list of download options. Release package 1.5.3 has only one option as shown here:

Obtaining and Installing PHP, Apache, and MySQL

This is the package we will download and install. In order to do this, simply click the package name .exe file, which will take you to a list of mirror sites from which you can choose one to provide you with the download. A mirror is simply a server that provides all the same facilities at a different geographical location—this is done to reduce the load on individual servers and provide faster downloads to people all over the globe. Make your choice and click Download to begin.

Depending on your PC's security settings, you may be given the following warning message:

Obtaining and Installing PHP, Apache, and MySQL

Simply click Run to continue (or Save if you would like to hold on to a copy). At this point, you may want to take a break for a cup of coffee or tea if you have a slow connection as it may take a while.

At some stage during the setup process, the installer will ask you to confirm several settings and you are free to make changes as and when prompted. All the configurable settings have sensible defaults; so you don't really have to bother with this too much. However, you will be asked to enter a password. Please ensure that you use something that is memorable to you and secure. You will need to use 8 characters or more and preferably use some numerical digits as part of the password.

Note

Ensure that you can remember your password as it is needed in order to run the initialization tasks a little later in the setup process.

Once everything has been done, you should receive the following message:

Obtaining and Installing PHP, Apache, and MySQL

Make sure you save and close whatever important documents you have open before clicking OK. Once your machine has restarted, you will find that you have a whole list of new and exciting options to explore from the Apache2Triad option under All Programs in the Start menu. For example, the following options are made available with the 1.5.3 distribution:

Obtaining and Installing PHP, Apache, and MySQL

There is quite a lot more than what we really need for our immediate purposes, but just to ensure that everything is going according to plan, click open site root in the Start menu and you should be shown the following web page in your default browser:

Obtaining and Installing PHP, Apache, and MySQL

This confirms that everything is up and running as expected. Pretty easy so far! One thing to make note of in the previous screenshot is the final link called htdocs. Traditionally in Apache servers, the folder on your file system called htdocs is known as the root folder. What this means is that all the web pages and folders for your site must be placed inside htdocs in order for them to be served by Apache. If something is not in htdocs, then it is not possible to browse it!

From this we know that we will have to locate the actual folder called htdocs on the file system in order to know where to put Drupal once we have downloaded it. Assuming you have gone with the default setup, you will find htdocs in the following directory (on Windows machines) along with everything else that was installed and created during setup: C:/apache2triad/.

Before we move on from here, it is worthwhile taking a look at what has been provided as part of the Apache2Triad installation because some of the facilities made available to you could well be most useful as time goes by. You will also find that many hosting packages on live sites offer pretty much the same functionality as you now have on your PC.

Of particular interest and use to us Drupal people is phpMyAdmin, which is a complete database management tool for MySQL. It can make your life a lot easier as you become more advanced and wish to play around with your data. It is entirely likely that you can perform most of the tasks you need by using phpMyAdmin instead of having to learn SQL against the MySQL command-line client.

Note

If you are struggling to log on to phpMyAdmin or any other part of the site, then try using root as the username and whatever password you set during the setup process.

We now have a platform from which we can begin building the Drupal site. Of course, we still need Drupal.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.183.172