Hardware Secrets


Home | Camera | Case | CE | Cooling | CPU | Input | Memory | Mobile | Motherboard | Networking | Power | Storage | Video | Other
Content
Articles
Editorial
First Look
Gabriel’s Blog
News
Reviews
Tutorials
Main Menu
About Us
Awarded Products
Compare Prices
Datasheets
Dictionary
Download
Drivers
Facebook
Forums
Links
Manufacturer Finder
Newsletter
On The Web
RSS Feed
Test Your Skills
Twitter
Newsletter
Subscribe today!
Search




Recommended
Networking Bible
Networking Bible, by Barrie Sosinsky (Wiley), starting at $18.99
Home » Networking
How to Build a Web Server with PHP 5 and MySQL 5 Support
Author: Gabriel Torres
Type: Tutorials Last Updated: April 19, 2007
Page: 5 of 5
Real-time pricing for Sony SMP-N100.
Sony SMP-N100 Streaming Player with Wi-Fi SMPN100 Electronics Usually ships in 24 hours
Amazon: $49.99 TigerDirect: $49.99

Configuring and Installing Xcache

There are several PHP cache modules around – they help saving CPU resources from your server –, some also bringing PHP optimization, which improves PHP performance: PHP-Accelerator, Mmcache, APC and Xcache. We will show you how to configure and install Xcache, as it brings native support for PHP 5, so you won’t face any compatibility issue.

Look at http://210.51.190.228/pub/XCache/Releases/ for the latest Xcache release on the 1.2 series (1.2.0 at the time of this writing) on the tar.gz format.

The downloading, configuration and compilation sequence is the following:

cd /root
wget http://210.51.190.228/pub/XCache/Releases/xcache-1.2.0.tar.gz
tar –xvzf xcache-1.2.0.tar.gz
cd xcache-1.2.0
/usr/local/apache2/php/bin/phpize
./configure –enable-xcache –enable-xcache-optimizer –with-php-config=/usr/local/apache2/php/bin/php-config
make
make install

Please pay attention at the output to see where Xcache module was installed. In our case, it was installed under /usr/local/apache2/php/lib/php/extensions/no-debug-non-zts-20060613/.

Now edit php.ini (vi /usr/local/bin/apache2/php/php.ini) and add the following lines. Change the first one according to where xcache module was installed.

[xcache-common]
zend_extension = /usr/local/apache2/php/lib/php/extensions/no-debug-non-zts-20060613/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
xcache.optimizer = On

You can install a web admin interface that comes with Xcache. To do that, you need to fill the xcache.admin.pass with a password in MD5 format (click here to convert a text password into MD5) and then copy admin folder from the Xcache installation directory to a directory on your web server, for example:

cd /root/xcache-1.2.0
mv admin /www/your-website/xcache

With this Xcache admin panel will be accessible through http://www.your-website.com/xcache

Restart Apache with /usr/local/apache2/bin/apachectl restart and check again your phpinfo output, this time looking for a Xcache session (”Xcache session: Enabled“). If it is there, you will have your webserver up and running with PHP 5, MySQL 5 support and PHP cache and optimization module. If not, repeat again the procedures described on this page.

« Previous |  Page 5 of 5
Print Version | Send to Friend | Bookmark Article | Comments (7)

Related Content
  • All Opteron Models
  • All Xeon Models

  • Recommended Deal.
    ASUS 610839056583ASUS 610839056583

    ASUS RT-N16 Wireless-N 300 Maximum Performance single band Gaming Router Fast Gigabit Ethernet support USB-Hard Drive and Printer Open source DDWRT Asus AS-6962RTN16 Electronics

    Amazon: $95.00

    RSSLatest News
    Antec Announces the One PC Case
    February 9, 2012 - 8:06 AM PST
    Cooler Master Releases Elite 361 PC Case
    February 8, 2012 - 7:50 AM PST
    Microsoft Launches Kinect for Windows
    February 2, 2012 - 8:42 AM PST
    Transcend Announces SSD720 SSD Series
    February 1, 2012 - 7:55 AM PST
    .:: More News ::.


    © 2004-12, Hardware Secrets, LLC. All rights reserved.
    Advertising | Legal Information | Privacy Policy
    All times are Pacific Standard Time (PST, GMT -08:00)