Fi sii APC (Aṣayan PHP Kaṣe) ni RHEL/CentOS 6.3/5.6 & Fedora 17/12
APC (Alternate PHP Cache) jẹ kaṣe orisun ọfẹ ati ṣiṣi fun koodu PHP. Ifilelẹ akọkọ ti module yii ni lati pese ilana ti o lagbara fun kaṣe ati iṣapeye koodu PHP.
Awọn itọnisọna ti a pese nihin fihan bi o ṣe le fi sori ẹrọ ati mu kaṣe APC ṣiṣẹ fun PHP lori RHEL 6.5/6.4/6.3/6.2/6.1/6/5.8/5.6, CentOS 6.5/6.4/6.3/6.2/6.1/6/5.8/5.6 ati Fedora 20,19,18,17,16,15,14,13,12 lilo aṣẹ PECL lati gba lati ayelujara lati awọn ibi ipamọ.
Fi awọn idii igbẹkẹle sii fun APC
Ni akọkọ, a nilo lati fi awọn idii ti a beere sii ti a pe ni pecl, phpize ati awọn aṣẹ apxs sori ẹrọ, lati fi sori ẹrọ APC nipa lilo ohun elo oluṣakoso package YUM.
yum install php-pear php-devel httpd-devel pcre-devel gcc make
Fi sori ẹrọ APC Lilo PECL
Bayi a ni gbogbo awọn idii ti o nilo lati fi sori ẹrọ APC. Nibi a lo aṣẹ PECL lati fi sii. Jọwọ yan awọn eto aiyipada nigbati o ba beere.
pecl install apc
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update downloading APC-3.1.9.tgz ... Starting to download APC-3.1.9.tgz (155,540 bytes) .................................done: 155,540 bytes 54 source files, building running: phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 config.m4:180: warning: AC_CACHE_VAL(PHP_APC_GCC_ATOMICS, ...): suspicious cache-id, must contain _cv_ to be cached ../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from... config.m4:180: the top level config.m4:180: warning: AC_CACHE_VAL(PHP_APC_GCC_ATOMICS, ...): suspicious cache-id, must contain _cv_ to be cached ../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from... config.m4:180: the top level Enable internal debugging in APC [no] : Enable per request file info about files used from the APC cache [no] : Enable spin locks (EXPERIMENTAL) [no] : Enable memory protection (EXPERIMENTAL) [no] : Enable pthread mutexes (default) [yes] : Enable pthread read/write locks (EXPERIMENTAL) [no] :
Jeki Ifaagun PHP APC
Ṣiṣe aṣẹ atẹle lati jẹ ki itẹsiwaju APC ni iṣeto Apache.
echo "extension=apc.so" > /etc/php.d/apc.ini
Tun Iṣẹ Apache tun bẹrẹ fun APC
Tun iṣẹ iṣẹ Apache bẹrẹ lati mu awọn ayipada tuntun.
service httpd restart OR /etc/init.d/httpd restart
Daju Fifi sori APC
Ṣẹda faili phpinfo.php ninu itọsọna gbongbo wẹẹbu Apache. Fun apẹẹrẹ /var/www/html/phpinfo.php.
# vi /var/www/html/phpinfo.php
Ṣafikun koodu atẹle si rẹ. fipamọ ati sunmọ.
<?php // Show all information, defaults to INFO_ALL phpinfo(); ?>
Ṣii eyikeyi aṣàwákiri ki o tẹ URL ti o tẹle. Iwọ yoo wo iṣeto ti o ṣiṣẹ APC iru si isalẹ.
http://localhost/phpinfo.php
Jeki iṣakoso PHP APC
Lati mu igbimọ igbimọ APC ṣiṣẹ, daakọ faili atẹle.
cp /usr/share/pear/apc.php /var/www/html/
Bayi ṣii faili apc.php pẹlu olootu VI.
# vi /var/www/html/apc.php
Bayi ṣeto orukọ olumulo ati ọrọ igbaniwọle ninu faili apc.php bi o ti han ni isalẹ.
defaults('ADMIN_USERNAME','apc'); // Admin Username defaults('ADMIN_PASSWORD','Set-Password-Here'); // Admin Password - CHANGE THIS TO ENABLE!!!
Tẹ URL atẹle ni aṣawakiri. Iwọ yoo gba igbimọ ijọba ti APC.
http://localhost/apc.php
Diẹ ninu awọn sikirinisoti ti Igbimọ Iṣakoso APC fun itọkasi rẹ.
Ṣe igbesoke APC nipa lilo PECL
Lati ṣe igbesoke, kan ṣiṣẹ pipaṣẹ atẹle yoo gba lati ayelujara ati igbesoke APC.
pecl upgrade apc
Yọọ APC kuro ni lilo PECL
Ti o ba fẹ lati yọ kuro, lẹhinna o rọrun tẹ aṣẹ atẹle lati yọkuro APC patapata kuro ninu eto naa.
pecl uninstall apc