Stuff…

I know I will forget.

Stuff… header image 2

xcache on CentOS 5.5 with Atomic Turtle packages

August 3rd, 2010 · 3 Comments

“XCache is a fast, stable  PHP opcode cacher that has been tested and is now running on production servers under high load. It is tested (on linux) and supported on all of the latest  PHP cvs branches.”

What we did to install it…

First, made sure that php-devel was installed from the Atomic repository.

# yum install php-devel
Running Transaction
Installing     : imake                                                                                                        1/4
Installing     : autoconf                                                                                                     2/4
Installing     : automake                                                                                                     3/4
Installing     : php-devel

Downloaded xcache.

# cd files
files# wget http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz
files# tar -zxvf xcache-1.3.0.tar.gz
files# cd xcache-1.3.0

Ran phpize:

xcache-1.3.0# phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519

Ran:

xcache-1.3.0# ./configure –enable-xcache
xcache-1.3.0# make
xcache-1.3.0# make install
Installing shared extensions:     /usr/lib/php/modules/

Note: If the OS was running 64 bit it would have installed into /usr/lib64/php/modules

Now, it is time to configure xcache or simply copy over the xcache.ini file into /etc/php.d/ and modify.  The cyberciti.biz URL below includes a custom configuration file.

xcache-1.3.0# cp xcache.ini  /etc/php.d/
xcache-1.3.0# vi /etc/php.d/xcache.ini

Edit the configuration to suit your needs and restart your service:

# service httpd restart

Check xcache is working with a phpinfo() script on a site, or, run the command line “php -v“.

Links:

Tags: Linux · Operating System

3 responses so far ↓

  • 1 Chris // Oct 12, 2010 at 11:23 pm

    you spammed this link in my blog post about configuring xcache on centos. I laughed when I came here and noticed that your site is spewing xcache errors.

    Plz don’t spam.

  • 2 John // Nov 5, 2010 at 11:35 am

    Thanks for your feedback Chris. I suppose you think a link back to your article is spam. Perhaps you should disable link backs from being inserted into your comments? If this was not the case you could clarify what was spam as I don’t recall posting a comment on your site?

    I don’t see the xcache issues any more, but, I know there was one but resolved that. Where was it spewing out?

    Your articles are vastly superior to this one and I suggest people look at your site for detailed information (hence the link). This page was purely so I didn’t have to search google every time I wanted to look something up.

    Thanks.

  • 3 John // Nov 5, 2010 at 11:49 am

    FYI, the problems appeared when I started using “W3 Total Cache”.

Leave a Comment