{"id":11585,"date":"2017-02-16T11:05:47","date_gmt":"2017-02-16T09:05:47","guid":{"rendered":"https:\/\/blog.natro.com\/?p=11585"},"modified":"2019-09-27T11:15:19","modified_gmt":"2019-09-27T08:15:19","slug":"whm-cpanel-gereksiz-dosyalarin-silinmesi","status":"publish","type":"post","link":"https:\/\/www.natro.com\/blog\/whm-cpanel-gereksiz-dosyalarin-silinmesi\/","title":{"rendered":"WHM cPanel Gereksiz Dosyalar\u0131n Silinmesi"},"content":{"rendered":"<p>\n\t<span style=\"font-size:16px;\">Web server yap\u0131lar\u0131nda kullan\u0131m ama\u00e7lar\u0131 ve data ak\u0131\u015f\u0131na g\u00f6re gerkesiz dosya b\u00fct\u00fcnl\u00fckleri olu\u015fabilmektedir. Bu yaz\u0131m\u0131zda <strong>WHM cPanel<\/strong> kullanan web server y\u00f6neticilerine gerkesiz dosyalar\u0131 nas\u0131l silebileceklerine dahil detay payla\u015faca\u011f\u0131z.<\/span>\n<\/p>\n<p>\n\t<!--more-->\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">Sunucu gereksiz dosya b\u00fct\u00fcnl\u00fc\u011f\u00fcn\u00fcn b\u00fcy\u00fck bir yo\u011funlu\u011fu log dosyalar\u0131 taraf\u0131ndan olu\u015fmaktad\u0131r. Disk alan\u0131m\u0131zda yer a\u00e7mak ve gereksiz dosyalardan kurtulabilmek ad\u0131na ilk hedefin log dosyalar\u0131 olmas\u0131 gerekir.<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">\u00d6zellikle inode ile <a href=\"https:\/\/www.natro.com\/hosting\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>hosting hizmeti<\/strong><\/a> verdi\u011finizde dosya \u00e7oklu\u011fu disk ve sunucu genel data havuz limitlerini etkimeye ba\u015flar. Belirli bir zaman dilimi sonras\u0131nda kontrol alt\u0131nda tutulmayan log kay\u0131tlar\u0131 sunucu disk alan\u0131nda ciddi anlamda yer kaplamaya ba\u015flayacakt\u0131r.<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">Bir de bu durumu<strong> WHM+cPanel <\/strong>kullanan sunucular i\u00e7in d\u00fc\u015f\u00fcn\u00fcrsek modsec ve benzeri eklentilerin ciddi anlamda log havuzlar\u0131 olu\u015fturdu\u011funu g\u00f6rebilirsiniz. Eklenti ve servislerin log tutmas\u0131n\u0131 disable konuma getirmek &quot;evet&quot; bir \u00e7\u00f6z\u00fcm. Fakat unutmamal\u0131y\u0131z ki belirli bir s\u00fcreye kadar log dosyalar\u0131n tutulmas\u0131 yasal sebeplerden dolay\u0131 zorunlu olabilir.<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">Gereksiz ve ciddi anlamda data alan\u0131 kaplayan loglar\u0131n temizlenmesi i\u00e7in a\u015fa\u011f\u0131da payla\u015ft\u0131\u011f\u0131m komutlar\u0131 sunucuda \u00e7al\u0131\u015ft\u0131rmak yeterli ve sonuca ula\u015fman\u0131z i\u00e7in yard\u0131mc\u0131 olacakt\u0131r.<\/span>\n<\/p>\n<p>\n\t<br \/>\n\t<span style=\"font-size:16px;\">1- \u00d6ncelikle hedef dizinleri belirlememiz gerekiyor.<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">Apache,Home, cPANEL Log path;<\/span>\n<\/p>\n<p>\n\t<strong><span style=\"font-size:16px;\">cd \/usr\/local\/apache\/logs<br \/>\n\tcd \/home<br \/>\n\tcd \/usr\/local\/cpanel\/logs\/<\/span><\/strong>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">2- Error Log dosya tarama ve Silme ;<\/span>\n<\/p>\n<p>\n\t<strong><span style=\"font-size:16px;\">find \/home\/*\/public_html -name error_log -type f -ls -exec rm -f {} \\;<\/span><\/strong>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">3- Dizinin toplam boyutunu \u00f6\u011frenmek i\u00e7in ;<\/span>\n<\/p>\n<p>\n\t<strong><span style=\"font-size:16px;\">ls -lh | more | head -1<\/span><\/strong>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">4- Dizinde bulunan dosyalar\u0131 silmek i\u00e7in ;<\/span>\n<\/p>\n<p>\n\t<strong><span style=\"font-size:16px;\">find . -type f -print -exec rm {} \\;<\/span><\/strong>\n<\/p>\n<p>\n\t<br \/>\n\t<span style=\"font-size:16px;\">Faydal\u0131 olmas\u0131 dile\u011fiyle.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"Web server yap\u0131lar\u0131nda kullan\u0131m ama\u00e7lar\u0131 ve data ak\u0131\u015f\u0131na g\u00f6re gerkesiz dosya b\u00fct\u00fcnl\u00fckleri olu\u015fabilmektedir. Bu yaz\u0131m\u0131zda WHM cPanel kullanan&hellip;\n","protected":false},"author":7,"featured_media":13080,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,28,36],"tags":[],"class_list":{"0":"post-11585","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-genel","8":"category-nasil-yapilir","9":"category-sunucu"},"_links":{"self":[{"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/posts\/11585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/comments?post=11585"}],"version-history":[{"count":0,"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/posts\/11585\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/media\/13080"}],"wp:attachment":[{"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/media?parent=11585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/categories?post=11585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.natro.com\/blog\/wp-json\/wp\/v2\/tags?post=11585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}