Build PHP (LAMP), install Zend to optimize resolution speed, and build phpMyAdmin management system on its platform to manage MySQL page

Source: Internet
Author: User
Tags mcrypt phpmyadmin zend

Specific operation:

1. Preparatory work

In order to avoid the occurrence of program conflicts, it is recommended to first uninstall the RPM-installed PHP and related dependencies (if any).

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image002 "border=" 0 "alt=" clip_ image002 "src=" http://s3.51cto.com/wyfs02/M00/74/E5/wKiom1Ytu1TSwvaRAAAxscobriE467.jpg "height="/>

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image004 "border=" 0 "alt=" clip_ image004 "src=" http://s3.51cto.com/wyfs02/M01/74/E5/wKiom1Ytu1TCB6U4AABUZ94ZmY0667.jpg "height="/>

2. Installing the Extensions Tool Library

In real enterprise applications, some PHP-based Web applications require additional extensions, such as data encryption tools Libmcrypt, Mhash, MCrypt, etc. (which can be downloaded from the site sf.net). Before installing the PHP package, you should install the extension tools first.

1) Install Libmcrypt

650) this.width=650; "Style=" Background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left : 0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image006 "border=" 0 "alt=" clip_image006 "src=" http://s3.51cto.com/wyfs02/M02/74/E5/wKiom1Ytu1WCcX-DAAENpXgP-VY456.jpg "height=" 142 "/> 650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image008 "border=" 0 "alt=" clip_ image008 "src=" http://s3.51cto.com/wyfs02/M00/74/E5/wKiom1Ytu1WCJlfpAAAhk5OEnmo985.jpg "height="/>650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image010 "border=" 0 "alt=" clip_ image010 "src=" http://s3.51cto.com/wyfs02/M01/74/E5/wKiom1Ytu1bzz0o9AAAtDLCpsOQ808.jpg "height="/>

2) Install Mhash

650) this.width=650; "Style=" Background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left : 0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image012 "border=" 0 "alt=" clip_image012 "src=" http://s3.51cto.com/wyfs02/M02/74/E5/wKiom1Ytu1awG-i1AABJzDZ78_4825.jpg "height="/>650 ) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image014 "border=" 0 "alt=" clip_ image014 "src=" http://s3.51cto.com/wyfs02/M00/74/E5/wKiom1Ytu1ejegQsAAAhbcwx5mQ369.jpg "height="/>650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image016 "border=" 0 "alt=" clip_ image016 "src=" http://s3.51cto.com/wyfs02/M00/74/E5/wKiom1Ytu1eDMbDUAAAq_-S1j8g688.jpg "height="/>

3) Install MCrypt:

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image018 "border=" 0 "alt=" clip_ image018 "src=" http://s3.51cto.com/wyfs02/M01/74/E5/wKiom1Ytu1iyT9D6AABVBQ1w_Zw289.jpg "height=" "/>"

3. compiling and installing PHP

1) unpacking

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image020 "border=" 0 "alt=" clip_ image020 "src=" http://s3.51cto.com/wyfs02/M01/74/E5/wKiom1Ytu1mgdGYQAADJXDnTQo8865.jpg "height=" 107 "/>

2) configuration

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image022 "border=" 0 "alt=" clip_ image022 "src=" http://s3.51cto.com/wyfs02/M02/74/E5/wKiom1Ytu1myvEAwAABf2EgB-54615.jpg "height="/>

? --prefix: Specifies which directory to install the PHP program to.

? --with-mcrypt : load extension tools support such as data encryption.

? --WITH-APXS2 : Sets the file settings for the APXS module support program provided by Apache HTTP Server.

? --with-mysql : Sets the installation location of the MySQL database service program.

? --with-config-file-path : Set the location where PHP's configuration file php.ini will be stored.

? --enable-mbstring : enables multibyte string functionality to support code such as Chinese.

If a configuration error occurs, a Web page format XML may be missing, installed, and then reconfigured again. :

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image024 "border=" 0 "alt=" clip_ image024 "src=" http://s3.51cto.com/wyfs02/M02/74/E2/wKioL1Ytu4uitl4HAAAdXehKMmQ033.jpg "height=" "/>"

3) compile and install

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image026 "border=" 0 "alt=" clip_ image026 "src=" http://s3.51cto.com/wyfs02/M01/74/E2/wKioL1Ytu4uz5WZsAAAe_RiyiLI544.jpg "height="/>

n Setting the lamp component environment

1. php.ini configuration Adjustment

After installing the PHP package, the server does not automatically create the php.ini configuration file, but in the source directory provides two sample configuration files, respectively, corresponding to the development environment, production environment.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image028 "border=" 0 "alt=" clip_ image028 "src=" http://s3.51cto.com/wyfs02/M00/74/E5/wKiom1Ytu1vySZoiAABgVOCrZgg731.jpg "height="/>

