Securing-Optimizing-RH-Linux-1_2_343
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca
© Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ®
343
Configure and Optimize
Step 1
Squid Proxy Server cant run as super-user root, for this reason we must create a special user
with no shell for running Squid Proxy Server.
[root@deep /]# useradd -d /cache/ -r -s /dev/null squid >/dev/null 2>&1
[root@deep /]# mkdir /cache/
[root@deep /]# chown -R squid.squid /cache/
First of all, we add the user squid to the /etc/passwd file, then we create the /cache directory
if this directory doesnt exist and only if it doesnt exist. Finally we change the owner of the
directory cache to be the user squid.
NOTE: Usually we dont need to make the command (mkdir /cache/) because we have already
created this directory when we have partitioning our hard drive during the installation of Linux. If
this partition doesnt exist then you must execute this command to create the directory.
Step 2
Move into the new Squid directory and type the following commands on your terminal:
Edit the Makefile.in file (vi +18 icons/Makefile.in) and change the line:
DEFAULT_ICON_DIR = $(sysconfdir)/icons
To read:
DEFAULT_ICON_DIR = $(libexecdir)/icons
We change the variable (sysconfdir) to be (libexecdir). With this modification, the icons directory
of Squid will be located under the /usr/lib/squid directory.
Edit the Makefile.in file (vi +34 src/Makefile.in) and change the lines:
DEFAULT_CACHE_LOG = $(localstatedir)/logs/cache.log
To read:
DEFAULT_CACHE_LOG = $(localstatedir)/log/squid/cache.log
DEFAULT_ACCESS_LOG = $(localstatedir)/logs/access.log
To read:
DEFAULT_ACCESS_LOG = $(localstatedir)/log/squid/access.log
DEFAULT_STORE_LOG = $(localstatedir)/logs/store.log
To read:
DEFAULT_STORE_LOG = $(localstatedir)/log/squid/store.log
DEFAULT_PID_FILE = $(localstatedir)/logs/squid.pid
To read:
DEFAULT_PID_FILE = $(localstatedir)/run/squid.pid
DEFAULT_SWAP_DIR = $(localstatedir)/cache
To read:
DEFAULT_SWAP_DIR = /cache
DEFAULT_ICON_DIR = $(sysconfdir)/icons
To read:
DEFAULT_ICON_DIR = $(libexecdir)/icons