標籤:xcache lamp
1、系統內容:
[[email protected] ~]# cat /etc/issueCentOS release 6.4 (Final)Kernel \r on an \m [[email protected] ~]# uname -r2.6.32-358.el6.x86_64[[email protected] ~]# ifconfig | grep Bcast: inet addr:192.168.0.200 Bcast:192.168.0.255 Mask:255.255.255.0
2、httpd 2.4源碼安裝:
請猛戳:httpd 2.4源碼安裝
3、mysql 5.5通用二進位包安裝:
請猛戳:mysql 5.5通用二進位包安裝
4、httpd2.4+mysql5.5+php5.5以模組方式整合httpd環境搭建
請猛戳:httpd2.4+mysql5.5+php5.5以模組方式整合httpd環境搭建
5、安裝xcache,為php加速
實驗環境所用xcache軟體包點擊擷取:xcache-3.2.0.tar.gz
[[email protected] xcache]# pwd/root/software/xcache[[email protected] xcache]# lsxcache-3.2.0.tar.gz
解壓、編譯安裝:
[[email protected] xcache]# tar xf xcache-3.2.0.tar.gz [[email protected] xcache]# lsxcache-3.2.0 xcache-3.2.0.tar.gz[[email protected] xcache]# cd xcache-3.2.0[[email protected] xcache-3.2.0]# /usr/local/php5.5/bin/phpize [[email protected] xcache-3.2.0]# ./configure --enable-xcache --with-php-config=/usr/local/php5.5/bin/php-config[[email protected] xcache-3.2.0]# make && make install
xcache模組組建目錄:
[[email protected] xcache-3.2.0]# ls /usr/local/php5.5/lib/php/extensions/no-debug-zts-20121212/opcache.so xcache.so
拷貝xcache設定檔到/etc/php.d目錄下,讓php能讀取到xcache.so模組:
[[email protected] xcache-3.2.0]# mkdir /etc/php.d #在編譯安裝php時此目錄不會自動建立[[email protected] xcache-3.2.0]# cp xcache.ini /etc/php.d/
重新啟動httpd,建立phpinfo測試頁面,驗證php已載入xcache.so模組:
[[email protected] xcache-3.2.0]# service httpd24 restartStopping httpd: [ OK ]Starting httpd: [ OK ][[email protected] xcache-3.2.0]# vim /usr/local/apache24/htdocs/index.php<?php phpinfo();?>
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/58/E2/wKioL1S_wbzQcFfLAANhofODSFM069.jpg" title="111111.png" alt="wKioL1S_wbzQcFfLAANhofODSFM069.jpg" />
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/58/E5/wKiom1S_wS2DR6LlAAK7ixs2jAI480.jpg" title="2222.png" alt="wKiom1S_wS2DR6LlAAK7ixs2jAI480.jpg" />
本文出自 “SNAIL” 部落格,請務必保留此出處http://357742954.blog.51cto.com/368705/1606806
為php加速--xcache部署