Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    PfSense üzerinde Otomatik Squid Cache Temizlemek

    Turkish
    11
    18
    10145
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dreamervlk last edited by

      Arkadaşlar Merhaba,

      Uzun süredir pfsense de cache den kaynaklanan kilitlenmeler için bir script üzerinde denemeler yapıyordum.
      Daha önceki script te crontab a eklenince squid start olmuyordu. O sorunda giderildi.
      Umarım işinize yarar.

      Öncelikle /sbin/ altına cleansquid.sh adında bir
      script oluşturuyoruz.

      #cleansquid.sh
      #Created By Volkan Vural
      #This script using for Squid Cache Folder Cleaning
      #e-mail=aytvolkan@hotmail.com
      #Publish Date = 25.09.2012
      /usr/local/etc/rc.d/squid.sh stop
      rm -rf /var/squid/cache/
      mkdir -p /var/squid/cache/
      cd /var/squid/
      chown proxy:proxy cache
      chmod 755 /var/squid/cache/
      squid -z
      /usr/local/etc/rc.d/squid.sh start

      Kayıt ettikten sonra izinleri vermek için aşağıdaki
      komutu çalıştırıyoruz.

      chmod 777  /sbin/cleansquid.sh

      scripti çalıştırıyoruz ve cache temizliği yapılıyor.
      ./cleansquid.sh

      İstenirse crontab'a script günlük haftalık veya aylık olarak atılabilir.

      Örnek : Her ayın 1. günü 23:30 da sistemde bu script çalıştırılacaktır.
      crontab -e
      30 23 1 * * /bin/sh /sbin/cleansquid.sh

      http://www.volkanvural.name.tr/2011/05/pfsense-uzerinde-squid-cache-temizlemek.html

      Kolay Gelsin
      Volkan Vural

      1 Reply Last reply Reply Quote 0
      • N
        nmnoztrk last edited by

        **Eyvallah kardeş. bu güzel  bilgi için teşekkürler.

        Ellerine sağlık.**

        1 Reply Last reply Reply Quote 0
        • D
          davit last edited by

          tşkler arkadasim emegine saglik güzel paylaşım olmus.:)

          1 Reply Last reply Reply Quote 0
          • O
            oguz6578 last edited by

            bişey sormak istiyorum kodu nereye yazıcaz  command promt mu yoksa putty denmi giricez.

            1 Reply Last reply Reply Quote 0
            • technical
              technical last edited by

              Elinize sağlık sabit başlıklar içinde bulunacak şekilde ayarladım bu konuyu.

              1 Reply Last reply Reply Quote 0
              • K
                kadelus last edited by

                Merhaba bu işlem için ellerine sağlık cache temizliği yapabildim fakat 1 gün sonra squidGuard ve squid çalışmamaya başladı sıkıntı ne olabilir..

                1 Reply Last reply Reply Quote 0
                • K
                  kadelus last edited by

                  Loglardada aşağıdaki hatayı vermektedir nasıl düzeltebilirim..

                  Failed to verify one of the swap directories, Check cache.log for details. Run 'squid -z' to create swap directories if needed, or if running Squid for the first time.

                  1 Reply Last reply Reply Quote 0
                  • technical
                    technical last edited by

                    Failed to verify one of the swap directories

                    swap dosyalarını doğrulayamıyor sanırım.
                    /var/squid/cache/ dosyası varmı konrol ediniz yoksa oluşturup squidi tekrar çalıştırmayı deneyiniz.

                    1 Reply Last reply Reply Quote 0
                    • tuzsuzdeli
                      tuzsuzdeli last edited by

                      @TechnicaL:

                      Failed to verify one of the swap directories

                      swap dosyalarını doğrulayamıyor sanırım.
                      /var/squid/cache/ dosyası varmı konrol ediniz yoksa oluşturup squidi tekrar çalıştırmayı deneyiniz.

                      Varsa bile, izin durumunu denetleyiniz
                      "755" olmalı

                      1 Reply Last reply Reply Quote 0
                      • O
                        oguz6578 last edited by

                        Arkadaşlar ben bunu deniyorum ama cache i fln temizlemiyor 2.0.3 versiyon kullanıyorum cachei nasıl temizleyebilirim…

                        Dosyayı oluşturup sbin/ içine atıyorum komutu da command execute yapıyorum ama bişey olduğu yok ...

                        Bu Cache dosyalarını manuel yada otomatik temizlemenin yolu yokmu başka ?

                        Bu konu hakkında yardımcı olabilirmisiniz bana ?

                        1 Reply Last reply Reply Quote 0
                        • tuzsuzdeli
                          tuzsuzdeli last edited by

                          Bende problemsiz çalışıyor.
                          Sizde ne hata veriyor ?

                          1 Reply Last reply Reply Quote 0
                          • O
                            oguz6578 last edited by

                            Hata fln vermiyor ama çalıştığını anlamıyorum birde  winscp ile bağlanıp klasöre baktığımda bişeyin temizlendiğini görmüyorum.

                            1 Reply Last reply Reply Quote 0
                            • tuzsuzdeli
                              tuzsuzdeli last edited by

                              dosyada yazılan komutları satır satır çalıştırın
                              hangi satırda ne hata veriyor önce onu tespit edin.

                              1 Reply Last reply Reply Quote 0
                              • O
                                oguz6578 last edited by

                                Komutları çalıştırmak için web arayüzünden;

                                Diagnostics==> Command sayfasına gidip

                                Execute Shell command  altındaki satıra girmem gerekiyor değilmi ?

                                Yanlışmı düşünüyorum yoksa.?

                                1 Reply Last reply Reply Quote 0
                                • K
                                  kalender last edited by

                                  selam arkadaşlar pfsense i ilk kurduğum zaman squid cache yi belirli aralıklarla temizlemeyi otomatiğe bağlamayı düşünmüştüm fakat aşağıdaki kodları bir kaç defa uygulayarak cacheyi temizlemenin sorun olmadığını gördüm sizlerle paylaşmak istedim

                                  pfsense arayüzünde Diagnostics>command prompt kısmını açıyoruz ve aşağıdaki kodları sırasıyla satır satır yapıştırarak execute tıklıyoruz. 2. komutta biraz uzun sürebiliyor. bende 160 gb hdd var ve 2-3 ay önce cacheyi silmiştim doluluk oranı hala yüzde 37 de cacheye ayırdığım alan 150gb ayrıca bu işlemi yaparken kafede içerisi doluydu kimi facede kimi online oyun oynuyor en ufak bir kopma olmadı hepinize iyi çalışmalar

                                  /usr/local/etc/rc.d/squid.sh stop
                                  rm -rf /var/squid/cache/
                                  mkdir -p /var/squid/cache/
                                  chown proxy:proxy /var/squid/cache/
                                  chmod 777 /var/squid/cache/
                                  squid -z
                                  /usr/local/etc/rc.d/squid.sh start
                                  
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • yakar
                                    yakar last edited by

                                    Dizin yoksa oluştur demek için..

                                    if [ ! -d /var/squid/cache ]; then
                                            mkdir -p /var/squid/cache/
                                    fi

                                    1 Reply Last reply Reply Quote 0
                                    • I
                                      ipsec16 last edited by

                                      @dreamervlk:

                                      Arkadaşlar Merhaba,

                                      Uzun süredir pfsense de cache den kaynaklanan kilitlenmeler için bir script üzerinde denemeler yapıyordum.
                                      Daha önceki script te crontab a eklenince squid start olmuyordu. O sorunda giderildi.
                                      Umarım işinize yarar.

                                      Öncelikle /sbin/ altına cleansquid.sh adında bir
                                      script oluşturuyoruz.

                                      #cleansquid.sh
                                      #Created By Volkan Vural
                                      #This script using for Squid Cache Folder Cleaning
                                      #e-mail=aytvolkan@hotmail.com
                                      #Publish Date = 25.09.2012
                                      /usr/local/etc/rc.d/squid.sh stop
                                      rm -rf /var/squid/cache/
                                      mkdir -p /var/squid/cache/
                                      cd /var/squid/
                                      chown proxy:proxy cache
                                      chmod 755 /var/squid/cache/
                                      squid -z
                                      /usr/local/etc/rc.d/squid.sh start

                                      Kayıt ettikten sonra izinleri vermek için aşağıdaki
                                      komutu çalıştırıyoruz.

                                      chmod 777  /sbin/cleansquid.sh

                                      scripti çalıştırıyoruz ve cache temizliği yapılıyor.
                                      ./cleansquid.sh

                                      İstenirse crontab'a script günlük haftalık veya aylık olarak atılabilir.

                                      Örnek : Her ayın 1. günü 23:30 da sistemde bu script çalıştırılacaktır.
                                      crontab -e
                                      30 23 1 * * /bin/sh /sbin/cleansquid.sh

                                      http://www.volkanvural.name.tr/2011/05/pfsense-uzerinde-squid-cache-temizlemek.html

                                      Kolay Gelsin
                                      Volkan Vural

                                      Merhabalar volkan bey bahsettiğiniz işlemleri yaptım ancak scripti çalıştırmak istediğimde cd /sbin ile sbin klasörünün içine giriyorum ve sh cleansquid.sh yazıyorum enter dediğimde aşağıdaki çıktıyı veriyor nerede hata yapıyorum acaba
                                      [2.1-RELEASE][root@pfsense.localdomain]/sbin(4): sh ./cleansquid.sh
                                      cd: can't cd to /var/squid/
                                      : No such file or directory
                                      squid: illegal option –
                                      Usage: squid [-hvzCDFINRYX] [-d level] [-s | -l facility] [-f config-file] [-u p                                                                                        ort] [-k signal]
                                            -d level  Write debugging to stderr also.
                                            -f file  Use given config-file instead of
                                                      /usr/pbi/squid-i386/etc/squid/squid.conf
                                            -h        Print help message.
                                            -k reconfigure|rotate|shutdown|interrupt|kill|debug|check|parse
                                                      Parse configuration file, then send signal to
                                                      running copy (except -k parse) and exit.
                                            -s | -l facility
                                                      Enable logging to syslog.
                                            -u port  Specify ICP port number (default: 3130), disable with 0.
                                            -v        Print version.
                                            -z        Create swap directories
                                            -C        Do not catch fatal signals.
                                            -D        Disable initial DNS tests.
                                            -F        Don't serve any requests until store is rebuilt.
                                            -I        Override HTTP port with the bound socket passed in on stdin.
                                            -N        No daemon mode.
                                            -R        Do not set REUSEADDR on port.
                                            -S        Double-check swap during rebuild.
                                            -X        Force full debugging.
                                            -Y        Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        profescobar last edited by

                                        Çok teşekkür ederim.
                                        Ellerinize sağlık.

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post

                                        Products

                                        • Platform Overview
                                        • TNSR
                                        • pfSense Plus
                                        • Appliances

                                        Services

                                        • Training
                                        • Professional Services

                                        Support

                                        • Subscription Plans
                                        • Contact Support
                                        • Product Lifecycle
                                        • Documentation

                                        News

                                        • Media Coverage
                                        • Press
                                        • Events

                                        Resources

                                        • Blog
                                        • FAQ
                                        • Find a Partner
                                        • Resource Library
                                        • Security Information

                                        Company

                                        • About Us
                                        • Careers
                                        • Partners
                                        • Contact Us
                                        • Legal
                                        Our Mission

                                        We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                                        Subscribe to our Newsletter

                                        Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                                        © 2021 Rubicon Communications, LLC | Privacy Policy