$ tar xvfz squid-2.2.STABLE5-src.tar.gz $ cd squid-2.2.STABLE5 $ ./configure --prefix=/usr/local/squid $ make all (snip) Making all in icons... make[1]: Entering directory `/usr/local/src/squid-2.2.STABLE5/icons' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/local/src/squid-2.2.STABLE5/icons' Making all in errors... make[1]: Entering directory `/usr/local/src/squid-2.2.STABLE5/errors' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/local/src/squid-2.2.STABLE5/errors' |
$ su # make install |
#acl QUERY urlpath_regex cgi-bin ¥? <--- 行頭の # を削除 #no_cache deny QUERY <--- 行頭の # を削除 |
# for Squid logfile rotation. 0 0 1 * * /usr/local/squid/bin/squid -k rotate |
# /usr/local/squid/bin/squid -z 2000/03/28 20:26:29| Creating Swap Directories FATAL: Failed to make swap directory /usr/local/squid/cache: (13) Permission denied Squid Cache (Version 2.2.STABLE5): Terminated abnormally. CPU Usage: 0.020 seconds Maximum Resident Size: 0 KB Page faults with physical i/o: 252 |
# mkdir /usr/local/squid/cache # chown nobody:nogroup /usr/local/squid/cache # chown nobody:nogroup /usr/local/squid/logs # /usr/local/squid/bin/squid -z 2000/03/28 20:29:52| Creating Swap Directories |
# /usr/local/squid/bin/RunCache & [1] 7276 Running: squid -sY >> /usr/local/squid/squid.out 2>&1 |
$ sU # groupadd -g 40 squid # useradd -u 40 -d /usr/local/squid -g squid -m squid # exiT $ tar xvfz squid-2.4.STABLE2-src.tar.gz $ cd squid-2.4.STABLE2 $ ./configure --enable-err-language=Japanese --enable-useragent-log --enable-referer-log $ make all $ su # make install |
# /usr/local/squid/bin/squid -z 2001/09/11 20:24:55| ALERT: setgid: (22) Invalid argument 2001/09/11 20:24:55| Creating Swap Directories FATAL: Failed to make swap directory /usr/local/squid/cache: (13) Permission denied Squid Cache (Version 2.4.STABLE2): Terminated abnormally. CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys Maximum Resident Size: 0 KB Page faults with physical i/o: 5 |
# mkdir /usr/local/squid/cache # chown squid:squid /usr/local/squid/cache # chown squid:squid /usr/local/squid/logs # /usr/local/squid/bin/squid -z |
# for Squid logfile rotation. 0 0 1 * * /usr/local/squid/bin/squid -k rotate |
#Default: # cache_effective_user nobody # cache_effective_group nogroup cache_effective_user squid <--- 追加 cache_effective_group squid <--- 追加 |
#!/bin/sh case "$1" in start) # Start daemons. echo -n "Starting squid cache server: " /usr/local/squid/bin/RunCache & echo "" touch /var/lock/squid ;; stop) echo -n "Shutting down squid cache server: " kill -TERM `cat /usr/local/squid/logs/squid.pid` echo "" rm -f /var/lock/squid ;; *) echo "Usage: squid.init {start|stop}" exit 1 esac exit 0 |
if [ -x /etc/rc.d/rc.squid ]; then /etc/rc.d/rc.squid start fi |