Install xcache

CentOS 6

# yum install php-xcache xcache-admin

Debian/Ubuntu/Linux Mint


# apt-get install php5-xcache

Configure

RHEL/CentOS/Fedora


# nano /etc/php.d/xcache.ini

Debian/Ubuntu/Linux Mint


# nano /etc/php5/conf.d/xcache.ini

OR

# nano /etc/php5/mods-available/xcache.ini

once you’re done with configuration settings, restart your Apache web server.



# /etc/init.d/httpd restart


# /etc/init.d/apache2 restart

Verify

# php -v

Enabling XCache Admin Panel for PHP

By default the admin panel is protected with http-auth and in disabled state. To set user/password open the Xcache.ini file. But, first you have to create md5 password using following command. (Where typeyourpassword is your password).


# echo -n "typeyourpassword" | md5sum

Sample Output


ae9ac3f19ae3990b2c99701061c5d8c2

Now open Xcache.ini file add the generated md5 password. See the following example, add your own password md5 string.


[xcache.admin]
xcache.admin.enable_auth = On
; Configure this to use admin pages
xcache.admin.user = "mOo"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = "ae9ac3f19ae3990b2c99701061c5d8c2"

The simplest way to do so is copying the whole directory xcache (admin was in older release) to your web root directory (i.e. /var/www/html or /var/www).


# cp -a /usr/share/xcache/ /var/www/html/

OR


# cp -a /usr/share/xcache/htdocs /var/www/xcache

OR


cp -a /usr/share/xcache/admin/ /var/www/ (older release)

Now call it from your browser, a http-auth login prompt window will pop-up. Enter your user/pass in, and it’s done.

http://localhost/xcache OR http://localhost/admin (older release)

Leave a Comment