1.4. Setting Up Your Local Computer for Development

To use your local computer to develop your Web site, you must install a Web server, PHP, and MySQL. PHP and MySQL are free to download and use.

1.4.1. Installing the Web server

After you set up the computer, you need to install a Web server. Your first step is deciding which Web server to install. The answer is almost always Apache. Apache offers the following advantages:

  • It's free. What else do we need to say?

  • It runs on a variety of operating systems. Apache runs on Windows, Linux, Mac OS, FreeBSD, and most varieties of Unix.

  • It's popular. Approximately 60 percent of Web sites on the Internet use Apache, according to surveys at http://news.netcraft.com/archives/web_server_survey.html and www.securityspace.com/s_survey/data/. This wouldn't be true if it didn't work well. Also, this means that a large group of users can provide help.

  • It's reliable. When Apache is up and running, it should run as long as your computer runs. Emergency problems with Apache are rare.

  • It's customizable. The open source license allows programmers to modify the Apache software, adding or modifying modules as needed to fit their own environment.

  • It's secure. You can find free software that runs with Apache to make it into an SSL (Secure Sockets Layer) server. Security is an essential issue if you're using the site for e-commerce.

Apache is automatically installed when you install most Linux distributions. All recent Macs come with Apache installed. However, you might need to install a newer version of Apache. Apache provides an installer for Windows that installs and configures Apache for you.

As of this writing, Apache offers three versions: 1.3, 2.0, and 2.2. Information on Apache versions and instructions for installing Apache are provided in Chapter 4 of this minibook. The Apache Web site (http://httpd.apache.org) provides information, software downloads, extensive documentation that is improving all the time, and installation instructions for various operating systems.

Other Web servers are available. Microsoft offers IIS (Internet Information Server), which is the second most popular Web server on the Internet with approximately 27 percent of Web sites. Sun Microsystems offers a Web server, which serves less than 3 percent of the Internet. Other Web servers are available, but they have even smaller user bases.

1.4.2. Installing MySQL

You might or might not need to install MySQL. MySQL is often already installed on Linux or Mac. Sometimes it is installed, but not activated. However, the installed version might be an older version, in which case you should install a newer version. Chapter 3 of this minibook provides instructions for checking whether MySQL is installed and determining which version is installed.

You install and configure MySQL on Windows by using a Setup and a Configuration Wizard. RPMs are available for installing MySQL on Linux. A PKG file is available for installing MySQL on Mac OS X. Chapter 3 of this minibook provides detailed instructions for installing MySQL on Windows, Linux, Unix, and the Mac OS.

Software for managing your MySQL databases after MySQL is installed is available. One popular program for administering MySQL is phpMyAdmin, a utility program written in PHP. Installing and using phpMyAdmin are discussed in Chapter 3 of this minibook.

1.4.3. Installing PHP

You might or might not need to install PHP. Along with MySQL, PHP is often already installed in Linux or the Mac OS. Sometimes it's installed but not activated. However, the installed version might be an older version, in which case you should install a newer version. Chapter 2 of this minibook provides instructions for checking whether PHP is installed and determining which version is installed.

PHP is available for Windows in a Zip file that just needs to be unzipped in the correct location. PHP is available for Linux in RPMs. You can obtain PHP for Mac OS in a PKG file. After installing PHP, you need to configure your Web server to process PHP code. Instructions for installing PHP and configuring your Web server are provided in Chapter 2 of this minibook.

1.4.4. Getting help with your software

Apache, PHP, and MySQL are open source software. You don't get a phone number that you can call when you have problems, but this doesn't mean that you can't get help. Open source software people help each other.

Apache, PHP, and MySQL are popular software with gazillions of users. Many of these users are willing to help. The official Web sites support mailing lists with hundreds of knowledgeable users, often including the people who developed the software, who voluntarily answer questions. You can often get an answer more quickly than if you waited in a queue for a technical support phone line.

You can join mailing lists at the following locations:

The mailing lists also have searchable archives of questions and answers. It's very unlikely that you're the first person to have your problem, so you're likely to find the question already answered in the archives.


Join the mailing lists, which often are high in traffic. When you first get acquainted with PHP and MySQL, the large number of mail messages on the discussion lists brings valuable information into your e-mail box; you can pick up a lot by reading those messages. Soon, you might be able to help others based on your own experience.

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

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