FreeBSD Squid Proxy Caching Server Increase File Descriptors Limits February 6th, 2010
‘m getting an error which read as follows under FreeBSD 7.2 server and Squid stable caching server:
WARNING! Your cache is running out of filedescriptors
How do I fix this problem and increase the number of system-wide available filedescriptors for FreeBSD server?
For busy proxy caching server, you need to to increase the number of system-wide available filedescriptors, by editing /etc/sysctl.conf file. There is no need to make changes to squid.conf.
Find Current Squid File Descriptors Limits Under FreeBSD
Type the following command:
# squidclient mgr:info | grep 'file descri'
OR
# squidclient -p 8080 -u USERNAME -w 'secretePassword' mgr:info | grep 'file descri'
Increase Squid File Descriptors Limits
Type the following command at a shell prompt:
# sysctl kern.maxfilesperproc=8192
# sysctl kern.maxfiles=65535
To keep settings after reboot add them to /etc/sysctl.conf
echo 'kern.maxfilesperproc=8192' >> /etc/sysctl.conf
echo 'kern.maxfiles=65535' /etc/sysctl.conf
Where,
- kern.maxfilesperproc – Set maximum number of open files to 65535
- kern.maxfiles – Set maximum files allowed open per process to 8192
Optionally you may also want to increase port ranges:
# sysctl net.inet.ip.portrange.last=65535
# sysctl net.inet.ip.portrange.first=1024
Finally restart the squid and verify you got new FD settings for squid proxy server:
# squidclient mgr:info | grep 'file descri'
source here
Posted in Networking, feebsd | No Comments »
How to install and setup squid on freebsd February 6th, 2010
Web Server IP Address –> 192.168.0.1
Public IP address (The Address that Squid will listen on to handle web requests) –> 10.10.10.10
web Server FQDN name —> http://linax.wordpress.com
# cd /usr/local/src/
# wget http://www.squid-cache.org/Versions/v2/2.7/squid-2.7.STABLE6.tar.bz2
# tar -jxf squid-2.7.STABLE6.tar.bz2
# cd squid-2.7.STABLE6/
# ./configure --prefix=/opt/squid2.7 --disable-internal-dns \
--enable-forward-log --enable-follow-x-forwarded-for --enable-snmp \
--enable-linux-netfilter --enable-http-violations --enable-delay-pools \
--enable-storeio=diskd,aufs,ufs,coss --with-coss-membuf-size=8388608 --with-large-files \
--enable-large-cache-files --with-maxfd=8192 --enable-async-io=64 \
--enable-removal-policies=lru,heap --enable-useragent-log --enable-referer-log \
--enable-err-languages=English --enable-default-err-language=English
# make && make install
# cd /opt/squid2.7/etc/
# cp squid.conf{,-bak}
here is my squid.conf : Read the rest of this entry »
Posted in Networking, feebsd | 1 Comment »
How to enable SSHD in FreeBSD February 6th, 2010
Actually you will be asked whether to enable SSH, during a Standard Installation of FreeBSD.
Now, if you need to enable SSH after an installation, open the file rc.conf and add the line ` sshd_enable=”YES” `.
open the file # vi /etc/rc.conf
Now add the below line to the file. sshd_enable="YES"
Now start sshd.
# /etc/rc.d/sshd start source here for permitting root login edit /etc/ssh/sshd_config unhash PermitRootLogin no and make it
PermitRootLogin yes if password problem then add PasswordAuthentication YES
Posted in Networking, feebsd | No Comments »

