pranaam to all bhai ji _/\_
Today i am going to post about Alternative PHP Cache aka APC installation on ubuntu which helps in opcode cacher for caching and optimizing PHP intermediate code.It's similar to other PHP opcode cachers, such as eAccelerator and XCache.
so steps are following to install APC on your debian system(ubuntu)
switch to root user using command sudo bash or su root
run follwoing command
apt-get install php-pear php5-dev apache2-prefork-dev build-essential php5-dev
now install apc using pecl
command is
pecl install apc
if you get an error like "make : command not found"
install make using command
apt-get install make
ok again run command (if make was not installed on your system)
pecl install apc
if you get an error having message "/usr/include/php5/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory"
its due to absens of ibpcre3-dev package , install it by executing command
apt-get install libpcre3-dev
ok now, after installing ibpcre3-dev package install apc
command is
pecl install apc
after that we need to activate the apc by creating its config file
enter into directory /etc/php5/conf.d/ using command
cd /etc/php5/conf.d/
create a file having name apc.ini, command is
nano apc.ini
and atleast add folowwing lines to that file
extension=apc.so
apc.enabled=1
apc.shm_size=92
apc.ttl=0
here apc.enabled=1 shows that apc is enabled , and if you change value of apc.enabled from 1 to 0, apc will get disabled
apc.shm_size=92 is the parameter which decide how much memory has to be allocate to apc , in my case i have assigned 92 MB of space to APC
you can assign according to your need and RAM available on server :)
apc.ttl=0 means , when your APC cache will be full, it will flush data automatically to cach new data
you can set it to some other value to but not too much high
i am using apc.ttl=100 so apc clear some part of cache when new request is made,apc chache is full and that data is not present in apc cache
for information regarding other apc parameters have a look at this document
http://de2.php.net/manual/en/ref.apc.php
ok save the file (press ctrl+o press enter to write the content to file and then ctrl+x to exit the editor)
copy the apc panel file to place from where you want to monitor it
i am copying apc file (located in /usr/share/php/apc.php ) to /var/www folder
cp /usr/share/php/apc.php /var/www/ica.php
and now i can access apc panel file by accessing my server IP/ica.php
means
https://server_ip/ica.php
cool \m/
now set a username and password for accessing apc panel
open file /var/www/ica.php in text editor
and change the default password
restart apache server , command is
service apache2 restart
and wot wot >:D<
now your server is loaded with apc cache 8-)
Thank you
-==[[Love to]]==--
zero Cool ,code breaker ica, root_devil, google_warrior,INX_r0ot,Darkwolf indishell,Baba ,Silent poison India,Magnum sniper,Atul Dwivedi,ethicalnoob Indishell,Local root indishell,Irfninja indishell,Reborn India,L0rd Crus4d3r,AR AR,Mannu, ViKi, Hardeep singh Bhuppi,Mohit, Ffe, Anju, RR Mam, Acchi bacchi(Jagriti) and DON
0 comments