PHP, MySQL, & JavaScript All-in-One For Dummies
Book image
Explore Book Buy On Amazon

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.

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, which offers the following advantages:

  • It's free.
  • 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. 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. Apache provides an installer for Windows that installs and configures Apache for you.

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.

Installing 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.

You install and configure MySQL on Windows by using a Setup and Configuration Wizard. RPMs are available for installing MySQL on Linux. A PKG file is available for installing MySQL on Mac OS X.

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 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.

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.

About This Article

This article can be found in the category: