{"id":41877,"date":"2026-05-18T17:01:01","date_gmt":"2026-05-18T14:01:01","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=41877"},"modified":"2026-05-18T17:01:25","modified_gmt":"2026-05-18T14:01:25","slug":"centos-7de-memcached-kurulumu-ve-guvenligi","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/","title":{"rendered":"CentOS 7&#8217;de Memcached Kurulumu ve G\u00fcvenli\u011fi"},"content":{"rendered":"<h2>CentOS 7&#8217;de Memcached Kurulumu ve G\u00fcvenli\u011fi<\/h2>\n<p>Memcached, y\u00fcksek performansl\u0131, da\u011f\u0131t\u0131k bir bellek i\u00e7i nesne \u00f6nbellekleme sistemidir. Web uygulamalar\u0131n\u0131n veritaban\u0131 y\u00fck\u00fcn\u00fc azaltarak ve yan\u0131t s\u00fcrelerini iyile\u015ftirerek performans\u0131n\u0131 \u00f6nemli \u00f6l\u00e7\u00fcde art\u0131rmak i\u00e7in yayg\u0131n olarak kullan\u0131l\u0131r. Bu makalede, CentOS 7 sunucular\u0131na Memcached&#8217;in nas\u0131l kurulaca\u011f\u0131n\u0131 ve g\u00fcvenli\u011finin nas\u0131l sa\u011flanaca\u011f\u0131n\u0131 ad\u0131m ad\u0131m ele alaca\u011f\u0131z.<\/p>\n<h3>Memcached Nedir ve Neden Kullan\u0131l\u0131r?<\/h3>\n<p>Memcached, veritaban\u0131 sorgular\u0131, API \u00e7a\u011fr\u0131lar\u0131 veya karma\u015f\u0131k hesaplamalar gibi tekrarlayan ve hesaplama a\u00e7\u0131s\u0131ndan pahal\u0131 i\u015flemleri \u00f6nbelle\u011fe alarak \u00e7al\u0131\u015fan bir anahtar-de\u011fer depolama sistemidir. Verilerin RAM&#8217;de saklanmas\u0131 sayesinde, disk tabanl\u0131 depolamaya g\u00f6re \u00e7ok daha h\u0131zl\u0131 eri\u015fim sa\u011flar.<\/p>\n<p>Memcached kullanman\u0131n temel avantajlar\u0131 \u015funlard\u0131r:<\/p>\n<p>*   <strong>Performans Art\u0131\u015f\u0131:<\/strong> Veritaban\u0131 ve uygulama sunucular\u0131n\u0131n y\u00fck\u00fcn\u00fc azaltarak web sitelerinin ve uygulamalar\u0131n daha h\u0131zl\u0131 y\u00fcklenmesini sa\u011flar.<br \/>\n*   <strong>\u00d6l\u00e7eklenebilirlik:<\/strong> Da\u011f\u0131t\u0131k bir yap\u0131ya sahip oldu\u011fundan, birden fazla sunucuya \u00f6l\u00e7eklenebilir, bu da b\u00fcy\u00fck \u00f6l\u00e7ekli uygulamalar i\u00e7in idealdir.<br \/>\n*   <strong>Basitlik:<\/strong> Kullan\u0131m\u0131 ve entegrasyonu nispeten basittir.<br \/>\n*   <strong>Maliyet Etkinli\u011fi:<\/strong> Donan\u0131m maliyetlerini d\u00fc\u015f\u00fcrerek sunucu kaynaklar\u0131n\u0131n daha verimli kullan\u0131lmas\u0131n\u0131 sa\u011flar.<\/p>\n<p>Memcached, \u00f6zellikle y\u00fcksek trafikli web siteleri, e-ticaret platformlar\u0131, sosyal medya uygulamalar\u0131 ve API hizmetleri gibi performans\u0131n kritik oldu\u011fu senaryolarda tercih edilir.<\/p>\n<h3>CentOS 7&#8217;de Memcached Kurulumu<\/h3>\n<p>CentOS 7&#8217;de Memcached&#8217;i kurmak olduk\u00e7a basittir. Genellikle varsay\u0131lan depolarda bulunur.<\/p>\n<h4>1. Depolar\u0131 G\u00fcncelleme<\/h4>\n<p>Kuruluma ba\u015flamadan \u00f6nce, sisteminizin paket depolar\u0131n\u0131 g\u00fcncelledi\u011finizden emin olun:<\/p>\n<pre><code class=\"language-bash\">sudo yum update -y<\/code><\/pre>\n<p>Bu komut, mevcut t\u00fcm paketlerin en son s\u00fcr\u00fcmlerini indirir ve sisteminizi g\u00fcncel tutar.<\/p>\n<h4>2. Memcached&#8217;i Kurma<\/h4>\n<p>Memcached paketini kurmak i\u00e7in a\u015fa\u011f\u0131daki komutu kullan\u0131n:<\/p>\n<pre><code class=\"language-bash\">sudo yum install memcached -y<\/code><\/pre>\n<p>Bu komut, Memcached sunucusunu ve gerekli ba\u011f\u0131ml\u0131l\u0131klar\u0131 kuracakt\u0131r.<\/p>\n<h4>3. Memcached&#8217;i Ba\u015flatma ve Etkinle\u015ftirme<\/h4>\n<p>Kurulum tamamland\u0131ktan sonra, Memcached hizmetini ba\u015flatabilir ve sistem ba\u015flang\u0131c\u0131nda otomatik olarak \u00e7al\u0131\u015facak \u015fekilde ayarlayabilirsiniz:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl start memcached\nsudo systemctl enable memcached<\/code><\/pre>\n<p><code>start<\/code> komutu Memcached hizmetini hemen ba\u015flat\u0131r. <code>enable<\/code> komutu ise sistem yeniden ba\u015flat\u0131ld\u0131\u011f\u0131nda Memcached&#8217;in otomatik olarak ba\u015flamas\u0131n\u0131 sa\u011flar.<\/p>\n<h4>4. Memcached Durumunu Kontrol Etme<\/h4>\n<p>Memcached hizmetinin \u00e7al\u0131\u015f\u0131p \u00e7al\u0131\u015fmad\u0131\u011f\u0131n\u0131 kontrol etmek i\u00e7in a\u015fa\u011f\u0131daki komutu kullanabilirsiniz:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl status memcached<\/code><\/pre>\n<p>\u00c7\u0131kt\u0131da &#8220;active (running)&#8221; ifadesini g\u00f6rmelisiniz.<\/p>\n<h4>5. Memcached Yap\u0131land\u0131rmas\u0131<\/h4>\n<p>Memcached&#8217;in varsay\u0131lan yap\u0131land\u0131rmas\u0131 genellikle \u00e7o\u011fu kullan\u0131m durumu i\u00e7in yeterlidir. Ancak, bellek boyutu, dinleme portu ve eri\u015fim ayarlar\u0131 gibi parametreleri de\u011fi\u015ftirmek isteyebilirsiniz.<\/p>\n<p>Memcached&#8217;in ana yap\u0131land\u0131rma dosyas\u0131 <code>\/etc\/sysconfig\/memcached<\/code>&#8216;dir. Bu dosyay\u0131 bir metin d\u00fczenleyici ile a\u00e7arak ayarlar\u0131 de\u011fi\u015ftirebilirsiniz.<\/p>\n<pre><code class=\"language-bash\">sudo vi \/etc\/sysconfig\/memcached<\/code><\/pre>\n<p>Dosya i\u00e7inde a\u015fa\u011f\u0131daki gibi sat\u0131rlar g\u00f6receksiniz:<\/p>\n<pre><code class=\"language-\">PORT=&quot;11211&quot;\nUSER=&quot;memcached&quot;\nMAX_CONNECTIONS=&quot;1024&quot;\nCACHESIZE=&quot;64&quot;\nOPTIONS=&quot;&quot;<\/code><\/pre>\n<p>*   <strong>PORT:<\/strong> Memcached&#8217;in dinleyece\u011fi TCP portunu belirtir. Varsay\u0131lan olarak 11211&#8217;dir.<br \/>\n*   <strong>USER:<\/strong> Memcached i\u015fleminin \u00e7al\u0131\u015faca\u011f\u0131 kullan\u0131c\u0131y\u0131 belirtir. Varsay\u0131lan olarak <code>memcached<\/code>&#8216;dir.<br \/>\n*   <strong>MAX_CONNECTIONS:<\/strong> Maksimum e\u015fzamanl\u0131 istemci ba\u011flant\u0131 say\u0131s\u0131n\u0131 belirler.<br \/>\n*   <strong>CACHESIZE:<\/strong> Memcached&#8217;in kullanaca\u011f\u0131 bellek miktar\u0131n\u0131 megabayt (MB) cinsinden belirtir. Varsay\u0131lan olarak 64 MB&#8217;dir. Bu de\u011feri sunucunuzun kullan\u0131labilir RAM&#8217;ine g\u00f6re art\u0131rabilirsiniz. \u00d6rne\u011fin, 512 MB i\u00e7in <code>CACHESIZE=\"512\"<\/code> olarak ayarlayabilirsiniz.<br \/>\n*   <strong>OPTIONS:<\/strong> Ek Memcached se\u00e7eneklerini belirtmek i\u00e7in kullan\u0131l\u0131r. G\u00fcvenlik ve a\u011f yap\u0131land\u0131rmas\u0131 i\u00e7in bu alan \u00f6nemlidir.<\/p>\n<p>Yap\u0131land\u0131rma dosyas\u0131nda de\u011fi\u015fiklik yapt\u0131ktan sonra, Memcached hizmetini yeniden ba\u015flatman\u0131z gerekir:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl restart memcached<\/code><\/pre>\n<h3>Memcached&#8217;i G\u00fcvenli Hale Getirme<\/h3>\n<p>Varsay\u0131lan olarak Memcached, a\u011f \u00fczerinden kimlik do\u011frulama veya \u015fifreleme mekanizmas\u0131 i\u00e7ermez. Bu, Memcached&#8217;in yaln\u0131zca g\u00fcvenli bir a\u011f i\u00e7inde, \u00f6rne\u011fin yaln\u0131zca yerel a\u011f\u0131n\u0131zdaki uygulamalar taraf\u0131ndan eri\u015filebilir olmas\u0131 gerekti\u011fi anlam\u0131na gelir. E\u011fer Memcached&#8217;i internete a\u00e7\u0131k bir \u015fekilde \u00e7al\u0131\u015ft\u0131r\u0131rsan\u0131z, ciddi g\u00fcvenlik riskleriyle kar\u015f\u0131 kar\u015f\u0131ya kal\u0131rs\u0131n\u0131z.<\/p>\n<p>\u0130\u015fte Memcached&#8217;i g\u00fcvenli hale getirmenin ba\u015fl\u0131ca yollar\u0131:<\/p>\n<h4>1. G\u00fcvenlik Duvar\u0131 (Firewall) Yap\u0131land\u0131rmas\u0131<\/h4>\n<p>Memcached&#8217;in varsay\u0131lan portu olan 11211&#8217;e yaln\u0131zca belirli IP adreslerinden veya a\u011flardan eri\u015fime izin vermek, en temel ve etkili g\u00fcvenlik \u00f6nlemidir. CentOS 7&#8217;de <code>firewalld<\/code> kullan\u0131l\u0131r.<\/p>\n<h5>1.1. Belirli Bir IP Adresinden Eri\u015fime \u0130zin Verme<\/h5>\n<p>E\u011fer Memcached&#8217;i yaln\u0131zca belirli bir uygulama sunucusundan (\u00f6rne\u011fin, 192.168.1.100 IP adresli sunucu) eri\u015filebilir k\u0131lmak istiyorsan\u0131z, a\u015fa\u011f\u0131daki komutlar\u0131 kullanabilirsiniz:<\/p>\n<pre><code class=\"language-bash\">sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family=&quot;ipv4&quot; source address=&quot;192.168.1.100\/32&quot; port port=&quot;11211&quot; protocol=&quot;tcp&quot; accept'\nsudo firewall-cmd --reload<\/code><\/pre>\n<p>Bu komut, <code>public<\/code> b\u00f6lgesinde TCP 11211 portuna yaln\u0131zca <code>192.168.1.100<\/code> IP adresinden gelen trafi\u011fe izin verir. <code>--permanent<\/code> bayra\u011f\u0131, bu kural\u0131n yeniden ba\u015flatmalardan sonra da kal\u0131c\u0131 olmas\u0131n\u0131 sa\u011flar. <code>firewall-cmd --reload<\/code> ise de\u011fi\u015fikliklerin hemen ge\u00e7erli olmas\u0131n\u0131 sa\u011flar.<\/p>\n<h5>1.2. Belirli Bir A\u011fdan Eri\u015fime \u0130zin Verme<\/h5>\n<p>E\u011fer Memcached&#8217;i belirli bir yerel a\u011fdan (\u00f6rne\u011fin, 192.168.1.0\/24) eri\u015filebilir k\u0131lmak istiyorsan\u0131z:<\/p>\n<pre><code class=\"language-bash\">sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family=&quot;ipv4&quot; source address=&quot;192.168.1.0\/24&quot; port port=&quot;11211&quot; protocol=&quot;tcp&quot; accept'\nsudo firewall-cmd --reload<\/code><\/pre>\n<h5>1.3. T\u00fcm Eri\u015fimi Engelleme (Varsay\u0131lan Davran\u0131\u015f)<\/h5>\n<p>E\u011fer herhangi bir \u00f6zel eri\u015fim kural\u0131 tan\u0131mlamazsan\u0131z ve genel eri\u015fimi kapat\u0131rsan\u0131z, Memcached yaln\u0131zca yerel makineden (localhost) eri\u015filebilir olur. Bu, en g\u00fcvenli varsay\u0131lan durumdur.<\/p>\n<h4>2. Yerel A\u011fda \u00c7al\u0131\u015ft\u0131rma (Loopback Aray\u00fcz\u00fc)<\/h4>\n<p>Memcached&#8217;i yaln\u0131zca yerel sunucu \u00fczerinden eri\u015filebilir k\u0131lmak istiyorsan\u0131z, yap\u0131land\u0131rma dosyas\u0131ndaki <code>OPTIONS<\/code> parametresini kullanarak bunu belirtebilirsiniz.<\/p>\n<p><code>\/etc\/sysconfig\/memcached<\/code> dosyas\u0131n\u0131 a\u00e7\u0131n:<\/p>\n<pre><code class=\"language-bash\">sudo vi \/etc\/sysconfig\/memcached<\/code><\/pre>\n<p><code>OPTIONS=\"\"<\/code> sat\u0131r\u0131n\u0131 bulun ve a\u015fa\u011f\u0131daki gibi de\u011fi\u015ftirin:<\/p>\n<pre><code class=\"language-\">OPTIONS=&quot;-l 127.0.0.1&quot;<\/code><\/pre>\n<p>Bu ayar, Memcached&#8217;in yaln\u0131zca <code>127.0.0.1<\/code> (localhost) adresinden gelen ba\u011flant\u0131lar\u0131 dinlemesini sa\u011flar. Bu, Memcached&#8217;i yaln\u0131zca ayn\u0131 sunucudaki uygulamalar\u0131n kullanabilece\u011fi anlam\u0131na gelir.<\/p>\n<p>De\u011fi\u015fiklikleri kaydettikten sonra Memcached&#8217;i yeniden ba\u015flat\u0131n:<\/p>\n<pre><code class=\"language-bash\">sudo systemctl restart memcached<\/code><\/pre>\n<p>Bu y\u00f6ntem, Memcached&#8217;i en g\u00fcvenli \u015fekilde \u00e7al\u0131\u015ft\u0131rman\u0131n bir yoludur, ancak yaln\u0131zca tek bir sunucuda \u00e7al\u0131\u015fan uygulamalar i\u00e7in uygundur. Da\u011f\u0131t\u0131k sistemlerde, Memcached&#8217;in farkl\u0131 sunuculardan eri\u015filebilir olmas\u0131 gerekir.<\/p>\n<h4>3. SASL Kimlik Do\u011frulama Kullanma (Daha Geli\u015fmi\u015f G\u00fcvenlik)<\/h4>\n<p>Memcached&#8217;in kendisi yerle\u015fik bir kimlik do\u011frulama mekanizmas\u0131na sahip de\u011fildir. Ancak, SASL (Simple Authentication and Security Layer) kullanarak Memcached&#8217;e kimlik do\u011frulama katman\u0131 ekleyebilirsiniz. Bu, daha karma\u015f\u0131k bir kurulum gerektirir.<\/p>\n<p>SASL kurulumu i\u00e7in genellikle a\u015fa\u011f\u0131daki ad\u0131mlar\u0131 izlemeniz gerekir:<\/p>\n<p>*   <strong>SASL Paketlerini Kurma:<\/strong><\/p>\n<pre><code class=\"language-bash\">sudo yum install cyrus-sasl cyrus-sasl-plain cyrus-sasl-md5 -y<\/code><\/pre>\n<p>*   <strong>Memcached&#8217;i SASL Deste\u011fiyle Derleme veya Kurma:<\/strong> Bu genellikle Memcached&#8217;in \u00f6nceden derlenmi\u015f paketlerinde bulunmaz. SASL deste\u011fiyle Memcached&#8217;i kendiniz derlemeniz gerekebilir. Bu, \u00f6zellikle CentOS 7&#8217;de standart paket deposundan kurdu\u011funuzda ek bir ad\u0131md\u0131r ve daha fazla teknik bilgi gerektirir.<br \/>\n*   <strong>SASL Yap\u0131land\u0131rmas\u0131:<\/strong> <code>\/etc\/sasl2\/memcached.conf<\/code> gibi bir SASL yap\u0131land\u0131rma dosyas\u0131 olu\u015fturman\u0131z ve kullan\u0131c\u0131 kimlik bilgilerini (kullan\u0131c\u0131 ad\u0131\/parola) ayarlaman\u0131z gerekir.<br \/>\n*   <strong>Memcached Servisini SASL ile Ba\u015flatma:<\/strong> Memcached&#8217;i ba\u015flat\u0131rken SASL se\u00e7eneklerini belirtmeniz gerekir.<\/p>\n<p><strong>Not:<\/strong> SASL kurulumu, standart kurulumdan daha karma\u015f\u0131kt\u0131r ve genellikle \u00fcretim ortamlar\u0131nda daha fazla bak\u0131m gerektirir. E\u011fer sadece yerel a\u011f\u0131n\u0131zdaki uygulamalar Memcached&#8217;e eri\u015fiyorsa ve bu a\u011f g\u00fcvence alt\u0131ndaysa, SASL&#8217;ye gerek olmayabilir.<\/p>\n<h4>4. TLS\/SSL \u015eifrelemesi (Daha Geli\u015fmi\u015f G\u00fcvenlik)<\/h4>\n<p>Memcached, verileri \u015fifrelemek i\u00e7in yerle\u015fik bir TLS\/SSL deste\u011fi sunmaz. E\u011fer Memcached trafi\u011fini \u015fifrelemeniz gerekiyorsa, bunu bir ters proxy (\u00f6rne\u011fin, Nginx veya HAProxy) kullanarak yapman\u0131z gerekir.<\/p>\n<p>Ters proxy, istemcilerden gelen \u015fifreli (HTTPS) ba\u011flant\u0131lar\u0131 al\u0131r, bunlar\u0131 \u015fifresiz hale getirir, Memcached sunucusuna g\u00f6nderir, Memcached&#8217;ten gelen yan\u0131t\u0131 al\u0131r ve tekrar \u015fifreleyerek istemciye g\u00f6nderir.<\/p>\n<p>Bu kurulum, ek bir ters proxy sunucusunun yap\u0131land\u0131r\u0131lmas\u0131n\u0131 gerektirir ve karma\u015f\u0131kl\u0131\u011f\u0131 art\u0131r\u0131r.<\/p>\n<h3>Memcached&#8217;i Uygulamalarla Kullanma<\/h3>\n<p>Memcached&#8217;i kurup g\u00fcvenli\u011fini sa\u011flad\u0131ktan sonra, onu web uygulamalar\u0131n\u0131zla entegre edebilirsiniz. \u00c7o\u011fu modern web framework&#8217;\u00fc (PHP, Python, Node.js, Ruby vb.) Memcached i\u00e7in istemci k\u00fct\u00fcphaneleri sunar.<\/p>\n<p>\u00d6rne\u011fin, PHP&#8217;de Memcached kullanmak i\u00e7in <code>php-memcached<\/code> paketini kurman\u0131z gerekebilir:<\/p>\n<pre><code class=\"language-bash\">sudo yum install php-memcached -y<\/code><\/pre>\n<p>Ard\u0131ndan, uygulaman\u0131zda Memcached sunucunuzun IP adresini ve portunu belirterek bir Memcached istemcisi olu\u015fturabilirsiniz.<\/p>\n<pre><code class=\"language-php\">&lt;?php\n$memcached = new Memcached();\n$memcached-&gt;addServer('127.0.0.1', 11211); \/\/ Veya Memcached sunucunuzun IP adresi\n\n\/\/ Veri Ekleme\n$memcached-&gt;set('my_key', 'my_value', 3600); \/\/ 1 saat (3600 saniye) sonra silinir\n\n\/\/ Veri Alma\n$value = $memcached-&gt;get('my_key');\n\nif ($value) {\n    echo &quot;De\u011fer: &quot; . $value;\n} else {\n    echo &quot;Anahtar bulunamad\u0131 veya s\u00fcresi doldu.&quot;;\n}\n?&gt;<\/code><\/pre>\n<p>Bu basit \u00f6rnek, Memcached&#8217;e nas\u0131l veri yaz\u0131laca\u011f\u0131n\u0131 ve okunaca\u011f\u0131n\u0131 g\u00f6stermektedir. Ger\u00e7ek uygulamalarda, bu \u00f6nbellekleme mekanizmas\u0131, veritaban\u0131 sorgu sonu\u00e7lar\u0131n\u0131 veya hesaplanm\u0131\u015f verileri depolamak i\u00e7in kullan\u0131l\u0131r.<\/p>\n<h3>Performans Ayarlar\u0131 ve \u0130zleme<\/h3>\n<p>Memcached&#8217;in performans\u0131n\u0131 optimize etmek ve sorunlar\u0131 tespit etmek i\u00e7in baz\u0131 ek ad\u0131mlar at\u0131labilir:<\/p>\n<p>*   <strong>CACHESIZE Optimizasyonu:<\/strong> Sunucunuzun RAM&#8217;ini verimli kullanmak i\u00e7in <code>CACHESIZE<\/code> ayar\u0131n\u0131 dikkatlice yap\u0131n. \u00c7ok k\u00fc\u00e7\u00fck bir \u00f6nbellek yetersiz kal\u0131rken, \u00e7ok b\u00fcy\u00fck bir \u00f6nbellek sistemin genel performans\u0131n\u0131 olumsuz etkileyebilir.<br \/>\n*   <strong>\u0130stemci K\u00fct\u00fcphaneleri:<\/strong> Uygulaman\u0131zda kullan\u0131lan Memcached istemci k\u00fct\u00fcphanesinin en son s\u00fcr\u00fcm\u00fcn\u00fc kulland\u0131\u011f\u0131n\u0131zdan emin olun.<br \/>\n*   <strong>A\u011f Gecikmesi:<\/strong> E\u011fer Memcached sunucusu ile uygulama sunucusu farkl\u0131 makinelerdeyse, a\u011f gecikmesini minimize etmek \u00f6nemlidir.<br \/>\n*   <strong>\u0130zleme Ara\u00e7lar\u0131:<\/strong> Memcached&#8217;in istatistiklerini izlemek i\u00e7in <code>memcached-tools<\/code> gibi ara\u00e7lar\u0131 kullanabilirsiniz. Bu ara\u00e7lar, \u00f6nbellek isabet oranlar\u0131 (hit rates), eksik oranlar\u0131 (miss rates), bellek kullan\u0131m\u0131 gibi \u00f6nemli metrikleri sa\u011flar.<\/p>\n<p><code>memcached-tools<\/code> paketini kurmak i\u00e7in:<\/p>\n<pre><code class=\"language-bash\">sudo yum install memcached-tools -y<\/code><\/pre>\n<p>Ard\u0131ndan, Memcached&#8217;in istatistiklerini g\u00f6rmek i\u00e7in a\u015fa\u011f\u0131daki komutu kullanabilirsiniz:<\/p>\n<pre><code class=\"language-bash\">echo &quot;stats&quot; | nc 127.0.0.1 11211<\/code><\/pre>\n<p>Bu komut, Memcached sunucusuna <code>stats<\/code> komutunu g\u00f6nderir ve sonu\u00e7lar\u0131 g\u00f6sterir.<\/p>\n<h3>\u00d6zet ve En \u0130yi Uygulamalar<\/h3>\n<p>CentOS 7&#8217;de Memcached kurmak ve g\u00fcvenli\u011fini sa\u011flamak, web uygulamalar\u0131n\u0131z\u0131n performans\u0131n\u0131 art\u0131rman\u0131n etkili bir yoludur. \u0130\u015fte en iyi uygulamalar:<\/p>\n<p>1.  <strong>Varsay\u0131lan G\u00fcvenlik:<\/strong> Memcached&#8217;i yaln\u0131zca g\u00fcvenli ve kontroll\u00fc a\u011flardan eri\u015filebilir k\u0131l\u0131n. \u0130nternete a\u00e7\u0131k bir \u015fekilde \u00e7al\u0131\u015ft\u0131rmaktan ka\u00e7\u0131n\u0131n.<br \/>\n2.  <strong>Firewall Kullan\u0131m\u0131:<\/strong> <code>firewalld<\/code> ile Memcached portuna (varsay\u0131lan 11211) eri\u015fimi yaln\u0131zca gerekli IP adresleri veya a\u011flarla s\u0131n\u0131rlay\u0131n.<br \/>\n3.  <strong>Loopback Aray\u00fcz\u00fc:<\/strong> M\u00fcmk\u00fcnse, Memcached&#8217;i yaln\u0131zca <code>127.0.0.1<\/code> (localhost) \u00fczerinden eri\u015filebilir hale getirin.<br \/>\n4.  <strong>Bellek Boyutu:<\/strong> <code>CACHESIZE<\/code> ayar\u0131n\u0131 sunucunuzun RAM kapasitesine ve uygulaman\u0131z\u0131n ihtiya\u00e7lar\u0131na g\u00f6re optimize edin.<br \/>\n5.  <strong>\u0130zleme:<\/strong> Memcached&#8217;in performans\u0131n\u0131 ve bellek kullan\u0131m\u0131n\u0131 d\u00fczenli olarak izleyin.<br \/>\n6.  <strong>SASL\/TLS:<\/strong> E\u011fer \u00e7ok y\u00fcksek g\u00fcvenlik gereksinimleriniz varsa, SASL kimlik do\u011frulamas\u0131 veya ters proxy ile TLS\/SSL \u015fifrelemesi gibi daha geli\u015fmi\u015f y\u00f6ntemleri ara\u015ft\u0131r\u0131n. Ancak bu, kurulumu karma\u015f\u0131kla\u015ft\u0131racakt\u0131r.<\/p>\n<p>Bu ad\u0131mlar\u0131 izleyerek, CentOS 7 sunucular\u0131n\u0131zda hem g\u00fcvenli hem de y\u00fcksek performansl\u0131 bir Memcached kurulumu ger\u00e7ekle\u015ftirebilirsiniz.<\/p>\n<div class=\"github-example-link\"><strong>\u00d6rnek kod:<\/strong> <a href=\"https:\/\/github.com\/fatihsoysalcom\/memcached-basic-usage-example\" target=\"_blank\" rel=\"noopener noreferrer\">github.com\/fatihsoysalcom\/memcached-basic-usage-example<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"CentOS 7&#8217;de Memcached Kurulumu ve G\u00fcvenli\u011fi Memcached, y\u00fcksek performansl\u0131, da\u011f\u0131t\u0131k bir bellek i\u00e7i nesne \u00f6nbellekleme sistemidir.","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[241],"tags":[],"class_list":{"0":"post-41877","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-linux","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CentOS 7&#039;de Memcached Kurulumu ve G\u00fcvenli\u011fi - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CentOS 7&#039;de Memcached Kurulumu ve G\u00fcvenli\u011fi\" \/>\n<meta property=\"og:description\" content=\"CentOS 7&#039;de Memcached Kurulumu ve G\u00fcvenli\u011fi Memcached, y\u00fcksek performansl\u0131, da\u011f\u0131t\u0131k bir bellek i\u00e7i nesne \u00f6nbellekleme sistemidir.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-18T14:01:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-18T14:01:25+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"CentOS 7&#8217;de Memcached Kurulumu ve G\u00fcvenli\u011fi\",\"datePublished\":\"2026-05-18T14:01:01+00:00\",\"dateModified\":\"2026-05-18T14:01:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/\"},\"wordCount\":1723,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"Linux\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/#respond\"]}],\"copyrightYear\":\"2026\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/\",\"name\":\"CentOS 7'de Memcached Kurulumu ve G\u00fcvenli\u011fi - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2026-05-18T14:01:01+00:00\",\"dateModified\":\"2026-05-18T14:01:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CentOS 7&#8217;de Memcached Kurulumu ve G\u00fcvenli\u011fi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"CentOS 7'de Memcached Kurulumu ve G\u00fcvenli\u011fi - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/","og_locale":"tr_TR","og_type":"article","og_title":"CentOS 7'de Memcached Kurulumu ve G\u00fcvenli\u011fi","og_description":"CentOS 7'de Memcached Kurulumu ve G\u00fcvenli\u011fi Memcached, y\u00fcksek performansl\u0131, da\u011f\u0131t\u0131k bir bellek i\u00e7i nesne \u00f6nbellekleme sistemidir.","og_url":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2026-05-18T14:01:01+00:00","article_modified_time":"2026-05-18T14:01:25+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"9 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"CentOS 7&#8217;de Memcached Kurulumu ve G\u00fcvenli\u011fi","datePublished":"2026-05-18T14:01:01+00:00","dateModified":"2026-05-18T14:01:25+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/"},"wordCount":1723,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["Linux"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/#respond"]}],"copyrightYear":"2026","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/","url":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/","name":"CentOS 7'de Memcached Kurulumu ve G\u00fcvenli\u011fi - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2026-05-18T14:01:01+00:00","dateModified":"2026-05-18T14:01:25+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/centos-7de-memcached-kurulumu-ve-guvenligi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"CentOS 7&#8217;de Memcached Kurulumu ve G\u00fcvenli\u011fi"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/41877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=41877"}],"version-history":[{"count":2,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/41877\/revisions"}],"predecessor-version":[{"id":41879,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/41877\/revisions\/41879"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=41877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=41877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=41877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}