{"id":3924,"date":"2021-09-03T07:00:13","date_gmt":"2021-09-03T04:00:13","guid":{"rendered":"https:\/\/www.hostixo.com\/blog\/?p=3924"},"modified":"2021-09-02T17:43:05","modified_gmt":"2021-09-02T14:43:05","slug":"memcache-nedir","status":"publish","type":"post","link":"https:\/\/www.hostixo.com\/blog\/memcache-nedir\/","title":{"rendered":"Memcache Nedir? Nas\u0131l Kurulur?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u0130\u00e7indekiler \u2714<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"\u0130\u00e7indekiler Tablosunu A\u00e7\/Kapat\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.hostixo.com\/blog\/memcache-nedir\/#Memcached_Nedir\" >Memcached Nedir<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.hostixo.com\/blog\/memcache-nedir\/#Memcache_Nedir\" >Memcache Nedir<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.hostixo.com\/blog\/memcache-nedir\/#Memcached_PHP\" >Memcached PHP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.hostixo.com\/blog\/memcache-nedir\/#Memcache_Nasil_Kurulur\" >Memcache Nas\u0131l Kurulur?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.hostixo.com\/blog\/memcache-nedir\/#Php_Memcache_Kullanimi\" >Php Memcache Kullan\u0131m\u0131<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.hostixo.com\/blog\/memcache-nedir\/#PHP_PECL_Memcache_Kurulumu\" >PHP PECL Memcache Kurulumu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.hostixo.com\/blog\/memcache-nedir\/#Linux_Memcache_Kurulumu\" >Linux Memcache Kurulumu<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<p>Php ve MySQL ile olu\u015fturdu\u011funuz dinamik web <a href=\"https:\/\/www.hostixo.com\/hosting\/hazir-site\/\" data-internallinksmanager029f6b8e52c=\"11\" title=\"haz\u0131r site\">site<\/a>lerinin zamanla performanstaki d\u00fc\u015f\u00fc\u015f\u00fcn\u00fc fark etmi\u015fsinizdir. <strong>Memcache<\/strong>, bir web sitesinin sayfa y\u00fckleme s\u00fcrelerini h\u0131zlaphpnd\u0131rmaya yard\u0131mc\u0131 olmak i\u00e7in kullan\u0131lan a\u00e7\u0131k kaynakl\u0131 bir \u00f6nbelle\u011fe alma sistemidir.<\/p>\n<p><strong>Memcache ne i\u00e7in kullan\u0131l\u0131r? <\/strong>sorusuna\u00a0dair \u015f\u00f6yle bir ipucu verebilir: Harici bir veri kayna\u011f\u0131n\u0131n ka\u00e7 kez okunmas\u0131 gerekti\u011fine ba\u011f\u0131ml\u0131 olarak verileri ve nesneleri haf\u0131za belle\u011finde \u00f6nbelle\u011fe alarak dinamik veritaban\u0131nda bar\u0131nd\u0131r\u0131lan web sitelerini h\u0131zland\u0131rmak i\u00e7in kullan\u0131l\u0131r. \u00c7ok say\u0131da ziyaret edilen ve \u00e7o\u011funlukla okunan konular\u0131 i\u00e7eren y\u00fcksek veritaban\u0131 y\u00fck\u00fc olan y\u00fcksek trafikli bir web siteniz varsa, <strong>memcached,<\/strong> veri taban\u0131n\u0131zdaki y\u00fck\u00fc hafifletmeye yard\u0131mc\u0131 olabilir.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Memcached_Nedir\"><\/span>Memcached Nedir<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" class=\"alignnone  wp-image-3932 lazyload\" data-src=\"https:\/\/www.hostixo.com\/blog\/wp-content\/uploads\/2021\/09\/memcahed.png\" alt=\"\" width=\"778\" height=\"194\" title=\"\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" style=\"--smush-placeholder-width: 778px; --smush-placeholder-aspect-ratio: 778\/194;\"><noscript><img decoding=\"async\" class=\"alignnone  wp-image-3932\" src=\"https:\/\/www.hostixo.com\/blog\/wp-content\/uploads\/2021\/09\/memcahed.png\" alt=\"\" width=\"778\" height=\"194\" title=\"\"><\/noscript><\/p>\n<p><strong>Memcached,<\/strong> sunucuda devaml\u0131 olarak \u00e7al\u0131\u015fan arka plan g\u00f6revidir. Kullan\u0131m\u0131 son derece basit olmas\u0131n\u0131n yan\u0131nda herhangi bir yap\u0131land\u0131rma dosyas\u0131 yoktur. Yap\u0131lan tek i\u015flem belirli bir ba\u011flant\u0131 noktas\u0131nda arka plan program\u0131n\u0131 \u00e7al\u0131\u015ft\u0131rmak olacakt\u0131r ve web siteleriniz verileri bellekte depolamak i\u00e7in bu arka plan program\u0131na ba\u011flanacakt\u0131r. Veriler Ram\u2019de tutulaca\u011f\u0131ndan dolay\u0131 memcached&#8217;i ba\u015flat\u0131rken ne kadar RAM kullan\u0131m\u0131na izin verilece\u011fine karar vermeniz gerekecek. Memcached&#8217;i 1024 MB bellek alan\u0131yla ba\u015flat\u0131rsan\u0131z, <strong>memcached<\/strong> bu kadar veriyi depolayacakt\u0131r.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Memcache_Nedir\"><\/span>Memcache Nedir<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>Memcache<\/strong>, Memcached&#8217;e ba\u011flanmam\u0131z\u0131 ve kullanmam\u0131z\u0131 sa\u011flayacak PHP uzant\u0131s\u0131d\u0131r. Bu PHP uzant\u0131s\u0131 varsay\u0131lan de\u011fildir, bu nedenle indirip kurman\u0131z gerekir Kullan\u0131m\u0131 son derece kolay ve anla\u015f\u0131l\u0131r oldu\u011funu kabul etmenin s\u0131n\u0131flar da sa\u011flar.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Memcached_PHP\"><\/span>Memcached PHP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-3929 lazyload\" data-src=\"https:\/\/www.hostixo.com\/blog\/wp-content\/uploads\/2021\/09\/memecached.png\" alt=\"memcached nas\u0131l \u00e7al\u0131\u015f\u0131r\" width=\"1400\" height=\"327\" title=\"\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" style=\"--smush-placeholder-width: 1400px; --smush-placeholder-aspect-ratio: 1400\/327;\"><noscript><img decoding=\"async\" class=\"alignnone size-full wp-image-3929\" src=\"https:\/\/www.hostixo.com\/blog\/wp-content\/uploads\/2021\/09\/memecached.png\" alt=\"memcached nas\u0131l \u00e7al\u0131\u015f\u0131r\" width=\"1400\" height=\"327\" title=\"\"><\/noscript><\/p>\n<p><strong>Memcache <\/strong>ve <strong>Memcached <\/strong>ifadeleriyle s\u0131kl\u0131kla kar\u015f\u0131la\u015fabilirsiniz ancak PHP Memcache daha \u00f6nceki bir \u00e7\u00f6z\u00fcmd\u00fcr, \u00e7ok kararl\u0131d\u0131r fakat baz\u0131 s\u0131n\u0131rlamalar getirir. <strong>PHP memcache<\/strong> mod\u00fcl\u00fc do\u011frudan arka plan program\u0131n\u0131 kullan\u0131rken <strong>PHP memcached<\/strong> mod\u00fcl\u00fc <strong>libMemcached<\/strong> istemci kitapl\u0131\u011f\u0131n\u0131 kullan\u0131r ve ayr\u0131ca baz\u0131 ek \u00f6zellikler i\u00e7erir.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Memcache_Nasil_Kurulur\"><\/span>Memcache Nas\u0131l Kurulur?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Dinamik web sitelerinizde artan i\u015f y\u00fck\u00fc nedeniyle <strong>Memcache <\/strong>kurmay\u0131 isteyebilirsiniz. Bunun asl\u0131nda ilk nedenden ayr\u0131 olarak ikinci bir nedeni de ram maliyetinden ka\u00e7\u0131nmak oldu\u011fu s\u00f6ylenebilir.<\/p>\n<p>Sunucunuza <strong>Memcached<\/strong> y\u00fcklemek i\u00e7in, sunucunuza root kullan\u0131c\u0131 olarak SSH yard\u0131m\u0131yla girin ve a\u015fa\u011f\u0131daki komutu \u00e7al\u0131\u015ft\u0131r\u0131n:<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt-get install memcached<\/code><\/p>\n<p>y\u00fckleme tamamland\u0131\u011f\u0131nda Memcached 11211 numaral\u0131 portu dinlemeye ba\u015flar. Buraya kadar Memcache kullan\u0131labilmesi i\u00e7in Memcached\u2019in sisteme kurulmas\u0131 i\u015flemidir.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Php_Memcache_Kullanimi\"><\/span>Php Memcache Kullan\u0131m\u0131<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Memcached&#8217;i PHP 7.0, 7.1, 7.2, 7.3 ve 7.4&#8217;e kurmak i\u00e7in \u015fu ad\u0131mlar\u0131 izleyin:<br \/>\nPHP 7.X i\u00e7in eklentiyi kurmak i\u00e7in sunucunuza hala root olarak ba\u011fl\u0131 olman\u0131z gerekir ve \u015fu komut dizisini \u00e7al\u0131\u015ft\u0131r\u0131n:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt-get -y install gcc make autoconf libc-dev pkg-config\r\n\r\nsudo apt-get -y install zlib1g-dev\r\n\r\nsudo apt-get -y install libmemcached-dev\r\n\r\nsudo pecl7.X-sp install memcached<\/pre>\n<p>&nbsp;<\/p>\n<p>Sonraki ad\u0131mda, <code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">libmemcached directory [no]:<\/code> se\u00e7ene\u011fi g\u00f6sterilirse,<\/p>\n<p><em>no &#8211;disable-memcached-sasl kodunu girip devam edin.<\/em><\/p>\n<p>Kurulum tamamland\u0131ktan sonra, uzant\u0131 i\u00e7in bir yap\u0131land\u0131rma dosyas\u0131 olu\u015fturarak a\u015fa\u011f\u0131daki komutlar\u0131 root olarak \u00e7al\u0131\u015ft\u0131rarak PHP&#8217;yi yeniden ba\u015flat\u0131n.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo bash -c \"echo extension=memcached.so &gt; \/etc\/php7.X-sp\/conf.d\/memcached.ini\"\r\n\r\nsudo service php7.X-fpm-sp restart<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"PHP_PECL_Memcache_Kurulumu\"><\/span>PHP PECL Memcache Kurulumu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>E\u011fer payla\u015f\u0131ml\u0131 bir <a href=\"https:\/\/www.hostixo.com\/sunucu\/sanal-sunucu\/\" data-internallinksmanager029f6b8e52c=\"3\" title=\"vps sat\u0131n al\">sunucu<\/a> \u00fczerinde bir web sitesi kurulumu ger\u00e7ekle\u015ftirdiyseniz, <strong>Memcache <\/strong>kurulu ve ayarl\u0131 olarak genellikle bulunmaz. E\u011fer sa\u011flay\u0131c\u0131n\u0131z bu servisi sa\u011fl\u0131yorsa y\u00f6netim panelinde <strong>Php Extensions <\/strong>ayarlar\u0131 alt\u0131nda aray\u0131n. <a href=\"https:\/\/www.hostixo.com\/blog\/cpanele-nasil-giris-yapilir-cpanel-giris-portu-nedir\/\" data-internallinksmanager029f6b8e52c=\"13\" title=\"cpanel nedir\">Cpanel<\/a> Kullan\u0131c\u0131 aray\u00fcz\u00fcnde ise PECML mod\u00fcl\u00fcnde i\u015flemleri ger\u00e7ekle\u015ftirmeniz gerekir.<\/p>\n<p>SSH yard\u0131m\u0131yla root kullan\u0131c\u0131 olarak ba\u011fland\u0131ktan sonra;<\/p>\n<p><a href=\"http:\/\/pecl.php.net\/package\/memcache\" target=\"_blank\" rel=\"noopener\">Memcache<\/a> resmi adresinden son s\u00fcr\u00fcm\u00fc indirin veya a\u015fa\u011f\u0131daki kodu terminale girin:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cd\r\n\r\nwget http:\/\/pecl.php.net\/get\/memcache-8.0.tgz<\/pre>\n<p>S\u00fcr\u00fcm\u00fc her zaman kontrol etmenizde fayda var. Sonras\u0131nda paketi a\u015fa\u011f\u0131daki kodu girerek \u00e7\u0131kar\u0131n.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">tar xf memcache-*\r\n\r\ncd memcache*\r\n\r\nphpize<\/pre>\n<p>y\u00fcklemek i\u00e7in \u015fu kodu girin<em>:<\/em><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">make &amp;&amp; make install<\/code><\/p>\n<p><em>Uzant\u0131y\u0131 phph.ini dosyas\u0131na girin.<\/em><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">nano \/etc\/php.ini<\/code><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Linux_Memcache_Kurulumu\"><\/span>Linux Memcache Kurulumu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Da\u011f\u0131t\u0131m i\u00e7in zaten PHP kullan\u0131yorsan\u0131z, \u015fu kodu girmeniz yeterlidir:<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt-get install php5-memcache\u00a0<\/code><\/p>\n<p>(s\u00fcr\u00fcm\u00fcn\u00fcz\u00fc kontrol ediniz.)<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Php ve MySQL ile olu\u015fturdu\u011funuz dinamik web sitelerinin zamanla performanstaki d\u00fc\u015f\u00fc\u015f\u00fcn\u00fc fark etmi\u015fsinizdir. Memcache, bir web sitesinin sayfa y\u00fckleme s\u00fcrelerini h\u0131zlaphpnd\u0131rmaya yard\u0131mc\u0131 olmak i\u00e7in kullan\u0131lan a\u00e7\u0131k kaynakl\u0131 bir \u00f6nbelle\u011fe alma sistemidir. Memcache ne i\u00e7in kullan\u0131l\u0131r? sorusuna\u00a0dair \u015f\u00f6yle bir ipucu verebilir: Harici bir veri kayna\u011f\u0131n\u0131n ka\u00e7 kez okunmas\u0131 gerekti\u011fine ba\u011f\u0131ml\u0131 olarak verileri ve nesneleri haf\u0131za belle\u011finde &hellip;<\/p>\n","protected":false},"author":1,"featured_media":3926,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mbp_gutenberg_autopost":false,"footnotes":""},"categories":[166],"tags":[478,481,479,480,482,483],"class_list":["post-3924","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sunucu","tag-memcache","tag-memcache-nedir","tag-memcached","tag-memcachep-php","tag-php-memcache-kullanimi","tag-php-memcached"],"_links":{"self":[{"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/posts\/3924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/comments?post=3924"}],"version-history":[{"count":0,"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/posts\/3924\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/media\/3926"}],"wp:attachment":[{"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/media?parent=3924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/categories?post=3924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostixo.com\/blog\/wp-json\/wp\/v2\/tags?post=3924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}