A detailed explanation of the lamp platform deployment and application

Source: Internet
Author: User
Tags mcrypt mysql mysql database linux

Lamp architecture is one of the most mature enterprise Web application models, which refers to a set of systems and related software that can provide dynamic Web site service and its application development environment. The word lamp is an abbreviation, which includes: Linux system, Apache Web server, MySQL database, PHP Web programming language.

component of Lamp Platform

Linux: As the base of the lamp architecture, provides the operating system to support the Web site, and can provide better stability and compatibility with three other components.

Apache: As a lamp structure front-end, is a powerful, stable Web server program, the server directly to provide users with Web site access, send Web pages, pictures and other file content.

MySQL: As the back end of lamp architecture, it is a popular open source relational database system.

PHP: As a programming language for developing dynamic Web pages, it is responsible for interpreting dynamic Web page files and providing Web applications for program development and running environments.

In the previous several articles, has explained in detail how to install Apache and MySQL, so here is not detailed said, now only to build a good PHP operating environment can be composed of lamp platform. Note: When building the lamp platform, the installation sequence of each component is Linux, Apache, MySQl, PHP. The installation of Apache and MySQL is not in strict order, and the installation of PHP environment is generally put in the last, responsible for communication Web server and database system to work together.

Build PHP Running Environment

1. Preparation work

If you have a previous PHP with the ". RPM" Package installed on the server, you will need to uninstall it here, or there will be a procedural conflict.

[Root@localhost/] #rpm-e php php-cli php-ldap php-common php-mysql--npdeps

Download the PHP source package, through the official PHP site http://www.php.net./downloads Download the latest source package, the author used this is the 5.3 version.

2, install the Extension tool Library

In the actual enterprise application, part of the Web application system based on PHP will require additional extension tools, such as data encryption tools Libmcrypt, Mhash, MCrypt, etc. (can be downloaded from the site http://wwwsf.net). Before installing the PHP package, you should install these extension tools first.

Install Libmcrypt

[Root@localhost Media] #tar zxf libmcrypt-2.5.8.tar.gz-c/user/src/

[Root@localhost Media] #cd/usr/src/libmcrypt-2.5.8/

[Root@localhost libmcrypt-2.3.8]#./configure

[Root@localhost libmcrypt-2.3.8]#.make && make install

[Root@localhost libmcrypt-2.3.8]#.ln-s/usr/local/lib/libmcrypt.*/usr/lib/

Install Mhash

[Root@localhost Media] #tar zxf mhash-0.9.9.9.tar.gz-c/user/src/

[Root@localhost Media] #cd/usr/src/mhash-0.9.9.9/

[Root@localhost libmcrypt-2.3.8]#./configure

[Root@localhost libmcrypt-2.3.8]#.make && make install

[Root@localhost libmcrypt-2.3.8]#.ln-s/usr/local/lib/libmhash*/usr/lib/

Install MCrypt

[Root@localhost Media] #tar zxf mcrypt-2.6.8.tar.gz-c/user/src/

[Root@localhost Media] #cd/usr/src/mcrypt-2.6.8/

[Root@localhost libmcrypt-2.3.8]#./configure

[Root@localhost libmcrypt-2.3.8]#.make && make install

Note: You will not be able to install the PHP package until you install the three extension tools, and you should be aware of the order of installation when installing these three extensions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.