This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
установка_настройка_и_запуск_пакета_squid [2020/08/22 15:08] val |
установка_настройка_и_запуск_пакета_squid [2024/11/21 14:18] (current) val [Использование для кеширования] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Установка, настройка и запуск пакета SQUID ====== | ====== Установка, настройка и запуск пакета SQUID ====== | ||
- | [[http://ru.wikipedia.org/wiki/Squid]] | + | * [[https://www.oreilly.com/library/view/squid-the-definitive/0596001622/re91.html|shutdown_lifetime]] |
===== Установка ===== | ===== Установка ===== | ||
Line 12: | Line 12: | ||
root@gate:~# apt install squid | root@gate:~# apt install squid | ||
</code> | </code> | ||
- | |||
- | ==== FreeBSD ==== | ||
- | <code> | ||
- | [gate:~] # pkg install squid | ||
- | |||
- | [gate:~] # rehash | ||
- | |||
- | [gate:~] # cd /usr/local/etc/squid/ | ||
- | </code> | ||
- | |||
- | |||
- | |||
===== Настройка ===== | ===== Настройка ===== | ||
Line 29: | Line 17: | ||
==== Debian/Ubuntu ==== | ==== Debian/Ubuntu ==== | ||
<code> | <code> | ||
- | gate# /etc/squid/squid.conf | + | gate# cat /etc/squid/conf.d/my.conf |
+ | |||
+ | ИЛИ | ||
+ | |||
+ | gate# cat /etc/squid/squid.conf | ||
</code><code> | </code><code> | ||
... | ... | ||
Line 44: | Line 36: | ||
==== Debian/Ubuntu ==== | ==== Debian/Ubuntu ==== | ||
<code> | <code> | ||
- | root@gate:~# squid3 -k parse | + | gate:~# squid -k check |
- | root@gate:~# service squid restart | + | gate:~# squid -k reconfigure |
- | root@gate:~# tail -f /var/log/squid/access.log | + | gate:~# tail -f /var/log/squid/access.log |
</code> | </code> | ||
- | ==== FreeBSD ==== | + | ===== Использование для кеширования ===== |
+ | |||
+ | * !!! Не работает с https | ||
<code> | <code> | ||
- | [gate:~] # cat /etc/rc.conf | ||
- | </code><code> | ||
... | ... | ||
- | squid_enable=yes | + | maximum_object_size 1 GB |
+ | |||
+ | cache_dir ufs /var/spool/squid 5000 16 256 | ||
... | ... | ||
</code><code> | </code><code> | ||
- | [gate:~] # squid -k parse | + | # squid -z |
+ | </code> | ||
- | [gate:~] # service squid start | + | ===== Использование другого прокси ===== |
+ | <code> | ||
+ | ... | ||
+ | cache_peer proxy.isp.un parent 3128 0 default | ||
- | freebsd8# tail -f /var/squid/logs/access.log | + | never_direct allow all |
- | + | ... | |
- | freebsd10# tail -f /var/log/squid/access.log | + | |
</code> | </code> | ||
- | |||
- | |||
- | |||