LNMP environment configuration server (linux + nginx + mysql + php)

In the case of high concurrent connections, Nginx Apache server is a good substitute. Nginx layer 7 also can be used as load-balancing server to use. Nginx 0.8.46 + PHP 5.2.14 (FastCGI) concurrent connections can withstand more than 30,000, equivalent to 10 times in the same environment Apache

I. Introduction
  Nginx Russians prepared very lightweight HTTP servers, Nginx, it's pronounced "engine X", is a high-performance HTTP server and reverse proxy, but also a IMAP / POP3 / SMTP proxy server . Nginx is a Russian Igor Sysoev of Russia visited the second Rambler.ru site development, it has been the site running for more than three years. Igor Sysoev when the project is built, based BSD license.
  In the case of high concurrent connections, Nginx Apache server is a good substitute. Nginx layer 7 also can be used as load-balancing server to use. Nginx 0.8.46 + PHP 5.2.14 (FastCGI) concurrent connections can withstand more than 30,000, equivalent to 10 times under the same Apache environments.

  Nginx beyond the performance and stability of the Apache, the domestic use Nginx as a Web server site more and more, including Sina blog, podcast Sina, Netease news, Tencent, Sohu blog portals such as channels, six rooms, 56.com and other video sharing sites, baby naming nets Discuz! official forums, Mizuki community and other well-known forum, Shanda online, Kingsoft online games site Happy net, watercress, all networks, YUPOO album, Kingsoft love PowerWord, Thunder and other emerging online Web 2.0 sites.

  Why Nginx much higher performance than Apache? This is thanks to Nginx uses the latest epoll (Linux 2.6 kernel) and kqueue (freebsd) network I / O model, while the Apache is using traditional select models. Under the present Linux can withstand the high concurrent access Squid, Memcached is used in both epoll network I / O model.
   Handle a large number of read and write connections, Apache employed select network I / O model is very inefficient. Here use a metaphor to resolve the differences between the select model using Apache and Nginx epoll models were used:
  Suppose you studying at the university, there are many live in dormitory rooms, your friends want to come to you. select version dorm aunt would take your friends one by one to find the room until you find you so far. The epoll version dorm aunt would write down each student's room number, when your friends come, just tell your friends where you live to a room, your friends do not personally took over the building to find someone. If to 10,000 people, are looking for their own students live in this building, select epoll version and version dorm aunt, who's higher efficiency, self-evident. Similarly, in high-concurrency server, the polling I / O is one of the most time-consuming operation, higher performance select and epoll whose performance is also very clear.

  

  Nginx official Chinese Wikipedia: http: //wiki.nginx.org/NginxChs

Second, the system environment

Platform: RHEL 5.4 (System Requirements: Linux 2.6+ kernel)

Nginx version: nginx / 1.0.15

Mysql version: 5.1.35-log Source distribution

Php version: php-5.2.10

Third, the installation ready

1, access to relevant open source and install

Other Linux distributions such as RedHat RedHat RPM packages can be found in these libraries from the installation CD-ROM can be directly used CentOS RPM package installed.
Rpm following packages can be installed, if the packet is associated, is installed with the installation.
gcc gcc-c ++ autoconf libjpeg libjpeg -devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
more packets if installed, do not need to install.

2, RPM package search site
http://rpm.pbone.net/
http://www.rpmfind.net/

http://code.google.com/p/zed-lnmp/

Guess you like

Origin www.cnblogs.com/murongyuling/p/10983665.html
Recommended