<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Linux Blog &#187; fedora</title>
	<atom:link href="http://linuxblog.ro/tag/fedora/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxblog.ro</link>
	<description>UNIX, LINUX, BSD, OSX</description>
	<lastBuildDate>Fri, 02 Jul 2010 09:01:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to install XCache for Centos / Redhat / Fedora &#8211; Php5</title>
		<link>http://linuxblog.ro/how-to-install-xcache-for-centos-redhat-fedora-php5/</link>
		<comments>http://linuxblog.ro/how-to-install-xcache-for-centos-redhat-fedora-php5/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 09:49:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[xcache]]></category>

		<guid isPermaLink="false">http://linuxblog.ro/?p=521</guid>
		<description><![CDATA[XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce serverload.]]></description>
			<content:encoded><![CDATA[<p><span>H</span>ow do I install Xcache opcode cacher  for PHP 5 under RHEL / CentOS version 5.0 server?</p>
<p>XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce serverload.</p>
<h2>Step # 1: Download xcache source code</h2>
<p>Use wget command to download latest stable release:<br />
<code># cd  /opt<br />
# wget http://xcache.lighttpd.net/pub/Releases/1.2.1/xcache-1.2.1.tar.gz</code></p>
<h2>Step # 2: Untar tar ball</h2>
<p>Use tar command:<br />
<code># tar -zxvf xcache-1.2.1.tar.gz<br />
# cd xcache-1.2.1<br />
</code></p>
<h2>Step # 2: Compile and install xcahce</h2>
<p>Use phpize command to  prepare xcache as a PHP extension for compiling:<br />
<code># phpize</code><br />
Configure, compile and install xcache:<br />
<code># ./configure --enable-xcache<br />
# make<br />
# make install </code></p>
<h3>Default xcache.so installation location</h3>
<ul>
<li>64 bit PHP module installed at <strong>/usr/<span style="color: #ff0000;">lib64</span>/php/modules/xcache.so</strong></li>
<li>32 bit PHP module installed at <strong>/usr/<span style="color: #ff0000;">lib</span>/php/modules/xcache.so</strong></li>
</ul>
<h2>Step # 3: Create xcache.ini file</h2>
<p>Under RHEL / CentOS, you place php modules configuration at /etc/php.d/ directory:<br />
<code># cd /etc/php.d/</code><br />
Create xcache.ini  file:<br />
<code># vi xcache.ini</code><br />
Append configuration directives:</p>
<pre>[xcache-common]
; change me - 64 bit php =&gt; /usr/lib64/php/modules/xcache.so
; 32 bit php =&gt; /usr/lib/php/modules/xcache.so
zend_extension = /usr/lib64/php/modules/xcache.so

[xcache.admin]
xcache.admin.auth = On
xcache.admin.user = "mOo"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = ""

[xcache]
xcache.shm_scheme =        "mmap"
xcache.size  =               32M
xcache.count =                 1
xcache.slots =                8K
xcache.ttl   =              3600
xcache.gc_interval =         300

; Same as aboves but for variable cache
; If you don't know for sure that you need this, you probably don't
xcache.var_size  =            0M
xcache.var_count =             1
xcache.var_slots =            8K
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300

; N/A for /dev/zero
xcache.readonly_protection = Off

xcache.mmap_path =    "/dev/zero"

xcache.cacher =               On
xcache.stat   =               On</pre>
<p>Save and close the file.</p>
<p>Alternatively, you can also copy default xcache.ini to /etc/php.d/<br />
<code># cp xcache.ini /etc/php.d/<br />
# vi /etc/php.d/xcache.ini</code></p>
<p>Restart your Apache web server:<br />
<code># service httpd restart</code></p>
<p>If you are using Lighttpd web server, enter:<br />
<code># service lighttpd restart</code></p>
<h2>Step # 4: Make sure xcache is working</h2>
<p>Type the following command for verification:<br />
<code>$ php -v</code><br />
Output:</p>
<pre>PHP 5.1.6 (cli) (built: Nov 20 2007 11:11:52)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with <span style="color: #ff0000;">XCache v1.2.1, Copyright (c) 2005-2007, by mOo</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://linuxblog.ro/how-to-install-xcache-for-centos-redhat-fedora-php5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
