Deploy nginx+mysql+php under Centos 6.2

Source: Internet
Author: User
Tags execution mysql mysql query php and php code php script mysql database zend

#lnmp是什么?

1.Linux operating System (Linux), is a kind of UNIX computer operating system collectively. The Linux operating system's kernel name is also "Linux". The Linux operating system is also the most famous example of free software and open source development.

2.Nginx ("Engine X") is a high-performance HTTP and reverse proxy server, as well as a IMAP/POP3/SMTP proxy server. Nginx was developed by Igor Sysoev, the second rambler.ru site for Russian traffic, which has been running for more than four years at the site. Igor releases the source code in the form of a BSD-like license. Since the Nginx release for four years, Nginx has been known for its stability, rich feature sets, sample configuration files, and low system resource consumption. At present, the major domestic portal sites have been deployed nginx, such as Sina, NetEase, Tencent, etc. several important domestic video sharing sites have also deployed nginx, such as six rooms, cool 6. Recently found Nginx technology in the domestic increasingly hot, more and more sites began to deploy Nginx.

What's 3.PHP?

PHP ("Php:hypertext preprocessor", the acronym for Hypertext Preprocessor) is a widely used, open source, multipurpose scripting language that can be embedded in HTML, especially for Web development.

4.MySQL is an open source small relational database management system, developers for the Swedish MySQL AB company. Currently, MySQL is widely used in small and medium Web sites on the Internet. Because of its small size, speed, the total cost of ownership is low, especially the characteristics of open source, many small and medium-sized Web sites in order to reduce the total cost of ownership of the site to choose MySQL as a Web site database.

Features of MySQL:

Use C and C + + and use a variety of compilers for testing to ensure the portability of the source code

Supports AIX, FreeBSD, HP-UX, Linux, Mac OS, Novell Netware, OpenBSD, Os/2 Wrap, Solaris, Windows, and many other operating systems

Provides APIs for a variety of programming languages. These programming languages include C, C + +, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl.

Multi-Threading support for full utilization of CPU resources

Optimized SQL query algorithm to effectively improve query speed

Can be applied to a client server network environment as a separate application, and can be embedded into other software as a library

Multilingual support, common encodings such as GB 2312, BIG5, Japanese shift_jis, etc. can be used as data table names and data column names

Provides a variety of database connectivity pathways, such as TCP/IP, ODBC, and JDBC

Provides management tools for managing, reviewing, and optimizing database operations

Can handle large databases with thousands records

Application of MySQL:

With other large databases such as Oracle, DB2, SQL Server, etc. compared to MySQL has its own shortcomings, such as small size, limited functionality (MySQL does not support the view (has been included in the 5.1 version of the development plan), events, etc.), but this does not reduce its popularity. MySQL provides more than enough functionality for average personal users and small and medium businesses, and because MySQL is open source software, it can significantly reduce TCO.

Currently the internet is popular on the structure of the Web site is lamp (linux+apache+mysql+php), that is, using Linux as the operating system, Apache as a Web server, MySQL as a database, PHP as a server-side script interpreter. Since these four software are open source software that follows the GPL, it is possible to build a stable, free web site system without spending a penny on it.

MySQL Management:

You can use command-line tools to manage MySQL databases (commands MySQL and mysqladmin), or you can download graphics management tools from MySQL's web site mysql administrator and MySQL Query Browser.

phpMyAdmin is a MySQL database system management program written by PHP that allows managers to manage MySQL repositories using web interfaces.

Phpmybackuppro is also written in PHP and can create and manage databases through web interfaces. It can create pseudo cronjobs that can be used to automatically back up the MySQL database at a certain time or cycle.

MySQL Storage engine:

MyISAM MySQL's default database, most commonly used. High insertion, query speed, but no transaction support

InnoDB transaction database's preferred engine, supports acid transactions, supports row-level locking

BDB from Berkeley DB, another option for transactional databases, supporting other transactional features such as commit and rollback

Memory storage engine with all the data in memory, with extremely high insertion, update and query efficiency. But it takes up memory space that is proportional to the amount of data. And its contents are lost when MySQL restarts

Merge merges a number of MyISAM tables together to form a whole, which is useful in large scale data storage

Archive is ideal for storing large numbers of independent, historically recorded data. Because they are not often read. Archive has an efficient insertion speed, but its support for queries is relatively poor

Federated will combine different MySQL servers to logically form a complete database. Ideal for distributed applications CLUSTER/NDB high redundancy storage engines, combined with multiple data machines to provide services to improve overall performance and security. Suitable for applications with large data volume, high safety and performance requirements

CSV logical storage engine that divides data by commas

Blackhole Black hole engine, any data written will disappear.

In addition, the MySQL storage engine interface is well defined. Interested developers write their own storage engine by reading the document.

MySQL's most common Application architecture:

Single point, suitable for small scale applications

Replication (Replication), suitable for small and medium scale applications

Cluster (Cluster), suitable for large-scale applications

The alpha version of Mysql6.0 was released in early 2007 and the new edition adds support for the Falcon storage engine. Falcon is a self-developed engine of the MySQL community that supports acid-feature transactions, supports row locks, and has high performance concurrency. Mysql AB wants to replace the already popular InnoDB engine with Falcon because Innobase, which owns the latter technology, has been acquired by rival Oracle.

5.zend,eaccelerator These two are used to speed up or optimize PHP's speed.

In fact, Zend is a company and has several products. The Zend in this article refers to Zendoptimizer.zendoptimizer is to use to accelerate or optimize the encrypted PHP code

Zendoptimizer is used to improve the execution speed of PHP applications. The principle of implementation is to optimize the code generated by the running compiler (Run-time Compiler) before the program is finally executed. In general, PHP programs that use Zend Optimizer are 40% to 100% faster than those that are not used. This means that visitors to the site can browse the Web more quickly, thus accomplishing more business and creating better customer satisfaction.

6.eaccelerator is a free and open source PHP accelerator, optimized and dynamic content caching, improve the performance of PHP script cache performance, so that PHP script in the compiled state, the cost of the server almost completely eliminated. It also optimizes the script to accelerate its execution efficiency. Make your PHP program code more efficient 1-10 times faster

Related Article

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.