One
Component components of the 1.LAMP platform
# Linux operating system: As the basis of the lamp architecture, provide the operation to support the Web site;
# Apache Web server: As the front end of the lamp architecture, is a powerful, stable Web server program, the server directly to users to provide Web site access, send Web pages, pictures and other file content;
#mysql数据库服务器: As the back end of the lamp architecture, it is a popular open source relational database system
#php/perl/python Web programming language
Application advantages of the 2.LAMP platform
#成本低廉: Components are open-source software, freely available and free to use, not too restrictive in terms of technology and licensing, significantly reducing enterprise implementation costs
#可定制: A large number of additional components and scalable modules to meet the needs of most enterprise applications, and even self-developed, add new features
#方便易用: You can usually simply copy to the site directory to access the
#安全和稳定: Thanks to the benefits of open source
Second, build PHP running Environment
1. Preparatory work 650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/78/BE/wKiom1aCaxOxbZzVAAAqB2x4fCk667.png "title=" QQ Browser screenshot is not named. png "alt=" Wkiom1acaxoxbzzvaaaqb2x4fck667.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/78/BD/wKioL1aCa0zgwZgsAAAZ0EB6w1Y876.png "title=" 1.png " alt= "Wkiol1aca0zgwzgsaaaz0eb6w1y876.png"/>
2. Installing the Extensions Tool Library
(1) Installation Libmcrypt
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/78/BD/wKioL1aCbFGQATrLAABu6DWsZ2U541.png "title=" 2.png " alt= "Wkiol1acbfgqatrlaabu6dwsz2u541.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/78/BD/wKioL1aCbJaSqFKXAAAVmV9mcZY415.png "title=" 3.png " alt= "Wkiol1acbjasqfkxaaavmv9mczy415.png"/>
(2) Installation Mhash
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/78/BF/wKiom1aCbPiRrMYVAABoH7k-tzo573.png "title=" 4.png " alt= "Wkiom1acbpirrmyvaaboh7k-tzo573.png"/>
Link Ln-s/usr/local/lib/libmhash*/usr/lib/
(3) Installation MCrypt
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/78/BD/wKioL1aCbfXQIDBjAAAgla116wQ577.png "title=" 5.png " alt= "Wkiol1acbfxqidbjaaagla116wq577.png"/>
Troubleshooting Configure configuration Errors
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/78/BD/wKioL1aCbteyKZmQAAATb5lGeXY149.png "title=" 6.png " alt= "Wkiol1acbteykzmqaaatb5lgexy149.png"/>
Make && make install
3. Compiling and installing PHP
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/78/BE/wKioL1aCjrmwcyJCAAAt51W9kaM618.png "title=" 9.png " alt= "Wkiol1acjrmwcyjcaaat51w9kam618.png"/>
4. Setting the Lamp Assembly environment
1) php.ini Configuration adjustment
Cp/usr/src/php-5.3.28/php.ini-development/usr/local/php5/php.ini
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/78/BF/wKioL1aCl5vR4uJKAAAJkYpSMqE320.png "style=" float: none; "title=" Qq20151229221804.png "alt=" Wkiol1acl5vr4ujkaaajkypsmqe320.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/78/C1/wKiom1aCl4CC_n9eAAAIVubzVyE075.png "style=" float: none; "title=" Qq20151229222011.png "alt=" Wkiom1acl4cc_n9eaaaivubzvye075.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/78/BF/wKioL1aCl5yx4AI1AAALre5ObqA672.png "style=" float: none; "title=" Qq20151229222043.png "alt=" Wkiol1acl5yx4ai1aaalre5obqa672.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/78/C1/wKiom1aCl4CxSHjQAAAJe5exzwQ925.png "style=" float: none; "title=" Qq20151229222129.png "alt=" Wkiom1acl4cxshjqaaaje5exzwq925.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/78/BF/wKioL1aCl5yTMcAhAAAKb9dlnAQ358.png "style=" float: none; "title=" Qq20151229222231.png "alt=" Wkiol1acl5ytmcahaaakb9dlnaq358.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/78/C1/wKiom1aCl4DSQvELAAAJVs3SxX4814.png "style=" float: none; "title=" Qq20151229222309.png "alt=" Wkiom1acl4dsqvelaaajvs3sxx4814.png "/>
2) Add Zendguardloader optimization module
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/78/BF/wKioL1aCmTqTwkBpAABABemy4-s810.png "title=" A.png " alt= "Wkiol1acmtqtwkbpaababemy4-s810.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/78/BF/wKioL1aCmwWy5sVwAAASdJYRbGw962.png "title=" B.png " alt= "Wkiol1acmwwy5svwaaasdjyrbgw962.png"/>
2.httpd.conf Configuration Adjustment
Vim/usr/local/httpd/conf/httpd.conf
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/78/C1/wKiom1aCnryzK-KjAAALRbvHfjg615.png "style=" float: Left; "title=" C.png "alt=" Wkiom1acnryzk-kjaaalrbvhfjg615.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/78/BF/wKioL1aCntiSFMZLAAAMRbPORDQ819.png "style=" float: none; "title=" D.png "alt=" Wkiol1acntisfmzlaaamrbpordq819.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/78/C1/wKiom1aCnr3SC2OdAAAWTmEPcD0901.png "style=" float: none; "title=" E.png "alt=" Wkiom1acnr3sc2odaaawtmepcd0901.png "/>
/usr/local/httpd/bin/apachectl restart
3. Test Lamp co-operation
1) test whether the PHP Web page is displayed correctly
vim/usr/local/httpd/htdocs/test1.php
<?php
Phpino ();
?>
Access via http://www.local.com/test1.php
2) test the PHP Web page for access to MySQL database
vim/usr/local/httpd/htdocs/test2.php
<?php
$lind =mysql_connect (' localhost ', ' root ', ' 123456 ');
if ($link) echo "Welcome my SQL Server"
Mysql_close ();
? >
http://www.local.com/test2.php
Three, lamp architecture application Example
Deploying phpMyAdmin Systems
Unzip and copy to the site Directory
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/78/C2/wKiom1aCpSSRkw_IAAAh6akD_d8579.png "title=" amount. png " alt= "Wkiom1acpssrkw_iaaah6akd_d8579.png"/>
2. Establish
Configuration file config.inc.php
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/78/C0/wKioL1aCpZbRNW8zAAAXMffgTRM973.png "title=" Q.png " alt= "Wkiol1acpzbrnw8zaaaxmffgtrm973.png"/>
3.http://www.local.com/phpmyadmin Access
Lamp platform Deployment and application