Appendix A. Linux Installation Guide

This appendix is a guide to installing the software used in the book on a Linux platform. The instructions were written for the RedHat distribution, but work for most other distributions; they have not been tested for other Unix variants, but should work. Specific instructions for Mac OS X can be found in Appendix C.

The instructions are designed for administrators: you’ll need to be able to log in as the root user. The first section shows how to find out what’s already installed. We then show you how to install the components that you need and optionally how to install a secure web server.

After showing you how to get PHP, Apache, and MySQL running, we present a short guide to downloading and installing the PHP script and database examples used in this book. We also show you how to set up tools that are needed for the examples in the book but aren’t included in the default Apache, PHP, and MySQL installations.

The Linux environment, PHP, Apache, MySQL, and our code examples can all change over time. This means that this guide may not work perfectly when you use it. To get the latest installation guide in HTML and PDF formats, along with changes and corrections to this guide, visit

Finding Out What’s Installed

This section shows you how to find out what’s already installed on your Linux server.

The Apache web server with the PHP module is usually installed with most common Linux distributions (such as, ...

Get Web Database Applications with PHP and MySQL, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.