Nginx + PHP + Mysql (php frm 방식)
Nginx + PHP + Mysql (php-frm 방식)
글쓴이 :
최고관리자
조회 : 2,884
테스트환경
CentOS 4.7, 5.3
(CentOS 5.3의 경우 pear에러가 났습니다. 해결방법도 첨부합니다.)
준비파일
* http://kr.php.net/get/php-5.2.10.tar.gz/from/this/mirror
* http://php-fpm.org/downloads/php-5.2.10-fpm-0.5.13.diff.gz
* http://www.nginx.eu/download/sources/nginx-0.7.61.tar.gz
* http://meteor.kr/linux/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
1. MySQL 설치
# yum install -y mysql mysql-server mysql-connector-odbc mysql-devel
서버의 상태에 따라 아래의 설정파일을 이용합니다
[MySQL 환경 설정]
my-huge.cnf
1G 이상 (시스템 메모리)
my-large.cnf
512M ~ 1G
my-medium.cnf
128M ~ 256M
my-small.cnf
64M 이하
# cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
# mysql_install_db
# chown -R mysql:mysql /var/lib/mysql/
# /etc/rc.d/init.d/mysqld start
# mysqladmin -u root password "비밀번호"
2. 필요한 라이브러리 설치
# yum install -y libtool-ltdl-devel curl curl-devel libxml2
libxml2-devel libjpeg-devel libpng-devel libmcrypt libmcrypt-devel pcre
pcre-devel openssl openssl-devel
3. PHP & FPM 설치
# tar xvzf php-5.2.10.tar.gz
# gzip -cd php-5.2.10-fpm-0.5.13.diff.gz | patch -d php-5.2.10 -p1
# cd php-5.2.10
# CFLAGS=
Ïà¹ØÎĵµ£º
ÔÚÉú²úÓ¦ÓÃÖУ¬Ä³Ì¨“Nginx+PHP+MySQL”½Ó¿ÚÊý¾Ý·þÎñÆ÷£¬°çÑݵĽÇÉ«Ê®·ÖÖØÒª£¬Èç¹û·þÎñÆ÷Ó²¼þ»òNginx¡¢MySQL·¢Éú¹ÊÕÏ£¬¶ø¶Ìʱ¼äÄÚÎÞ·¨»Ö¸´£¬ºó¹û½«·Ç³£ÑÏÖØ¡£ÎªÁ˱ÜÃâµ¥µã¹ÊÕÏ£¬ÎÒÉè¼ÆÁË´ËÌ×·½°¸£¬±àдÁËfailover.sh½Å±¾£¬ÊµÏÖÁËË«»ú»¥±¸¡¢È«×Ô¶¯Çл»£¬¹ÊÕÏתÒÆʱ¼äÖ»Ð輸ʮÃë¡£
¡¡¡¡Ò»¡¢Ë«»ú»¥±¸¡¢È«×Ô¶¯Çл»·½ ......
ÔÎÄÍøÖ·£ºhttp://knowhow.innovatedigital.com/mysql-monitoring.html
MySQLÊÇ×îÁ÷ÐеĿª·ÅÔ´´úÂë¹ØϵÊý¾Ý¿âϵͳ¡£ÆäÐÔÄܺÍÒ×ÓÃÐÔ£¬Ê¹Æä³ÉΪLAMP¼Ü¹¹µÄÖÐÐÄÖ§ÖùÖ®Ò»¡£
MySQL¼à¿ØÒ»Ö±ÊǹØ×¢MySQLÊý¾Ý¿âÐÔÄܺÍMySQLÊý¾Ý¿âÔËά¹ÜÀí¼¼ÊõÈËÔ±µÄ·Ç³£¸ÐÐËȤ»°Ìâ¡£ÈçºÎÈÃÄúµÄMySQLÊý¾Ý¿â° ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>PHP·ÖÒ³</tit ......
ºÜ¾ÃûÓÐЩһЩÓÐÓô¦µÄµÄ¶«Î÷ÁË£¡½ñÌì¾Í²»ºúÂÒµÄ䶫Î÷ÁË!дһЩÓÐÓõģ¡µ±È»Ç°ÌáÏÂÊǺܸÐлºÜ¶à¾³£À´ÎÒ²©¿ÍµÄÅóÓÑһϣ¡¶àл´ó¼Ò£¡£¡£¡£¡£¡
½ñÌìдµÄÊǹØÓÚphp»·¾³¼ÜÉèµÄµÚÒ»ÖÖ·½Ê½£¡µ±È»ÎҾͲ»½ØͼÁË£¡´ó¼ÒÖ»Òª°´ÕÕ²Ù×÷¾Í¿ÉÒÔʵÏֵģ¡
Ò»¡¢°²×° PHP £º±¾ÎÄPHP°²×°Â·¾¶È¡ÎªD:\php\php4\(Ϊ±Ü»ìÏý£¬PHP5.1.x°æ±¾°²×°Â·¾ ......