È«ÃæÓÅ»¯¡ªÅäÖøßÐÔÄÜlnmp¼Ü¹¹
ÔÎÄ£ºhttp://lustlost.blog.51cto.com/2600869/964845
±¾ÎIJ»Éæ¼°´óÐÍweb¼Ü¹¹£¬Ö¼ÔÚµ¥Ì¨·þÎñÆ÷ÉÏͨ¹ý¸÷ÖÖÊÖ¶Î×î´ó»¯µÄÓÅ»¯ºÍ¼ÓËÙlnmp£¬Êʺϵ¥Ì¨·þÎñÆ÷»òÕßvpsÕ¾³¤ÃÇʹÓᣱÊÕßˮƽÓÐÏÞ£¬ÒªÊÇÓиüºÃµÄÓÅ»¯ÊÖ¶ÎÇëÁôÑÔ£¬Îһ᲻¶ÏÍêÉƴ˼ܹ¹
±ÊÕßÂÞÁÐÒÔÏÂÖ÷ÒªµÄ·½Ê½½øÐÐÓÅ»¯£¬Ò»Ð©Ð¡Ï¸½ÚµÄÓÅ»¯ÔÚÏÂÃæµÄÅäÖÃÖÐÔÙ¾ßÌå˵Ã÷£º£¨ÓиüºÃµÄÕÐÊý»¶Ó´ó¼ÒÁôÑÔ£©
1.ÀûÓÃfastcgi_cache»º´æ£¬¼õÉÙnginxÓëPHP½»»¥£¬¼õÇáphpºÍÊý¾Ý¿â(mysql)µÄѹÁ¦
2.ΪzendÒýÇ滺´æopcode£¬Ê¹ÓÃX-cache»º´æopcode£¬¼õÉÙphp½Å±¾Óï¾äת»»Öмä´úÂëµÄ´ÎÊý
3.ÀûÓÃTCMallocÓÅ»¯NginxºÍmysqlµÄÄÚ´æ·ÖÅäЧÂÊ·ÃÎÊÐÔÄÜ£¬Ìá¸ß¸ß²¢·¢µÄÐÔÄÜ£¨nginx±¾Éí¶ÔÄÚ´æÓÅ»¯¾ÍºÜºÃ£¬ÕâÀïÖ÷ÒªÊÇÕë¶ÔmysqlÓÅ»¯£©
4.°²×°×îеÄlibeventÌá¸ßnginxºÍphpµÄʼþ´¥·¢ÐÔÄÜ
5.¿ªÆôgzipѹËõÍøÒ³Îļþ
6.ÓÅ»¯nginxÖÐfastcgi²ÎÊý
7.ÓÅ»¯php-fpm²ÎÊý
8.һЩϸ½ÚÏÂÃæ¾ßÌåÅäÖÃÔÙ˵
ÏÈÂÞÁÐÏÂÐèÒªÓõ½°ü
1.¿ª·¢»·¾³£º×ÔÐÐyum°²×°
2.nginx-1.0.14.tar
3.php-5.3.6.tar.bz2
4.xcache-1.3.2.tar.gz
5. mysql-5.5.22-linux2.6-i686.tar.gz
6.gperftools-2.0.tar.gz
7.×îеÄlibevent¿â
8.php¶îÍâµÄһЩ²å¼þ
Ò»¡¢Nginx£º
1¡¢½â¾öÒÀÀµ¹ØϵºÍÓÅ»¯ËùÐèµÄ×é¼þ
±àÒë°²×°nginxÐèÒªÊÂÏÈÐèÒª°²×°¿ª·¢°ü×é"Development Tools" ¡£Í¬Ê±£¬°²×°pcre-devel°ü£¬ÓÃyum°²×°¼´¿É
°²×°TCMallocºÍgoogle-perftools£¨TCMallocÖ»ÊÇgoogle-perftoolsµÄÒ»¸ö×é¼þ£¬Ö÷ÒªÊÇÓÅ»¯ÄÚ´æ·ÖÅäЧÂʺÍËٶȵģ©,Èç¹ûÊÇ64λϵͳÇëÏÈ°²×°libunwind¿â£¬ÎÒÊÇ32λϵͳ£¬¾Í²»°²×°ÁË
ÏÂÔØgoogle-perftools
http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
tar xf gperftools-2.0.tar.gz
./configure
make && make install
°²×°×îеÄlibevent Ìá¸ßʼþÐÔÄÜ
tar xf tar libevent-2.0.19-stable.tar.gz
./configure
make && make install
echo ¡°usr/local/lib¡± >/etc/ld.so.conf.d/local.conf
ldconfig
2¡¢°²×°
Ê×ÏÈÌí¼ÓÓû§nginx£¬ÊµÏÖÒÔÖ®ÔËÐÐnginx·þÎñ½ø³Ì£º
# groupadd -r nginx
# useradd -r -g nginx -s /bin/false -M nginx
tar xf nginx-1.0.14.tar.gz
½Ó×Å¿ªÊ¼±àÒëºÍ°²×°£º
# ./configure \
--prefix=/usr \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \ #¼ÓÔØgzipѹËõÄ£¿é
--http-client-body-temp-path=/var/tmp/nginx/client/ \
--http-proxy-temp-path=/var/tmp/nginx/proxy/ \
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \
--http-scgi-temp-path=/var/tmp/nginx/scgi \
--with-pcre \
--with-google_perftools_module \ #¼ÓÔØ google_perftoolsÄ£¿é
--with-cc-opt='-O3' \ #ÓÅ»¯GCC±àÒë
--with-cup-opt=pentium4 \ # Ö¸¶¨´¦ÀíÆ÷ÀàÐÍ£¬¾ßÌåÀàÐÍÖ´ÐÐ./configure --help°ïÖú
# make && make install
3¡¢ÎªnginxÌṩSysV init½Å±¾:
н¨Îļþ/etc/rc.d/init.d/nginx£¬ÄÚÈÝÈçÏ£º
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
# pidfile: /var/run/nginx.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
nginx="/usr/sbin/nginx"
prog=$(basename $nginx)
NGINX_CONF_FILE="/etc/nginx/nginx.conf"
[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
lockfile=/var/lock/subsys/nginx
make_dirs() {
# make required directories
user=`nginx -V 2>&1 | grep "configure arguments:" | sed 's/[^*]*--user=\([^ ]*\).*/\1/g' -`
options=`$nginx -V 2>&1 | grep 'configure arguments:'`
for opt in $options; do
if [ `echo $opt | grep '.*-temp-path'` ]; then
value=`echo $opt | cut -d "=" -f 2`
if [ ! -d "$value" ]; then
# echo "creating" $value
mkdir -p $value && chown -R $user $value
fi
fi
done
}
start() {
[ -x $nginx ] || exit 5
[ -f $NGINX_CONF_FILE ] || exit 6
make_dirs
echo -n $"Starting $prog: "
daemon $nginx -c $NGINX_CONF_FILE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog -TERM
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
configtest || return $?
stop
sleep 1
start
}
reload() {
configtest || return $?
echo -n $"Reloading $prog: "
killproc $nginx -HUP
RETVAL=$?
echo
}
force_reload() {
restart
}
configtest() {
$nginx -t -c $NGINX_CONF_FILE
}
rh_status() {
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart|configtest)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
exit 2
esac
¶øºóΪ´Ë½Å±¾¸³ÓèÖ´ÐÐȨÏÞ£º
# chmod +x /etc/rc.d/init.d/nginx
Ìí¼ÓÖÁ·þÎñ¹ÜÀíÁÐ±í£¬²¢ÈÃÆ俪»ú×Ô¶¯Æô¶¯£º
# chkconfig --add nginx
# chkconfig nginx on
¶øºó¾Í¿ÉÒÔÆô¶¯·þÎñ²¢²âÊÔÁË£º
# service nginx start
¶þ¡¢°²×°mysql-5.5.20
1¡¢Ð½¨Óû§ÒÔ°²È«·½Ê½ÔËÐнø³Ì£º
# groupadd -r mysql
# useradd -g mysql -r -s /sbin/nologin -M -d /mydata/data mysql
# chown -R mysql:mysql /mydata/data
2¡¢°²×°²¢³õʼ»¯mysql-5.5.20
# tar xf mysql-5.5.20-linux2.6-i686.tar.gz -C /usr/local
# cd /usr/local/
# ln -sv mysql-5.5.20-linux2.6-i686 mysql
# cd mysql
# chown -R mysql:mysql .
# scripts/mysql_install_db --user=mysql --datadir=/mydata/data
# chown -R root .
3¡¢ÎªmysqlÌṩÖ÷ÅäÖÃÎļþ£º
# cd /usr/local/mysql
# cp support-files/my-large.cnf /etc/my.cnf
²¢Ð޸ĴËÎļþÖÐthread_concurrencyµÄֵΪÄãµÄCPU¸öÊý³ËÒÔ2£¬ÎÒÕâÀïÊǵ¥ºËµÄ£º
thread_concurrency = 2
ÁíÍ⻹ÐèÒªÌí¼ÓÈçÏÂÐÐÖ¸¶¨mysqlÊý¾ÝÎļþµÄ´æ·ÅλÖãº
datadir = /mydata/data
4¡¢ÎªmysqlÌṩsysv·þÎñ½Å±¾£º
# cd /usr/local/mysql
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
#ÐÞ¸ÄÆô¶¯½Å±¾ Ìí¼Ó
Ìí¼ÓÖÁ·þÎñÁÐ±í£º
# chkconfig --add mysqld
# chkconfig mysqld on
5¡¢Êä³ömysqlµÄÍ·ÎļþÖÁϵͳͷÎļþ·¾¶/usr/include£º
Õâ¿ÉÒÔͨ¹ý¼òµ¥µÄ´´½¨Á´½ÓʵÏÖ£º
# ln -sv /usr/local/mysql/include /usr/include/mysql
6¡¢Êä³ömysqlµÄ¿âÎļþ¸øϵͳ¿â²éÕÒ·¾¶£º
# echo '/usr/local/mysql/lib' > /etc/ld.so.conf.d/mysql.conf
¶øºóÈÃϵͳÖØÐÂÔØÈëϵͳ¿â£º
# ldconfig
7¡¢ÐÞ¸ÄPATH»·¾³±äÁ¿£¬ÈÃϵͳ¿ÉÒÔÖ±½ÓʹÓÃmysqlµÄÏà¹ØÃüÁî¡£
10.ÉèÖÃMysqlÔËÐÐʱ¼ÓÔØtcmalloc£¬Ìá¸ßÄÚ´æЧÂÊ
vi /usr/local/mysql/bin/mysqld_safe
ÔÚ# executing mysqld_safeµÄÏÂÒ»ÐУ¬¼ÓÈëÒÔÏÂÄÚÈÝ
export LD_PRELOAD="/usr/local/lib/libtcmalloc.so"
¶øºó¾Í¿ÉÒÔÆô¶¯·þÎñ²âÊÔʹÓÃÁË¡£
Èý¡¢±àÒë°²×°php-5.3.6
1¡¢½â¾öÒÀÀµ¹Øϵ£º
Èç¹ûÏëÈñàÒëµÄphpÖ§³Ömcrypt¡¢mcrypt¡¢mhashÀ©Õ¹ºÍlibevent,ÏÂÔØÈçϼ¸¸örpm°ü²¢°²×°Ö®£¨libevent֮ǰװnginxʱÒѾװ¹ý£©£º
libmcrypt-2.5.8-4.el5.centos.i386.rpm
libmcrypt-devel-2.5.8-4.el5.centos.i386.rpm
mhash-0.9.9-1.el5.centos.i386.rpm
mhash-devel-0.9.9-1.el5.centos.i386.rpm
mcrypt-2.6.8-1.el5.i386.rpm
×îºÃʹÓÃÉý¼¶µÄ·½Ê½°²×°ÉÏÃæµÄrpm°ü£¬ÃüÁî¸ñʽÈçÏ£º
# rpm -Uvh *.rpm
2¡¢±àÒë°²×°php-5.3.10
# tar xf php-5.3.6.tar.bz2
# cd php-5.3.6
# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql
--with-openssl --enable-fpm --enable-sockets --enable-sysvshm
--with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring
--with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib-dir
--with-libxml-dir=/usr --enable-xml --with-mhash --with-mcrypt
--with-config-file-path=/etc/php --with-config-file-scan-dir=/etc/php
--with-bz2 --with-curl
#×¢ÒâÒª½áºÏnginxµÄfastcgiÕûºÏphp£¬±ØÐëÒª´ò¿ªphp-fpm¹ÜÀí³ÌÐò£¬Ê¹nginxͨ¹ý½»»¥php-fpmÕûºÏPHP
# make && make intall
ΪphpÌṩÅäÖÃÎļþ£º
# cp php.ini-production /etc/php/php.ini
Ϊphp-fpmÌṩSysv init½Å±¾£¬²¢½«ÆäÌí¼ÓÖÁ·þÎñÁÐ±í£º
# cp sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm
# chmod +x /etc/rc.d/init.d/php-fpm
# chkconfig --add php-fpm
# chkconfig php-fpm on
Ϊphp-fpmÌṩÅäÖÃÎļþ£º
# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
ÓÅ»¯php-fpmµÄÅäÖÃÎļþ£¨¾ßÌåÊýÖµ°´ÕÕ·þÎñÆ÷ÅäÖöø¶¨£©£º
# vim /usr/local/php/etc/php-fpm.conf
ÓÅ»¯pm.µÄÅäÖãº
pm.max_children = 50 #×î´ó½ø³ÌÊý
pm.start_servers = 5 #³õʼ½ø³ÌÊý
pm.min_spare_servers = 2 #×îС¿ÕÏнø³Ì
pm.max_spare_servers = 8 #×î´ó¿ÕÏнø³Ì
pid = /usr/local/php/var/run/php-fpm.pid
½ÓÏÂÀ´¾Í¿ÉÒÔÆô¶¯php-fpmÁË£º
# service php-fpm start
ʹÓÃÈçÏÂÃüÁîÀ´ÑéÕý£¨Èç¹û´ËÃüÁîÊä³öÓÐÖм¸¸öphp-fpm½ø³Ì¾Í˵Ã÷Æô¶¯³É¹¦ÁË£©£º
# ps aux | grep php-fpm
ËÄ¡¢ÕûºÏnginxºÍphp5,ÀûÓÃfastcgi_cache»º´æ¼ÓËÙnginxºÍphp½»»¥
1¡¢±à¼/etc/nginx/nginx.conf£¬ÆôÓÃÈçÏÂÑ¡Ï
ÔÚhttpd¶Î¼ÓÈëÏÂÃæ²ÎÊý
fastcgi_connect_timeout 300;
Ö¸¶¨Á¬½Óµ½ºó¶ËFastCGIµÄ³¬Ê±Ê±¼ä¡£
fastcgi_send_timeout 300;
ÏòFastCGI´«ËÍÇëÇóµÄ³¬Ê±Ê±¼ä£¬Õâ¸öÖµÊÇÖ¸ÒѾÍê³ÉÁ½´ÎÎÕÊÖºóÏòFastCGI´«ËÍÇëÇóµÄ³¬Ê±Ê±¼ä¡£
fastcgi_read_timeout 300;
½ÓÊÕFastCGIÓ¦´ðµÄ³¬Ê±Ê±¼ä£¬Õâ¸öÖµÊÇÖ¸ÒѾÍê³ÉÁ½´ÎÎÕÊÖºó½ÓÊÕFastCGIÓ¦´ðµÄ³¬Ê±Ê±¼ä¡£
fastcgi_buffer_size 32k;
Ö¸¶¨¶ÁÈ¡FastCGIÓ¦´ðµÚÒ»²¿·ÖÐèÒªÓöà´óµÄ»º³åÇø£¬Ò»°ãµÚÒ»²¿·ÖÓ¦´ð²»»á³¬¹ý1k£¬ÓÉÓÚÒ³Ãæ´óСΪ4k£¬ËùÒÔÕâÀïÉèÖÃΪ4k¡£
fastcgi_buffers 4 32k;
¶¨±¾µØÐèÒªÓöàÉٺͶà´óµÄ»º³åÇøÀ´»º³åFastCGIµÄÓ¦´ðÇëÇó¡£Èç¹ûÒ»¸öPHP½Å±¾Ëù²úÉúµÄÒ³Ãæ´óСΪ256KB£¬ÄÇô»áΪÆä·ÖÅä4¸ö64KBµÄ»º³åÇø
À´»º´æ£»Èç¹ûÒ³Ãæ´óС´óÓÚ256KB£¬ÄÇô´óÓÚ256KBµÄ²¿·Ö»á»º´æµ½fastcgi_tempÖ¸¶¨µÄ·¾¶ÖУ¬µ«ÊÇÕâ²¢²»ÊǺ÷½·¨£¬ÒòΪÄÚ´æÖеÄÊý¾Ý´¦
ÀíËÙ¶ÈÒª¿ìÓÚÓ²ÅÌ¡£Ò»°ãÕâ¸öÖµÓ¦¸ÃΪվµãÖÐPHP½Å±¾Ëù²úÉúµÄÒ³Ãæ´óСµÄÖмäÖµ£¬Èç¹ûÕ¾µã´ó²¿·Ö½Å±¾Ëù²úÉúµÄÒ³Ãæ´óСΪ256KB£¬ÄÇô¿ÉÒÔ°ÑÕâ¸öÖµÉèÖÃ
Ϊ¡°16 16k¡±¡¢¡°4 64k¡±µÈ¡£
fastcgi_busy_buffers_size 64k;
ĬÈÏÖµÊÇfastcgi_buffersµÄÁ½±¶¡£
fastcgi_temp_file_write_size 64k;
ÔÚдÈëfastcgi_temp_pathʱ½«Óöà´óµÄÊý¾Ý¿é£¬Ä¬ÈÏÖµÊÇfastcgi_buffersµÄÁ½±¶¡£
fastcgi_cache_path /var/logs/nginx/fastcgi_cache_dir levels=1:2 keys_zone=cache_fastcgi:64m inactive=1d max_size=10g;
Õâ¸öÖ¸ÁîΪFastCGI»º´æÖ¸¶¨Ò»¸ö·¾¶(ÊÖ¶¯´´½¨´ËĿ¼)£¬Ä¿Â¼½á¹¹µÈ¼¶£¬¹Ø¼ü×ÖÇøÓò´æ´¢Ê±¼äºÍ·Ç»î¶¯É¾³ýʱ¼ä¡£ÒÔ¼°×î´óÕ¼Óÿռ䡣
ÔÚµ÷ÓÃphpµÄlocationÖе÷ÓÃÒÔÉÏ»º´æÅäÖÃ
location ~ \.php$ {
root /var/www/html/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_cache cache_fastcgi;
±íʾ¿ªÆôFastCGI»º´æ²¢ÎªÆäÖ¸¶¨Ò»¸öÃû³Æ¡£
fastcgi_cache_valid 200 302 301 1h;
fastcgi_cache_valid any 1m;
Ϊָ¶¨µÄÓ¦´ð´úÂëÖ¸¶¨»º´æʱ¼ä£¬ÈçÉÏÀýÖн«200£¬302 301Ó¦´ð»º´æһСʱ£¬ÆäËûΪ1·ÖÖÓ¡£
fastcgi_cache_min_uses 1;
ÉèÖÃÁ´½ÓÇëÇ󼸴ξͱ»»º´æ¡£
fastcgi_cache_use_stale error timeout invalid_header http_500;
¶¨ÒåÄÄЩÇé¿öÏÂÓùýÆÚ»º´æ
fastcgi_cache_key $request_method://$host$request_uri;
×¢ÒâÒ»¶¨Òª¼ÓÉÏ$request_method×÷Ϊcache key£¬·ñÔòÈç¹ûHEADÀàÐ͵ÄÏÈÇëÇó»áµ¼ÖºóÃæµÄGETÇëÇó·µ»ØΪ¿Õ
}
2¡¢±à¼/etc/nginx/fastcgi_params£¬½«ÆäÄÚÈݸü¸ÄΪÈçÏÂÄÚÈÝ£º
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
²¢ÔÚËùÖ§³ÖµÄÖ÷Ò³Ãæ¸ñʽÖÐÌí¼Óphp¸ñʽµÄÖ÷Ò³£¬ÀàËÆÈçÏ£º
location / {
root /var/www/html;
index index.php index.html index.htm;
}
¶øºóÖØÐÂÔØÈënginxµÄÅäÖÃÎļþ£º
# service nginx reload
3¡¢ÔÚ/usr/htmlн¨index.phpµÄ²âÊÔÒ³Ã棬²âÊÔphpÊÇ·ñÄÜÕý³£¹¤×÷£º
# cat > /var/www/html/index.php << EOF
<?php
phpinfo();
?>
½ÓמͿÉÒÔͨ¹ýä¯ÀÀÆ÷·ÃÎʴ˲âÊÔÒ³ÃæÁË¡£
Îå¡¢°²×°xcache£¬Îªphp¼ÓËÙ£º
1¡¢°²×°
# tar xf xcache-1.3.2.tar.gz
# cd xcache-1.3.2
# /usr/local/php/bin/phpize
# ./configure --enable-xcache --with-php-config=/usr/local/php/bin/php-config
# make && make install
°²×°½áÊøʱ£¬»á³öÏÖÀàËÆÈçÏÂÐУº
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
2¡¢±à¼php.ini£¬ÕûºÏphpºÍxcache£º
Ê×ÏȽ«xcacheÌṩµÄÑùÀýÅäÖõ¼Èëphp.ini
# cat xcache.ini >> /etc/php/php.ini
˵Ã÷£ºxcache.iniÎļþÔÚxcacheµÄÔ´ÂëĿ¼ÖС£
½ÓÏÂÀ´±à¼/usr/local/php/lib/php.ini£¬ÕÒµ½zend_extension¿ªÍ·µÄÐУ¬ÐÞ¸ÄΪÈçÏÂÐУº
zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/xcache.so
3¡¢ÖØÐÂÆô¶¯php-fpm
# service php-fpm restart
È«²¿¹¤×÷OK¡£¡£¡£
ÍƼöÐÅÏ¢
- linuxÃüÁîѧϰ±Ê¼Ç£¨11£©£ºnlÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨5£©£ºrmÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨4£©£ºmkdirÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨1£©£ºlsÃüÁî
- ½«CentosµÄyumÔ´¸ü»»Îª¹úÄڵİ¢ÀïÔÆÔ´
- ʹÓÃNginxÌí¼Óheader·ÀÖ¹ÍøÒ³±»frame
- linuxϼÓËÙscp´«Êä´óÎļþµÄËÙ¶È
- linuxϵͳÉ϶ÔnginxÈÕÖ¾·Ö¸î´¦Àí
- lnmp/nginxϵͳÕæÕýÓÐЧµÄͼƬ·ÀµÁÁ´ÍêÕûÉèÖÃÏê½â
- Í»ÆÆÊ®Íò²¢·¢µÄNginxµÄÅäÖü°ÓÅ»¯
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- ²éÕÒ²¢É¾³ý.svnĿ¼Îļþ
- redis ÆßÖÖÊý¾ÝÀàÐ͵ÄʹÓó¡¾°
- linux ÏÂÎļþ¸´ÖƵ½windowsÏÂÂÒÂëµÄ½â¾ö°ì·¨
- nginx³öÏÖ502 upstream sent too big he....
- linuxÏÂsudoÅäÖÃÏê½â
- linuxÃüÁîѧϰ±Ê¼Ç£¨15£©£ºtailÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨14£©£ºheadÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨13£©£ºlessÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨12£©£ºmoreÃüÁî
- ¼ÓÃÜËã·¨±È½Ï3DES AES RSA ECC MD5 SHA1µÈ
ÆÀÂÛ