Select the sample file and copy it to the PHP profile directory (make sure the path specified in the Configure step is the same) and rename it to PHP.ini. In the php.ini configuration file, the content that begins with a semicolon represents the comment information.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image030 "border=" 0 "alt=" clip_ image030 "src=" http://s3.51cto.com/wyfs02/M01/74/E5/wKiom1Ytu1vxp50bAADWVe_2_-M105.jpg "height=" 226 "/>

By modifying the configuration content in the php.ini file, you can control the execution characteristics of the PHP Web page. such as whether to allow users to upload files, set the size limit of the upload file, set the default character sets, load additional extension modules, and so on. If there is no special requirement, you can follow the default configuration directly without making any changes.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image032 "border=" 0 "alt=" clip_ image032 "src=" Http://s3.51cto.com/wyfs02/M02/74/E5/wKiom1Ytu1zxf1aTAAAdlbo1i4o930.jpg "height=" (/>650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image034 "border=" 0 "alt=" clip_ image034 "src=" http://s3.51cto.com/wyfs02/M02/74/E2/wKioL1Ytu46TD355AAB86wOAPPE011.jpg "height=" "/>"

In order to further improve the efficiency of PHP program execution, optimize page loading speed, you can add Zend company developed Zendguardloader optimization module for PHP. If you need to encrypt your PHP code to restrict unauthorized branches, you can also purchase the company's Zendguard software.

First release the downloaded Zendguardloader package and copy the module files in the php-5.3.x directory to the module folder of the PHP program.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image036 "border=" 0 "alt=" clip_ image036 "src=" Http://s3.51cto.com/wyfs02/M00/74/E2/wKioL1Ytu4-xxxsqAAEOorssnF0767.jpg "height=" 143 "/>

Then modify the php.ini configuration file to add the configuration statements that load and enable the Zendguardloader.so module.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image038 "border=" 0 "alt=" clip_ image038 "src=" http://s3.51cto.com/wyfs02/M01/74/E2/wKioL1Ytu4_yPBrtAAAi6bbBprM634.jpg "height="/>650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image040 "border=" 0 "alt=" clip_ image040 "src=" http://s3.51cto.com/wyfs02/M02/74/E5/wKiom1Ytu17DVVccAAAzgbohSWQ398.jpg "height="/>

2. httpd.conf configuration Adjustment

For the httpd server to support PHP page parsing, you need to load the PHP program's module files through the LoadModule configuration item and add support for the ". PHP" type Web page file through the AddType configuration item. In addition, you should modify the DirectoryIndex configuration line and add the "index.php" entry to identify common PHP home files.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px; padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "Title=" clip_image042 " Border= "0" alt= "clip_image042" src= "Http://s3.51cto.com/wyfs02/M00/74/E5/wKiom1Ytu16yf1bzAAAi2fnHmWw858.jpg" Height= "/>";

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image044 "border=" 0 "alt=" clip_ image044 "src=" http://s3.51cto.com/wyfs02/M02/74/E5/wKiom1Ytu1-SgteSAAA7RMZ8xLM805.jpg "height=" "/>650" this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image046 "border=" 0 "alt=" clip_ image046 "src=" http://s3.51cto.com/wyfs02/M01/74/E2/wKioL1Ytu5HBEQ0-AAAkWmfLuNU672.jpg "height="/>

In the above configuration content, the LoadModule line should be added automatically during the installation of PHP, where "Php5_module" represents the module name; "Module/libphp5.so" is the module file location. and AddType line needs to be added manually, DirectoryIndex line on the original basis to modify it.

n test lamp work together

1. test whether the PHP Web page is displayed correctly

Write a ". PHP" format of the test Web page file, using PHP built-in "phpinfo ()" function to display the server's PHP environment information, the PHP code should be included in the "<?php ...?" > "tags. Place the test file under the Web site root directory.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image048 "border=" 0 "alt=" clip_ image048 "src=" Http://s3.51cto.com/wyfs02/M02/74/E2/wKioL1Ytu5Hi_Q7TAAAi7wr9Fp4758.jpg "height=" (/>650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image050 "border=" 0 "alt=" clip_ image050 "src=" http://s3.51cto.com/wyfs02/M00/74/E5/wKiom1Ytu2CRfVj7AAAUkF_kT3Q805.jpg "height="/>

Then through the browser access, if you can see the PHP program version number, configuration commands, run variables and other related information, indicating that the Web server has been able to display the PHP Web page correctly. If you can also see information about the Zend engine, the Zendguardloader module is also enabled for success.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image052 "border=" 0 "alt=" clip_ image052 "src=" http://s3.51cto.com/wyfs02/M01/74/E5/wKiom1Ytu2HgQfRgAAHiM1_4ljI297.jpg "height=" 390 "/>

