For the latest stable version is the stable version 2.6 which can be downloaded at the squid-cache.org. In this latest version there are some changes in both its core and config. To more clearly changelog can be opened in www.squid-cache.org. In this case I am still using version 2.5.14 stable version 2.5 is the final output.
wget http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE14.tar.gz
The squid extract
# tar-zxvf squid-2.5.STABLE14.tar.gz-C / usr / local / src (any would be placed in which the squid extract).
Log into the squid extract directory
# cd / usr/local/src/squid-2.5.STABLE14
Create group and user that will be used to run the squid
# groupadd squid_
# useradd-c “Squid PROXY CACHE”-d / dev / null-s / bin / false-g squid_ squid_
Configure and install squid
#. / configure-prefix = / squid-enable-gnuregex-with-pthreads \
-Enable-storeio = diskd-enable-removal-policies = heap \
-Enable-delay-pools-enable-snmp-disable-WCCP \
-Enable-default-err-language = Home-disable-ident-lookups \
-Disable-hostname-checks-enable-kill-parent-hack-disable-internal-dns \
-With-large-files-enable-large-cache-files-enable-auth = basic \
-Enable-basic-auth-helpers = NCSA
# make & & make install
Description:
-Enable-auth = basic \
-Enable-basic-auth-helpers = NCSA
Used if you want to use Squid proxy with user authentication.
Sign # before the command is the root meaning of the bash not comment.
After installation is complete and there are no mistakes, the next step is to set the Squid configuration, open the file / etc / squid.conf with your favorite text editor (vi, pico, etc.), this file is the squid configuration file. # ln-s / squid / etc / squid.conf / etc / squid.conf
# pico-w / etc / squid.conf (Please edit with your favorite editor)
Find the line that contains the following commands: # http_port 3128 (or liked you) This command will create a HTTP proxy to use port 3128 which is the default port for squid. Activate by removing the sign #. You can create an HTTP proxy port value is to your taste, but do not point to port 80, especially if you also run a Web server, because the Web server also uses that port. The next step, find the following command line: # cache_mem 64 MB Command is used to limit the amount of computer memory that will be used squid to store temporary objects in the cache. These limits are not strict, a time if Squid requires more memory, he can double the memory used. Enable this line and change the cache size is to be as much as you want, you should consider is the amount of memory your computer has. Next, find the line that contains the following commands: # Logfile CACHE PATHNAMES & Directories
# ————- The following settings are used to define the storage allocation of our web cache. The first setting is: # cache_dir / cache 10001 16 256 Value above which there is a default value of squid, if you want to change it then activate this command. The first parameter / cache is the name of the directory where we will store the cache files. You can change this parameter to any directory, but that must be considered squid will not create a new directory, so if this parameter will be changed, make sure the destination directory already exists, and squid have permissions to write to that directory. The next parameter, the value 10,001 is the number of hard disk space (with unit Mega Byte) that will be used squid to store the cache files it. Change to suit your needs. The next parameter, called the Level-1, is the number of directories that will be made by the squid in its cache directory. We recommend that authors suggest to not change these parameters. Last parameter, which is called the Level-2, is the number of second-level directory, which is created in the directory in each directory of the first level above. The next step, find the following commands: # ACCESS CONTROLS
# ——- The following command line used to define a list of access rights in your network, call Squid with Access Control Lists (ACL). You can define some ACL here. Access controls in this section, find the following command line: # Default configuration:
http_access allow manager localhost
http_access deny manager
http_access deny! Safe_ports
http_access deny CONNECT! SSL_ports
#
# INSERT YOUR OWN RULE (S) TO HERE FROM YOUR ACCESS Allow
# CLIENTS
#
http_access deny all All you have to do here is to define our own ACL, we enable non-final orders and add the following command line: http_access allow all So it will be like this: #
# INSERT YOUR OWN RULE (S) TO HERE FROM YOUR ACCESS Allow
# CLIENTS
#
# Http_access deny all
http_access allow all squid here until you’ve completed the settings, the next step is to ensure that direkktori which will be used is set ownership correctly. For example the file directory / var / logs or other. Before squid can walk, you must create the swap directories. Do it by running the command: # / squid / sbin / squid-z This command only needs to run only once when the first squid will run on your computer. Check squid configuration used is correct or not
# / squid / sbin / squid-k parse Kalo there are mistakes or errors in the editing please return configurations. To run the squid use the command:
# / squid / sbin / squid-SYD To make squid own way every time you boot then add the above command in / etc / rc.d / rc.local Up here you have to install, set and activate the squid, the last thing to do is to direct the client computer’s browser to our server proxy port in accordance with which we use in the setting above. Easy is not it? for squid example see on squid on freebsd |
No Response to "Install squid (diskd caching)"
Posting Komentar