APC + Centos + DirectAdmin


W poprzednim howto opisaliśmy w jaki sposób zainstalować obsługę memcached dla PHP5. Tym razem przedstawimy w jaki sposób dodać obsługę APC. Proces nie jest specjalnie skomplikowany. Zapraszamy.

W pierwszej kolejności instalujemy autoconf (o ile nie jest on jeszcze zainstalowany)

yum install autoconf

Jeżeli pakiet jest zainstalowany otrzymamy info:

root@testowo]# yum install autoconf
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
base | 2.1 kB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Package autoconf-2.59-12.noarch already installed and latest version
Nothing to do

Następnie przystępujemy do pobrania APC

pecl install APC

Po chwili powinniśmy ujrzeć komunikat:

Build process completed successfully
Installing ‚/usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so’
install ok: channel://pecl.php.net/APC-3.1.6
configuration option „php_ini” is not set to php.ini location
You should add „extension=apc.so” to php.ini

Edytujemy php.ini (znajduje się on w /usr/local/lib/php.ini) i szukamy linii:

; Directory in which the loadable extensions (modules) reside.
extension_dir=”./”

Zmieniamy wpis na:

; Directory in which the loadable extensions (modules) reside.
extension_dir = „/usr/local/lib/php/extensions/no-debug-non-zts-20060613/”

Na koniec pliku dopisujemy linijkę:

extension=apc.so

Teraz wystarczy zrestartować apache (/etc/init.d/httpd restart)

A następnie przy pomocy phpinfo.php sprawdzić czy moduł został dodany.

To wszystko 🙂

Tags: , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Comments are closed.