Installation von Squid auf suse 5.3 von Herbert Hennel

Vorgehensweise:
Quellen aus dem Internet besorgen SQUID1.2PATCH2 und entpacken!

Befehle (im Quellenverzeichnis):

./configure --prefix=/var/squid
./make
./make install
 

Squid stoppen: /sbin/init.d/squid/stop

Falls vorher eine Squidversion installiert war, müssen die vorhandenen Caches gelöscht werden

rm –r /var/squid/cache/*

Die Datei /var/squid/bin/squid nach /usr/sbin/squid kopieren!

Rechte in /var/squid auf 777 setzen [chmod –R 777 /var/squid].

Cache neu aufbauen

squid -z

Squid wieder starten /sbin/init.d/squid start
 

 Userzugriff reglementieren:

Programm für Zugriffskontrolle kompilieren (hier NSCA_AUTH):

Quellenverzeichnis/auth_modules/NCSA

Make

Erzeut wird ncsa_auth. Diese Datei nach /usr/sbin/ncsa_auth kopieren

Die Datei /var/squid/etc/squid.conf anpassen!

#  TAG: authenticate_program
#       Specify the command for the external authenticator.  Such a
#       program reads a line containing "username password" and replies
#       "OK" or "ERR" in an endless loop.  If you use an authenticator,
#       make sure you have 1 acl of type proxy_auth.  By default, the
#       authenticator_program is not used.
#
#       If you want to use the traditional proxy authentication,
#       jump over to the ../auth_modules/NCSA directory and
#       type:
#               % make
#               % make install
#
#       Then, set this line to something like
#
#       authenticate_program /var/squid/bin/ncsa_auth /var/squid/etc/passwd
#
#authenticate_program none
authenticate_programm  /usr/sbin/ncsa_auth /var/squid/passwd

Die Datei /var/squid/etc/passwd ist mit htpasswd zu erzeugen:
fax:/var/squid/etc # htpasswd -c passwd herbert
Adding password for herbert.
New password:
Re-type new password:
fax:/var/squid/etc #

Die weiteren User werden folgendermassen angelegt:

fax:/var/squid/etc # htpasswd passwd guenter
Adding user guenter
New password:
Re-type new password:
 

Weitere Einstellungen in der squid.conf

# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
http_access allow password
http_access deny all
 

Wenn der Squid nun neu gestartet wird, erfolgt eine Überprüfung der Benutzer über eine Passwortabfrage gemäss den Einträgen in /var/squid/passwd.

 Auswertungstool sqmgrlog installieren

Quellen aus dem Internet besorgen und entpacken.

 ./configure

   configure options:   --enable-prefix=where the instalation dir is
default: /usr/local/bin

                        --enable-squid_dir=where the Squid root dir is
                                 default: /usr/local/squid
    hier /var/squid
 
make

make install

Die Datei /usr/local/bin/sqmgrlog.conf  anpassen.

#access_log /usr/local/squid/logs/access.log
access_log /var/squid/logs/access.log
#title "Squid User's Access Report"
titel "Auswertung der Proxybenutzung"
#output_dir /usr/local/etc/httpd/htdocs/squid-reports
output_dir /usr/local/httpd/htdocs/squid-reports
# TAG:  date_format
#Date format in reports: e (Europe=dd/mm/yy), u (USA=mm/dd/yy)
#date_format u
date_format e

Jetz noch in crontab die Auswertung zu den gewünschten Zeiten auslösen!