為php加速--xcache部署

來源:互聯網
上載者:User

標籤: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部署

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.