2. Test whether PHP Web page can access MySQL database

Then write a test page file, add simple database Operation command, used to verify the connection with the MySQL server, query and other operations. Where the "mysql_connect ()" function is used to connect to the MySQL database, you need to specify the destination host address, as well as the username and password of the authorized access.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px; padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "Title=" clip_image054 " Border= "0" alt= "clip_image054" src= "Http://s3.51cto.com/wyfs02/M02/74/E5/wKiom1Ytu2GTtVTFAAAiw-TlKTE569.jpg" height= "/>650" this.width=650; "style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px; padding-left:0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "Title=" clip_image056 " Border= "0" alt= "clip_image056" src= "Http://s3.51cto.com/wyfs02/M02/74/E2/wKioL1Ytu5PwtexvAABH-0ngemw479.jpg" Height= "/>";

Then through the browser to access the test page, if you can see the successful connection of the message, you can access the MySQL database through the PHP Web page. When an incorrect user name, password is used, or the connection fails because the MYSQLD is not running, an error will be made when executing. 650) this.width=650; "Style=" Background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left : 0px;padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image058 "border=" 0 "alt=" clip_image058 "src=" http://s3.51cto.com/wyfs02/M00/74/E2/wKioL1Ytu5PgGn2MAADSNIPS2ls284.jpg "height=" 177 "/>

n Deploying phpMyAdmin Systems

phpMyAdmin is a Web application that is written in PHP and used to manage MySQL databases. The web interface provided by the suite makes it easy to manage and maintain MySQL databases, even those unfamiliar with SQL statements.

1. unpacking and copying to the site Directory

For most PHP applications, you need to unpack and copy to the site directory to complete the deployment, then adjust the configuration as needed, or visit the installation page to complete the installation.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image060 "border=" 0 "alt=" clip_ image060 "src=" http://s3.51cto.com/wyfs02/M02/74/E5/wKiom1Ytu2PgEbIjAAFAynAEBoM418.jpg "height=" 202 "/>

2. Create a configuration file config.inc.php

After you copy the phpMyAdmin suite to the Site directory, you also need to create a configuration file to use it properly. The sample configuration file provided by default is Config.sample.inc, and you need to establish a config.inc.php profile with reference to the file contents. Find and modify the "Blowfish_secret" line in the configuration file and set a phrase key (this key is used for Web cookie authentication and does not require user memory).

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image062 "border=" 0 "alt=" clip_ image062 "src=" http://s3.51cto.com/wyfs02/M00/74/E2/wKioL1Ytu5Wy-JHDAABOyC6ZNS4959.jpg "height="/>650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image064 "border=" 0 "alt=" clip_ image064 "src=" http://s3.51cto.com/wyfs02/M01/74/E2/wKioL1Ytu5WTkthkAAAfGClc8AA791.jpg "height=" "/>"

3. Accessing the phpMyAdmin Web management interface

Accessing http://192.168.10.10/phpMyAdmin/in the browser, if you can see the login interface of the PhpMyAdmin system, indicates that the deployment was successful. The database can be managed within the scope of authorization after logging in with the MySQL database user (who cannot be a user with a blank password).

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image066 "border=" 0 "alt=" clip_ image066 "src=" http://s3.51cto.com/wyfs02/M02/74/E2/wKioL1Ytu5aQlXjsAAFGhJ8ZbJ0220.jpg "height=" 390 "/>

The phpMyAdmin system uses the cookie authentication method by default, and at the first visit you may be prompted to "Enable cookies to log in" at the bottom of the page, requiring the client's browser to enable the cookie mechanism. Most browsers actually support cookies by default, so the message disappears when you press F5 to refresh the page.

4. using the phpMyAdmin system

When you need to use the phpMyAdmin system, you should first log in via a database user (such as root) authorized by the MySQL server, and you will see the management interface after successful authentication. Through the phpMyAdmin suite, users can perform various database management operations within the scope of authorization, making the interface more intuitive, friendly, and greatly reducing the difficulty of remotely maintaining the MySQL database server.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image068 "border=" 0 "alt=" clip_ image068 "src=" http://s3.51cto.com/wyfs02/M00/74/E5/wKiom1Ytu2Wy9L3mAAJGuJoPBoM697.jpg "height=" 391 "/>

This article is from the "Wang Gaoli" blog, make sure to keep this source http://wanggaoli.blog.51cto.com/10422005/1706322

Build PHP (LAMP), install Zend to optimize resolution speed, and build phpMyAdmin management system on its platform to manage MySQL page

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.