Install and configure squid and SAMS & ubuntu debian

And so, today I will tell you how to configure http proxy server with a single administration SAMS.
A proxy server is required when you want to restrict access to Internet resources, cut traffic to users (quota) as well as it helps protect clients from network attacks.
Sams in particular Web form for Administration.
For the installation we will need the following packages Sams:
apache2
PHP5
MySQL-server
#aptitude install squid
#aptitude install libpcre3
phpMyAdmin
Additionally, you may need the packages:
squidguardto use redirector squidguard
PHP5-ldap to authenticate users to Active Directory | Lightweight Directory Access Protocol (LDAP) If you want to
PHPfpdf to generate pdf reports
Their installation has again through console commands:
#aptitude install squidguard
#aptitude install php5-ldap
#aptitude install phpfpdf
Next, you need to actually download the Sams.
We’ll be rocking the .deb packages, although of course you can put and from source.
#wget-c “http://nixdev.net/release/sams/debian/lenny/sams_1.0.5_i386.deb
This package is for 32 bit systems
#wget-c “http://nixdev.net/release/sams/debian/lenny/sams_1.0.5_amd64.deb
This package under 64 bit.
Also download the docks and actually based form.
wget-c “http://nixdev.net/release/sams/debian/lenny/sams-web_1.0.5_all.deb
wget-c “http://nixdev.net/release/sams/debian/lenny/sams-doc_1.0.5_all.deb
Next, you need to actually unpack the packages.
First unpack the Sams and retouch it to daemon was started.
#dpkg-i sams_1.0.5_i386.deb
or
#dpkg-i sams_1.0.5_amd64.debif you want to
Next, you will need to adjust/etc/init.d/sams and/etc/sams.conf
In/etc/init.d/sams, change the SAMS_ENABLE value from FALSE to TRUE.
In/etc/sams.conf, you must correct the MYSQLUSER and MYSQLPASSWORD to yours.
Next, you create the mysql DATABASE under the Sams.
#cd/usr/share/sams/mysql
# mysql-u root-p < sams_db.sql
#mysqlu root-p < squid_db.sql
Next, you will configure your Apache2.
To do this, go to/etc/php5/apache2/php.ini
Vlûčaem safe mod
safe_mode = On
safe_mode_exec_dir = /usr/share/sams/bin
All.
Next, we are going to be fumbling with a snout Samsa.
Do
#dpkg-i sams-web_1.0.5_all.deb
#dpkg-i sams-doc_1.0.5_all.deb
In principle, then do not create a link to a directory in the directory with/var/www/Sams
And you will need to create it manually.
#ln-s/usr/share/sams/var/www/sams
Next, you must modify the source Web forms the static GetHostName function. (I chose to simply zakoentit′ the premennuû)
The thing is that when you update the php engine was used with the function so that the static GetHostName must be replaced with any other for example GetName.
Files that need to be replaced:
/usr/share/sams/src/configtray.php
/usr/share/sams/src/webconfigtray.php
After replacing the Web Settings form Sams will be available at the address http://192.168.0.224/sams
If you saw the type of Access that you want to specify the right forbiden to Sams.
#chown www-data: www-data/usr/share/sams
Next you need to choose a proper way to authorize user on the proxy server.
Consider ip and ncsa.
IP
When I authorize my users by ip addressyou simply create them via based form sams pointing in userdata like ip address 192.168.0.100 and a mask of 255.255.255.255.
Then click Reconfigure Sams and presto-user passes.
NCSA
In this case, Ezer has a dialog box asking to enter the login password.
In order to get this window you must first correct the squid/config manually
#nano/etc/squid.conf
and add there
auth_param basic program/usr/lib/squid/ncsa_auth/etc/squid/ncsa.sams
auth_param basic children 5
auth_param basic realm Squid proxy caching web server
auth_param basic credentialsttl 2 hours
then restart the squid and Sams.
#/etc/init.d/squid restart
#/etc/init.d/sams restart
The further you again create users. Web form rusificirovanna so there is no problems with it.
That’s probably all the friends, will ask the questions that I can answer.