Parajsa.com


Parajsa Shqiptare Forum

Cfare ju duhet te dini?

 

Kthehuni Mbrapa   Parajsa Shqiptare Forum | Albanian Paradise | Webmaster

How-To: Compiling XCache from Source

Pergjigju
 
LinkBack Alternativa Teme Vleresoni Temen
  #1  
Te vjeter 16-04-2008, 13:27
Minifotoja e anetarit Administratori
Parajsa Shqiptare
 
Reg: 06-07-02
Lokalizimi: London
Postime: 1,967
Images: 2351
Faqe ne Ditar: 2
How-To: Compiling XCache from Source

For those of you that are not running RPM-based distros, you're probably feeling a bit left out. Up until now, all of my tutorials have dealt with upgrading RPM-based distros. Well, that ends here. I'm going to walk through the fairly simple process of compiling and installing XCache for httpd from the original source.

The current stable release of XCache is 1.0.3. The "Unstable" release, made for PHP 5.1 & 5.2, is 1.2.0. Despite the label, I have not found anything "unstable" about the 1.2.0 version. That said, there have been a few issues reported on the vBulletin forums for users of PHP 4. If you are running PHP 4, I'd recommend that you use 1.0.3, just to be safe. Now, down to the work.


Assuming that you already have a full development environment on your system (gcc, gcc-c++, make, php-devel, etc.), the first thing you'll need to do is to download the source tarball to your computer. Pick the version you want and then continue to the next step.Once you've downloaded the source pacakge to your server, unpack it and then enter the "xcache" directory that was just created. At this point, you'll want to run the following commands. Even a slow system should be done within 1 or 2 minutes, so don't go anywhere.
  • phpize
  • ./configure --enable-xcache
  • make
  • make install
NOTE: There are supposed to be two (2) "-" characters before "enable-xcache" but WordPress seems to be mangling them...
The output of "make install" is very important as it lets you know where the compiled module was installed. Make sure that you remember or write down that string.
Now that the xcache.so module is installed, you'll need to configure it. If your install of PHP parses the /etc/php.d/ folder then you should create a file in that folder called "xcache.ini". If not, just open your php.ini file and paste in the following:
[xcache-common]
zend_extension = /usr/lib/php4/xcache.so
; required for >=php5.1 if you turn XCache on
auto_globals_jit = Off
[xcache.admin]
xcache.admin.user = "admin"
; paste the output of md5("password") below
xcache.admin.pass = ""
[xcache]
xcache.size = 32M
xcache.count = 1
xcache.slots = 8K
xcache.mmap_path = "/dev/zero"
xcache.cacher = On
Based on your configuration, you may want to make a few changes. If "/usr/lib/php4" was not where "make install" claimed to have installed the xcache.so module, change it. Likewise, if your system has multiple processors (count logical cores from Hyper-Threading), change the value of "xcache.count". Finally, if you plan to use the web admin interface, you'll need to fill in "xcache.admin.pass". This value should be a MD5 of the password you want to use (if you need an MD5 generator, try this one).
If you filled in the password, you should also copy the contents of the "admin" folder from the "xcache" source folder to somewhere web-accessible. No changes need to be made and the "config.php.example" file should be left as-is.
At this point, all that's left is to restart httpd and you should be good. Check your phpinfo() once you've restarted httpd to make sure that xcache is listed.

UPDATE: Version 1.2.x is now considered "stable" and the current release is up to 1.2.1.

Thanks to Jason for this tuturial.
__________________
The heaven's sound is composed inside your heart, listen to its beat to syncronize your life onto the angel's steps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Live!Google!Sphinn!Stumbleupon!Yahoo!Spurl this Post!Reddit! Wong this Post!
Pergjigjuni me Citim
Pergjigju

Bookmarks

Tags
compiling, how-to, source, xcache

Alternativa Teme
Vleresojeni kete Teme
Vleresojeni kete Teme:

Rregullore Postimi
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is aktivizuar
Buzeqeshjet jane te aktivizuar
Kodi [IMG] eshte i aktivizuar
Kodi HTML eshte i dizaktivizuar
Trackbacks are aktivizuar
Pingbacks are aktivizuar
Refbacks are aktivizuar
Kapercim Forumesh


Te gjitha oret jane ne GMT +1. Ora tani eshte 03:25.




Parajsa Shqiptare