Skip to main content

Setting up LAMP: Getting Linux, Apache, MySQL, and PHP Working Together



Setting up LAMP: Getting Linux, Apache, MySQL, and PHP Working Together

Eric Rosebrock, Eric Filson

ISBN: 978-0-782-14337-9 September 2004 416 Pages


You could think of Setting Up LAMP as four books in one, but it's actually something much more valuable: a single volume that presents the open-source technologies known collectively as LAMP—Linux, Apache, MySQL, and PHP—as tightly dovetailed components of today's most affordable and effective platform for building dynamic web-based applications.

Each technology has uses outside of this context, of course, but within it they form something greater than the sum of their parts. This book shows you how to take full advantage of this power, walking you through all the steps required to lay your Linux foundation, install and configure your Apache web server, and then begin using PHP to access content stored in MySQL. Here are a few of the specific topics you'll find covered inside:

  • Installing and configuring qmail with support for IMAP, POP3, SMTP, virtual domains, spam filtering, and antivirus
  • Managing system users and groups
  • Configuring your network
  • Creating a custom firewall script using IP tables
  • Recognizing when a system is in distress
  • Handling MySQL database replication
  • Configuring virtual domains
  • Writing a basic PHP script that integrates with MySQL

If you're new to all of this, you'll quickly get to where you need to be to start developing and deploying the higher-level pieces of your web application. Even if you have experience with one or all of these technologies, this book—including its quick-start installation appendix—is a resource you'll want close by whenever you're setting up or fine-tuning your LAMP system.


Chapter 1: Introducing LAMP.

Chapter 2: Installing Linux.

Chapter 3: Using Linux.

Chapter 4: Linux Administration.

Chapter 5: Network Connectivity.

Chapter 6: Linux Security.

Chapter 7: Electronic Mail.

Chapter 8: Apache Web Server: Installation and Configuration.

Chapter 9: MySQL: Installation and Administration.

Chapter 10: PHP: Installation and Configuration.

Chapter 11: Testing Your LAMP Installation.

Appendix A: LAMP Quick Installation.

Appendix B: MySQL Configuration Directives.

Appendix C: Getting Support.


Code from the Book
ChapterPageDetailsDatePrint Run
Combined Errata

Page 113

second paragraph, second sentence: should be for loopback address.

Page 169

6th line from the bottom of the page, the book has:cpan > install ExUtils::MakeMaker but it should be:cpan > install ExtUtils::MakeMaker (Notice the "t" in the word "ExtUtils").

Page 176

The code segment for Step 9:
The code segment for Step 9:

"ln -s /var/qmail/supervise/qmail-send

should read

"ln -s /var/qmail/supervise/qmail-send
/var/qmail/supervise/qmail-smtpd /service"

That is, the last part of the line, "/service", is separated by a
space from "/var/qmail/supervise/qmail-smtpd". Cross reference here: , at the end of


The example provided by the reader is correct, however I think in the book it's on a continuation line is what the referenced "-->" is about. The book would not allow the complete example to be printed on one line.