ちょっと脱線。squid をインストールするのでメモりながらやる。


# cd /usr/ports/www/squid31
# make config-recursive
# make install clean


===> post-installation information for squid-3.1.16:

     o You can find the configuration files for this package in the
       directory /usr/local/etc/squid.

     o The default cache directory is /var/squid/.
       The default log directory is /var/log/squid/.

       You must initialize new cache directories before you can start
       squid.  Do this by running “squid -z” as ‘root’ or ‘squid’.
       If your cache directories are already initialized (e.g. after an
       upgrade of squid) you do not need to initialize them again.

     o The default configuration will deny everyone but the local host and
       local networks as defined in RFC 1918 for IPv4 and RFCs 4193 and
       4291 for IPv6 access to the proxy service.  Edit the “http_access
       allow/deny” directives in /usr/local/etc/squid/squid.conf
       to suit your needs.

     To enable Squid, set squid_enable=yes in either
     /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid
     Please see /usr/local/etc/rc.d/squid for further details.

     If you just updated your Squid installation from an earlier version,
     make sure to check your Squid configuration against the 3.1 default
     configuration file /usr/local/etc/squid/squid.conf.default.
     /usr/local/etc/squid/squid.conf.documented is a fully annotated
     configuration file you can consult for further reference.

     Additionally, you should check your configuration by calling
     ‘squid -f /path/to/squid.conf -k parse’ before starting Squid.

===>   Compressing manual pages for squid-3.1.16
===>   Registering installation for squid-3.1.16
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.

      This port has installed the following startup scripts which may cause
      these network services to be started at boot time.

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type ‘make deinstall’
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:


ローカル以外からのアクセすは DENY になっているとのこと。

設定ファイルは /usr/local/etc/squid/squid.conf  なので必要に応じて変更。

cache_dir ufs /var/squid/cache 1000 16 256


# squid -z

これで、/var/squid/cache が作られた。


http_port 3128

このまま、/etc/rc.conf に追記する。



で、squid を起動してみる。

/usr/local/etc/rc.d/squid start




Leave a Comment