{"id":2488,"date":"2026-10-05T17:30:00","date_gmt":"2026-10-05T14:30:00","guid":{"rendered":"https:\/\/narhost.com\/destek\/?p=2488"},"modified":"2026-10-05T17:30:00","modified_gmt":"2026-10-05T14:30:00","slug":"ubuntu-otomatik-guvenlik-guncellemeleri","status":"publish","type":"post","link":"https:\/\/narhost.com\/destek\/ubuntu-otomatik-guvenlik-guncellemeleri\/","title":{"rendered":"Ubuntu Otomatik G\u00fcvenlik G\u00fcncellemeleri Nas\u0131l A\u00e7\u0131l\u0131r"},"content":{"rendered":"<p class=\"kb-dogrulama\">Son g\u00f6zden ge\u00e7irme: Eyl\u00fcl 2026 \u00b7 Ubuntu 24.04 resm\u00ee dok\u00fcman\u0131na g\u00f6re<\/p>\n<div id=\"hizli-cozum\" class=\"ai-box ai-box--cozum\">\n<p class=\"ai-box-title\">H\u0131zl\u0131 \u00e7\u00f6z\u00fcm<\/p>\n<p><strong>Ubuntu otomatik g\u00fcvenlik g\u00fcncellemeleri<\/strong><code>unattended-upgrades<\/code> paketiyle yap\u0131l\u0131r; paket Ubuntu&#8217;da kurulu gelir, yaln\u0131z a\u00e7\u0131k oldu\u011funu do\u011frulaman\u0131z ve yeniden ba\u015flatma davran\u0131\u015f\u0131n\u0131 se\u00e7meniz gerekir.<\/p>\n<ol>\n<li><code>sudo apt install unattended-upgrades<\/code> ile paketin kurulu oldu\u011fundan emin olun.<\/li>\n<li><code>sudo dpkg-reconfigure -plow unattended-upgrades<\/code> komutunda <strong>Yes<\/strong> se\u00e7in.<\/li>\n<li><code>\/etc\/apt\/apt.conf.d\/50unattended-upgrades<\/code> dosyas\u0131nda yaln\u0131z g\u00fcvenlik deposunun a\u00e7\u0131k oldu\u011funu kontrol edin.<\/li>\n<li><code>sudo unattended-upgrade --dry-run --debug<\/code> ile deneme \u00e7al\u0131\u015ft\u0131rmas\u0131 yap\u0131n.<\/li>\n<\/ol>\n<\/div>\n<table class=\"kb-uyg\">\n<tr>\n<th>Panel<\/th>\n<td>Yok \u2014 terminal (SSH)<\/td>\n<\/tr>\n<tr>\n<th>Sistem<\/th>\n<td>Ubuntu 22.04 ya da 24.04, VPS\/VDS<\/td>\n<\/tr>\n<tr>\n<th>Yetki<\/th>\n<td>root ya da sudo yetkili kullan\u0131c\u0131<\/td>\n<\/tr>\n<tr>\n<th>Narhost \u00fcr\u00fcn\u00fc<\/th>\n<td><a href=\"https:\/\/narhost.com\/vps-sunucu\" title=\"Narhost VPS Sunucu paketleri\">VPS Sunucu<\/a><\/td>\n<\/tr>\n<\/table>\n<div class=\"kb-once\">\n<p class=\"label\">Ba\u015flamadan \u00f6nce<\/p>\n<ul>\n<li>Sunucuya SSH ile ba\u011flan\u0131n ve bekleyen g\u00fcncellemeleri bir kez elle kurun (<code>sudo apt update &amp;&amp; sudo apt upgrade<\/code>).<\/li>\n<li>Yap\u0131land\u0131rma dosyas\u0131n\u0131 de\u011fi\u015ftirmeden \u00f6nce kopyas\u0131n\u0131 al\u0131n: <code>sudo cp \/etc\/apt\/apt.conf.d\/50unattended-upgrades \/root\/<\/code>.<\/li>\n<li>Otomatik yeniden ba\u015flatmay\u0131 a\u00e7acaksan\u0131z sitenizin ya da uygulaman\u0131z\u0131n a\u00e7\u0131l\u0131\u015fta kendili\u011finden ba\u015flad\u0131\u011f\u0131n\u0131 do\u011frulay\u0131n.<\/li>\n<\/ul>\n<\/div>\n<h2>Ubuntu otomatik g\u00fcvenlik g\u00fcncellemeleri ne i\u015fe yarar<\/h2>\n<p>VPS ve VDS \u00fcr\u00fcnleri y\u00f6netimsizdir; i\u015fletim sistemi g\u00fcncellemesi sunucu sahibinin sorumlulu\u011fundad\u0131r. OpenSSH, OpenSSL ya da \u00e7ekirdek i\u00e7in yay\u0131mlanan bir g\u00fcvenlik yamas\u0131 kurulmad\u0131k\u00e7a sunucu a\u00e7\u0131k kal\u0131r. Elle g\u00fcncelleme unutulabilir; <code>unattended-upgrades<\/code> ise paket listesini her g\u00fcn tazeler ve yaln\u0131z izin verdi\u011finiz depolardan gelen g\u00fcncellemeleri kurar.<\/p>\n<p><a href=\"https:\/\/ubuntu.com\/server\/docs\/how-to\/software\/automatic-updates\/\" title=\"Ubuntu Server \u2014 Automatic updates resm\u00ee dok\u00fcman\u0131\" target=\"_blank\" rel=\"noopener\">Ubuntu Server dok\u00fcman\u0131na g\u00f6re<\/a> paket kurulumdan sonra g\u00fcvenlik g\u00fcncellemelerini g\u00fcnde bir kez kurar ve varsay\u0131lan ayarda sunucuyu kendili\u011finden yeniden ba\u015flatmaz. G\u00fcvenlik d\u0131\u015f\u0131 g\u00fcncellemeler (<code>-updates<\/code> deposu) varsay\u0131lan olarak kapal\u0131d\u0131r; bir s\u00fcr\u00fcm de\u011fi\u015fikli\u011finin uygulaman\u0131z\u0131 bozmas\u0131n\u0131 istemiyorsan\u0131z bu ayar\u0131 \u00f6yle b\u0131rak\u0131n.<\/p>\n<figure class=\"nh-sema\"><img src=\"https:\/\/narhost.com\/destek\/wp-content\/uploads\/2026\/09\/ubuntu-otomatik-guvenlik-guncellemeleri-sema-narhost.webp\" alt=\"Ubuntu otomatik g\u00fcvenlik g\u00fcncellemeleri ak\u0131\u015f \u015femas\u0131 \u2014 paket, etkinle\u015ftirme, depo se\u00e7imi ve g\u00fcnl\u00fck kontrol\u00fc\" width=\"1200\" height=\"500\" loading=\"lazy\" decoding=\"async\"><figcaption>Sunucuda g\u00fcncelleme otomasyonu d\u00f6rt ad\u0131mda kurulur: paket, etkinle\u015ftirme, yaln\u0131z g\u00fcvenlik deposu ve g\u00fcnl\u00fck kontrol\u00fc.<\/figcaption><\/figure>\n<h2>Ad\u0131m ad\u0131m otomatik g\u00fcncellemeleri a\u00e7ma<\/h2>\n<ol class=\"kb-adimlar\">\n<li><strong>Paketin kurulu oldu\u011funu do\u011frulay\u0131n.<\/strong>\n<pre><code class=\"language-bash\">sudo apt update\nsudo apt install unattended-upgrades<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: <code>unattended-upgrades is already the newest version<\/code> ya da kurulum sat\u0131rlar\u0131.<\/p>\n<\/li>\n<li><strong>Otomatik \u00e7al\u0131\u015fmay\u0131 a\u00e7\u0131n.<\/strong> A\u00e7\u0131lan ekranda &#8220;Automatically download and install stable updates?&#8221; sorusuna <strong>Yes<\/strong> deyin.\n<pre><code class=\"language-bash\">sudo dpkg-reconfigure -plow unattended-upgrades\ncat \/etc\/apt\/apt.conf.d\/20auto-upgrades<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: dosyada iki sat\u0131r g\u00f6r\u00fcn\u00fcr; <code>1<\/code> her g\u00fcn \u00e7al\u0131\u015faca\u011f\u0131, <code>0<\/code> kapal\u0131 oldu\u011fu anlam\u0131na gelir.<\/p>\n<pre><code>APT::Periodic::Update-Package-Lists \"1\";\nAPT::Periodic::Unattended-Upgrade \"1\";<\/code><\/pre>\n<\/li>\n<li><strong>Kaynak depolar\u0131 kontrol edin.<\/strong><code>sudo nano \/etc\/apt\/apt.conf.d\/50unattended-upgrades<\/code> ile dosyay\u0131 a\u00e7\u0131n. <code>Allowed-Origins<\/code> b\u00f6l\u00fcm\u00fcnde <code>-security<\/code> sat\u0131r\u0131 a\u00e7\u0131k, <code>-updates<\/code>, <code>-proposed<\/code> ve <code>-backports<\/code> sat\u0131rlar\u0131 <code>\/\/<\/code> ile yorum sat\u0131r\u0131 olmal\u0131d\u0131r.\n<pre><code>Unattended-Upgrade::Allowed-Origins {\n        \"${distro_id}:${distro_codename}\";\n        \"${distro_id}:${distro_codename}-security\";\n\/\/      \"${distro_id}:${distro_codename}-updates\";\n};<\/code><\/pre>\n<\/li>\n<li><strong>Yeniden ba\u015flatma karar\u0131n\u0131 verin.<\/strong> \u00c7ekirdek g\u00fcncellemesi ancak yeniden ba\u015flatmayla devreye girer. Ayn\u0131 dosyada varsay\u0131lan de\u011fer <code>false<\/code>&#8216;tur.\n<div class=\"warn-box\">\n<p class=\"label\">Dikkat<\/p>\n<p><code>Automatic-Reboot<\/code> de\u011ferini <code>true<\/code> yaparsan\u0131z sunucu onay istemeden yeniden ba\u015flar; oturum a\u00e7\u0131k kullan\u0131c\u0131 olsa bile. A\u00e7\u0131l\u0131\u015fta kendili\u011finden ba\u015flamayan bir uygulama varsa site kapal\u0131 kal\u0131r.<\/p>\n<\/div>\n<pre><code>Unattended-Upgrade::Automatic-Reboot \"true\";\nUnattended-Upgrade::Automatic-Reboot-Time \"04:00\";<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: yeniden ba\u015flatma gerekti\u011finde sunucu en yak\u0131n 04:00&#8217;te yeniden ba\u015flar. Kapal\u0131 b\u0131rak\u0131rsan\u0131z <code>\/var\/run\/reboot-required<\/code> dosyas\u0131n\u0131n varl\u0131\u011f\u0131n\u0131 takip edip uygun saatte elle yeniden ba\u015flat\u0131n.<\/p>\n<\/li>\n<li><strong>Belirli bir paketi hari\u00e7 tutun (iste\u011fe ba\u011fl\u0131).<\/strong> S\u00fcr\u00fcm\u00fcn\u00fc sabit tutman\u0131z gereken paketi <code>Package-Blacklist<\/code> listesine ekleyin; engellenen pakete ba\u011f\u0131ml\u0131 g\u00fcncellemelerin de duraca\u011f\u0131n\u0131 unutmay\u0131n.\n<pre><code>Unattended-Upgrade::Package-Blacklist {\n    \"mariadb-server\";\n};<\/code><\/pre>\n<\/li>\n<li><strong>Deneme \u00e7al\u0131\u015ft\u0131rmas\u0131 yap\u0131n.<\/strong>\n<pre><code class=\"language-bash\">sudo unattended-upgrade --dry-run --debug<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: \u00e7\u0131kt\u0131da <code>Allowed origins are: ...-security<\/code> sat\u0131r\u0131 ve kurulacak paketlerin listesi g\u00f6r\u00fcn\u00fcr, ger\u00e7ek kurulum yap\u0131lmaz.<\/p>\n<\/li>\n<\/ol>\n<h2>Do\u011frulama<\/h2>\n<div class=\"success-box\">\n<p class=\"label\">Sonu\u00e7<\/p>\n<p><code>systemctl list-timers apt-daily*<\/code> komutu <code>apt-daily.timer<\/code> ve <code>apt-daily-upgrade.timer<\/code> i\u00e7in bir sonraki \u00e7al\u0131\u015fma saatini g\u00f6steriyor, ertesi g\u00fcn <code>\/var\/log\/unattended-upgrades\/unattended-upgrades.log<\/code> dosyas\u0131nda <code>All upgrades installed<\/code> ya da <code>No packages found that can be upgraded unattended<\/code> sat\u0131r\u0131 varsa ayar \u00e7al\u0131\u015f\u0131yor demektir.<\/p>\n<\/div>\n<h2>H\u00e2l\u00e2 \u00e7\u00f6z\u00fclmediyse<\/h2>\n<ul>\n<li><strong>G\u00fcnl\u00fck dosyas\u0131 bo\u015f ya da yok.<\/strong><code>20auto-upgrades<\/code> i\u00e7indeki de\u011ferler <code>0<\/code> olabilir; ikinci ad\u0131m\u0131 tekrarlay\u0131n. G\u00fcnl\u00fc\u011f\u00fc okumak i\u00e7in bkz. <a href=\"https:\/\/narhost.com\/destek\/linux-log-dosyalari-nasil-okunur\/\" title=\"Linux log dosyalar\u0131 nas\u0131l okunur \u2014 Narhost Destek\">Linux log dosyalar\u0131n\u0131 okuma<\/a>.<\/li>\n<li><strong>apt &#8220;Could not get lock&#8221; hatas\u0131 veriyor.<\/strong> Arka planda otomatik g\u00fcncelleme \u00e7al\u0131\u015f\u0131yordur; birka\u00e7 dakika bekleyip tekrar deneyin, kilit dosyas\u0131n\u0131 silmeyin.<\/li>\n<li><strong>G\u00fcncelleme sonras\u0131 bir servis a\u00e7\u0131lmad\u0131.<\/strong><code>unattended-upgrades-dpkg.log<\/code> dosyas\u0131nda hangi paketin g\u00fcncellendi\u011fine bak\u0131n ve servisi yeniden ba\u015flat\u0131n; bkz. <a href=\"https:\/\/narhost.com\/destek\/linux-servisini-durdurma-ve-aktif-etme\/\" title=\"Linux servisini durdurma ve aktif etme \u2014 Narhost Destek\">Linux servisini durdurma ve aktif etme<\/a>.<\/li>\n<li><strong>Sunucunuz Debian.<\/strong> Paket ayn\u0131d\u0131r, depo adlar\u0131 farkl\u0131d\u0131r; bkz. <a href=\"https:\/\/narhost.com\/destek\/debian-guncelleme-nasil-yapilir\/\" title=\"Debian g\u00fcncelleme nas\u0131l yap\u0131l\u0131r \u2014 Narhost Destek\">Debian g\u00fcncelleme<\/a>.<\/li>\n<\/ul>\n<div class=\"cta-box\">\n<p class=\"label\">Narhost deste\u011fi<\/p>\n<p>Talebe \u015funlar\u0131 ekleyin: sunucunuzun IP adresi, Ubuntu s\u00fcr\u00fcm\u00fc (<code>lsb_release -a<\/code>), <code>20auto-upgrades<\/code> i\u00e7eri\u011fi ve <code>unattended-upgrades.log<\/code> dosyas\u0131n\u0131n son sat\u0131rlar\u0131.<\/p>\n<p><a class=\"cta-btn\" href=\"https:\/\/narhost.com\/submitticket.php\" title=\"Narhost destek talebi olu\u015ftur\">Destek talebi a\u00e7<\/a><\/div>\n<div class=\"kb-ilgili\">\n<p class=\"label\">Sonraki ad\u0131mlar<\/p>\n<ul>\n<li><a href=\"https:\/\/narhost.com\/destek\/vps-server\/\" title=\"VPS ve VDS sunucu y\u00f6netimi kartlar\u0131 \u2014 Narhost Destek\">Sunucu y\u00f6netimi kartlar\u0131n\u0131n tamam\u0131<\/a><\/li>\n<li><a href=\"https:\/\/narhost.com\/destek\/vps-vds-ilk-kurulum-rehberi\/\" title=\"VPS ve VDS ilk kurulum rehberi \u2014 Narhost Destek\">VPS ve VDS ilk kurulum rehberi<\/a><\/li>\n<li><a href=\"https:\/\/narhost.com\/destek\/sunucuda-guvenlik-acigi-tespit-edilirse-ne-yapmali\/\" title=\"Sunucuda g\u00fcvenlik a\u00e7\u0131\u011f\u0131 tespit edilirse ne yapmal\u0131 \u2014 Narhost Destek\">Sunucuda g\u00fcvenlik a\u00e7\u0131\u011f\u0131 tespit edilirse<\/a><\/li>\n<li><a href=\"https:\/\/narhost.com\/blog\/yonetilen-mi-yonetilmeyen-sunucu-mu\/\" title=\"Y\u00f6netilen mi y\u00f6netilmeyen sunucu mu \u2014 Narhost Blog\">G\u00fcncelleme sorumlulu\u011fu neden sunucu sahibinde<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"kb-faq\">\n<h2>S\u0131k\u00e7a sorulan sorular<\/h2>\n<h3>Ubuntu otomatik g\u00fcvenlik g\u00fcncellemeleri varsay\u0131lan olarak a\u00e7\u0131k m\u0131?<\/h3>\n<p>Standart Ubuntu Server kurulumunda paket kurulu ve a\u00e7\u0131k gelir. \u00d6zel bir imajla kurulan sunucuda farkl\u0131 olabilir; <code>20auto-upgrades<\/code> dosyas\u0131n\u0131 kontrol edin.<\/p>\n<h3>Otomatik g\u00fcncellemeyi ge\u00e7ici olarak nas\u0131l kapat\u0131r\u0131m?<\/h3>\n<p><code>20auto-upgrades<\/code> i\u00e7indeki iki de\u011feri <code>\"0\"<\/code> yap\u0131n. Bak\u0131m bitince yeniden <code>\"1\"<\/code> yapmay\u0131 unutmay\u0131n.<\/p>\n<h3>\u00c7ekirdek g\u00fcncellemesi yeniden ba\u015flatmadan uygulan\u0131r m\u0131?<\/h3>\n<p>Hay\u0131r. Yeni \u00e7ekirdek yeniden ba\u015flatmaya kadar devreye girmez; <code>\/var\/run\/reboot-required<\/code> dosyas\u0131 bu durumu g\u00f6sterir.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu sunucuda unattended-upgrades ile g\u00fcvenlik g\u00fcncellemelerini otomatik kurma: dpkg-reconfigure, 20auto-upgrades ve 50unattended-upgrades ayarlar\u0131, otomatik yeniden ba\u015flatma, paket hari\u00e7 tutma ve g\u00fcnl\u00fckleri okuma.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-2488","post","type-post","status-publish","format-standard","hentry","category-vps-server"],"meta_box":[],"_links":{"self":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/2488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/comments?post=2488"}],"version-history":[{"count":1,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/2488\/revisions"}],"predecessor-version":[{"id":2859,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/2488\/revisions\/2859"}],"wp:attachment":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/media?parent=2488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/categories?post=2488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/tags?post=2488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}