{"id":368,"date":"2012-05-19T21:31:45","date_gmt":"2012-05-19T19:31:45","guid":{"rendered":"http:\/\/blog.techmedia.pl\/?p=368"},"modified":"2012-05-20T02:11:30","modified_gmt":"2012-05-20T00:11:30","slug":"instalacja-php-apc-cache-w-ubuntu","status":"publish","type":"post","link":"https:\/\/www.techmedia.pl\/blog\/instalacja-php-apc-cache-w-ubuntu\/","title":{"rendered":"Instalacja PHP APC cache w Ubuntu"},"content":{"rendered":"<p>Mechanizm PHP APC cache polega na buforowaniu skomplikowanego kodu PHP w pami\u0119ci operacyjnej lub na dysku serwera. Przy kolejnym zapytaniu o ten sam kod, APC sprawdza czy ma go w pami\u0119ci, je\u015bli tak PHP nie wykonuje ponownie kodu tylko jest on \u0142adowany z pami\u0119ci.<\/p>\n<p>Instalacji PHP APC cache w Ubuntu jest banalnie prosta i polega na wydaniu poni\u017cszego polecenia z konsoli:<\/p>\n<pre>root@server:# <strong>apt-get install php-apc<\/strong><\/pre>\n<p>Alternatywnym sposobem instalacji jest wydanie poni\u017cszych polece\u0144 z konsoli:<\/p>\n<pre><code>root@server:# <strong>apt-get install php-pear<\/strong><\/code><\/pre>\n<pre><code><strong><\/strong><code>root@server:# <strong>apt-get <\/strong><\/code><strong>install php5-dev <\/strong><\/code><\/pre>\n<pre><code><code><\/code><code>root@server:# <strong>apt-get<\/strong> <\/code><strong>install apache2-dev<\/strong><strong><\/strong><\/code><\/pre>\n<div>\n<pre><code><strong><\/strong><code>root@server:# <\/code><strong>pecl install apc<\/strong><code><\/code><\/code><\/pre>\n<\/div>\n<div>\n<pre><code><strong><\/strong><code>root@server:# <strong><\/strong><\/code><strong>echo \"extension=apc.so\" &amp;gt; \/etc\/php5\/apache2\/conf.d \/apc.ini<\/strong><\/code><\/pre>\n<\/div>\n<div>W obu przypadkach, po instalacji oczywi\u015bcie musimy zrestartowa\u0107 serwer www poni\u017cszym poleceniem:<\/div>\n<pre><code><code>root@server:# <\/code><strong>\/etc\/init.d\/apache2 restart<\/strong><\/code><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mechanizm PHP APC cache polega na buforowaniu skomplikowanego kodu PHP w pami\u0119ci operacyjnej lub na dysku serwera. Przy kolejnym zapytaniu o ten sam kod, APC sprawdza czy ma go w pami\u0119ci, je\u015bli tak PHP nie wykonuje ponownie kodu tylko jest on \u0142adowany z pami\u0119ci. Instalacji PHP APC cache w Ubuntu jest banalnie prosta i polega [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[87,4,21],"tags":[49,88,89,38],"yst_prominent_words":[],"_links":{"self":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/368"}],"collection":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/comments?post=368"}],"version-history":[{"count":12,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/368\/revisions"}],"predecessor-version":[{"id":370,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/posts\/368\/revisions\/370"}],"wp:attachment":[{"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/media?parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/categories?post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/tags?post=368"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.techmedia.pl\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}