deploying the lamp stack on red hat enterprise linux 5 ?· deploying the lamp stack on red hat...

Download Deploying the LAMP Stack on Red Hat Enterprise Linux 5 ?· Deploying the LAMP Stack on Red Hat Enterprise…

Post on 04-Jan-2019

213 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

Deploying the LAMP Stack on Red Hat Enterprise Linux 5

1801 Varsity DriveRaleigh NC 27606-2072 USAPhone: +1 919 754 3700Phone: 888 733 4281Fax: +1 919 754 3701PO Box 13588Research Triangle Park NC 27709 USA

Linux is a registered trademark of Linus Torvalds. Red Hat, Red Hat Enterprise Linux and the Red Hat"Shadowman" logo are registered trademarks of Red Hat, Inc. in the United States and othercountries.

All other trademarks referenced herein are the property of their respective owners.

2009 by Red Hat, Inc. This material may be distributed only subject to the terms and conditions setforth in the Open Publication License, V1.0 or later (the latest version is presently available athttp://www.opencontent.org/openpub/).

The information contained herein is subject to change without notice. Red Hat, Inc. shall not be liablefor technical or editorial errors or omissions contained herein.

Distribution of substantively modified versions of this document is prohibited without the explicitpermission of Red Hat Inc.

Distribution of this work or derivative of this work in any standard (paper) book form for commercialpurposes is prohibited unless prior permission is obtained from Red Hat Inc.

The GPG fingerprint of the security@redhat.com key is:CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E

www.redhat.com 2

Table of Contents

1 Goals & Executive Summary ............................................................................. 5

1.1 Goals .............................................................................................................................. 5 1.2 Executive Summary ........................................................................................................ 5

2 LAMP Introduction ......................................................................................... 6

2.1 Linux ............................................................................................................................... 7 2.2 Apache ............................................................................................................................ 7 2.3 MySQL ............................................................................................................................ 9 2.4 PHP ................................................................................................................................ 9

3 DVD Store LAMP Application - Overview ....................................................... 10

3.1 DVD Store LAMP Application - Web Pages ..................................................... 11

4 Hardware/Software Versions ........................................................................... 12

4.1 Hardware ...................................................................................................................... 12 4.2 Software ........................................................................................................................ 12

5 Installing, Configuring, and Testing the LAMP Infrastructure .......................... 13

5.1 Installing the LAMP components .................................................................................. 14 5.1.1 Provisioning a Red Hat Enterprise Linux System using Red Hat Satellite ............. 14 5.1.2 Verifying and Installing the Remaining LAMP Components ................................... 17

5.2 Configuring and Testing the LAMP Components .......................................................... 19 5.2.1 Creating and Testing a User Account ..................................................................... 19 5.2.2 Configuring, Starting and Testing the Apache HTTP Server .................................. 19 5.2.3 Configuring, Starting and Testing MySQL .............................................................. 21 5.2.4 Configuring and Testing PHP ................................................................................. 23

6 Configuring the DVD Store LAMP Application ................................................ 25

6.1 Downloading and Expanding the Applicaiton ................................................................ 25 6.2 Placing the PHP scripts ................................................................................................ 26 6.3 Creating and Testing the DVD Store Database ............................................................ 26 6.4 Testing the DVD Store Application ............................................................................... 27

7 Configuring LAMP for Remote MySQL Access ............................................... 29

7.1 Disabling MySQL .......................................................................................................... 29 7.2 Providing the PHP Scripts ............................................................................................. 29 7.3 Configuring PHP ........................................................................................................... 30 7.4 Configuring MySQL ....................................................................................................... 30 7.5 Test the DVD Store Application on the Remote System ............................................... 31

8 Securing Linux ................................................................................................. 32

8.1 Configuring the Firewall ................................................................................................ 32 8.2 Allowing HTTP .............................................................................................................. 35

3 www.redhat.com

8.3 Allowing Remote MySQL .............................................................................................. 38

9 Configuring SELinux ........................................................................................ 41

10 Conclusion ..................................................................................................... 47

11 References

Recommended

View more >