WOW !!!

Trims banget.
a.r


----- Original Message -----
From: "Budi Aditya" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 24, 2002 6:13 PM
Subject: Re: Routing && sorry telat replynya


>   ok, sorry ya untuk mas akira, saya terlambat replynya
>   berhubung email anda terselip diantara ratusan email2 milis2:P
>
>   btw lain kali untuk lebih cepat, mohon di subjectnya ditambahkan
>   TANYA ya.. soalnya saya sort email2 dengan subject tsb kedalam
>   inbox tersendiri.
>
>
> > Tolong minta konfig yg optimal untuk server proxy saya dengan spek sbb :
> >
> > PC Intel Pentium III, 256MB RAM, 40GB HD, RedHat 7.3, Kernel 2.4.18-3.
> >
> > Mengenani partisi, saya belum punya gambaran bagaimana mengaturnya agar
> > optimal ....
>
>   ok..
>   saya asumsi hdd ide kan mas akira ?..
>
>   kita buat partisi seperti begini saja..
>   kalau untuk proxy ini dibutuhkan memory yang cukup besar,
>   dan sebaiknya ada hdd sendiri untuk system & log dan
>   hdd tersendiri untuk cache.
>
>   Misalkan tidak ada.. kita buat seperti ini..
>
>   /boot -> 256 MB --> /dev/hda1
>   /swap --> 512 MB --> /dev/hda2 (ukurannya antara 2-3 kali RAM)
>   /cache --> 10000 MB --> /dev/hda3
>   sisanya buat jadi extended --> /dev/hda4
>
>
>   logical partition.. (/dev/hda5 and seterusnya)
>   /  ---> 8192 MB --> /dev/hda5
>   /var --> 4096 MB --> /dev/hda6
>   /home --> sisanya --> /dev/hda7
>
>   format partisi /cache itu dengan reiserfs.
>
>   /sbin/mkreiserfs -h r5 /dev/hda3
>   edit fstab bagian /cache ubah jadi seperti line dibawah ini :
>   /dev/hda3  /cache      reiserfs notail,noatime 1 2
>
>   untuk config squid :
>   edit terlebih dahulu file :
>   /usr/include/bits/types.h
>   ganti :
> /* Number of descriptors that can fit in an `fd_set'.  */
> #define __FD_SETSIZE    1024
>                         ^^^^
> menjadi :
> /* Number of descriptors that can fit in an `fd_set'.  */
> #define __FD_SETSIZE    8192
>                         ^^^^
> download dlmalloc di
> ftp://g.oswego.edu/pub/misc/malloc.c
>
> download squid di http://
> http://www.squid-cache.org/Versions/v2/2.4/squid-2.4.STABLE7-src.tar.gz
>
> extract squid :
> tar -xvzf squid-2.4.STABLE7-src.tar.gz
>
> copy malloc.c ke squid_extract_dir/lib/dlmalloc.c :
> cp malloc.c squid-2.4.STABLE7/lib/dlmalloc.c
>
> enable large fdset.
> ulimit -HSn 8192
>
> masuk ke direktori squid :
> cd squid-2.4.STABLE7
>
> export CFLAGS environment variable :
> export CFLAGS="-O6 -s -DNUMTHREADS=24"
>
> configure squid seperti ini :
> ./configure --enable-dlmalloc --with-pthreads \
>  --enable-async-io=24 --enable-poll \
>  --enable-arp-acl --enable-snmp \
>  --enable-removal-policies --prefix=/usr \
>  --exec_prefix=/usr --bindir=/usr/sbin \
>  --libexecdir=/usr/lib/squid \
>  --localstatedir=/var --sysconfdir=/etc/squid \
>  --enable-kill-parent-hack \
>
> make && make install
>
> edit file /etc/squid/squid.conf
>
> #/* begin editing */
>
>   cache_mem 24 MB
>
>   cache_swap_low 80
>   cache_swap_high 100
>   maximum_object_size 4096 KB
>   minimum_object_size 0 KB
>   maximum_object_size_in_memory 8 KB
>
>   cache_replacement_policy heap GDSF
>   memory_replacement_policy heap GDSF
>
>   /* why i choose GDSF */
>   #       The heap GDSF policy optimizes object hit rate by keeping
smaller
>   #       popular objects in cache so it has a better chance of getting a
>   #       hit.  It achieves a lower byte hit rate than LFUDA though since
>   #       it evicts larger (possibly popular) objects.
>   /* speeding user feeling about my system */
>
>   half_closed_clients off
>   memory_pools_limit 32 MB
>
>   cache_dir aufs /cache  10000 22 256
>                          ^^^^^ ^^
>                          value1 value2
>
>   value2=(((value1*1000)/256/256/13)*2)
>
>   cache_store_log none    # disable store log
>
>   client_persistent_connections on  /* more than one request/connection */
>   server_persistent_connections on  /* same as above but for squid comms
*/
>
>   pipeline_prefetch on
>
> #/* end of editing */
>
>
> buat optimisasi hdd ide anda (asumsi anda menggunakan hdd ide)
> di /etc/rc.d/init.d/optimize
>
> # -------------------- cut di sini -------------------------------------
> #! /bin/sh
> #
> # inet          Start Harddisk Optimization.
> #
> # Author:       Budi Aditya <[EMAIL PROTECTED]>
> #
> # chkconfig: 345 80 80
> # description: This scripts starting harddisk optimization (IDE)
> #
>
>
> # Source function library.
> . /etc/rc.d/init.d/functions
>
> RETVAL=0
>
> # See how we were called.
> case "$1" in
>   start)
>         echo -n "Starting optimize IDE-DRIVE: "
>      daemon /sbin/hdparm -q -c1 -q -d1 -q -m16 -q -A1 -q -a8 -q -X69
/dev/hda
>       RETVAL=$?
>         echo
>         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/optimize
>
>         ;;
>   stop)
>         echo -n "Stopping IDE Drive Optimization: "
>         daemon /sbin/hdparm -q -c0 -q -d0 -q -A0 -q -X66 /dev/hda
>         RETVAL=$?
>
>         echo
>         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/optimize
>         ;;
>   status)
>         status optimize
>         RETVAL=$?
>         ;;
>
>   restart)
>         $0 stop
>         $0 start
>         RETVAL=$?
>         ;;
>   *)
>         echo "Usage: optimize {start|stop|status|restart}"
>         exit 1
> esac
>
> exit $REVAL
> # --------------------- cut di sini ----------------------------------
>
> nyalakan script ini..
> dengan :
> cd /etc/rc.d/init.d
> /sbin/chkconfig --add optimize.
>
>
> edit sedikit file startup squid anda :
> di /etc/rc.d/init.d/squid
>
> # ----------------------- cut di sini --------------------------------
> #!/bin/bash
> # squid         This shell script takes care of starting and stopping
> #               Squid Internet Object Cache
> # Author :      Budi Aditya <[EMAIL PROTECTED]>
> # chkconfig: 345 90 25
> # description: Squid - Internet Object Cache. Internet object caching is \
> #       a way to store requested Internet objects (i.e., data available \
> #       via the HTTP, FTP, and gopher protocols) on a system closer to the
\
> #       requesting site than to the source. Web browsers can then use the
\
> #       local Squid cache as a proxy HTTP server, reducing access time as
\
> #       well as bandwidth consumption.
> # pidfile: /var/run/squid.pid
> # config: /etc/squid/squid.conf
>
> PATH=/usr/bin:/sbin:/bin:/usr/sbin
> export PATH
>
> #enlarge limit fd untuk process ini..
> ulimit -HSn 8192
> # Source function library.
> . /etc/rc.d/init.d/functions
>
> # Source networking configuration.
> . /etc/sysconfig/network
>
> # Check that networking is up.
> [ ${NETWORKING} = "no" ] && exit 0
>
> # check if the squid conf file is present
> [ -f /etc/squid/squid.conf ] || exit 0
>
> # determine the name of the squid binary
> [ -f /usr/sbin/squid ] && SQUID=squid
> [ -z "$SQUID" ] && exit 0
>
> # determine which one is the cache_swap directory
> CACHE_SWAP=`sed -e 's/#.*//g' /etc/squid/squid.conf | \
>         grep cache_dir | sed -e 's/cache_dir//' | \
>         cut -d ' ' -f 2`
> [ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/spool/squid
>
> # default squid options
> # -D disables initial dns checks. If you most likely will not to have an
> #    internet connection when you start squid, uncomment this
> SQUID_OPTS="-DV"
>
> RETVAL=0
> case "$1" in
> start)
>     echo -n "Starting $SQUID: "
>     $SQUID $SQUID_OPTS &
>     RETVAL=$?
>     echo $SQUID
>     [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$SQUID
>     ;;
>
> stop)
>     echo -n "Stopping $SQUID: "
>     $SQUID -k shutdown &
>     RETVAL=$?
>     if [ $RETVAL -eq 0 ] ; then
>         rm -f /var/lock/subsys/$SQUID
>         while : ; do
>                 [ -f /var/run/squid.pid ] || break
>                 sleep 2 && echo -n "."
>         done
>         echo "done"
>     else
>         echo
>     fi
>     ;;
>
> reload)
>     $SQUID $SQUID_OPTS -k reconfigure
>     exit $?
>     ;;
>
> restart)
>     $0 stop
>     $0 start
>     ;;
>
> status)
>     status $SQUID
>     $SQUID -k check
>     exit $?
>     ;;
>
> probe)
>     exit 0;
>     ;;
>
> *)
>     echo "Usage: $0 {start|stop|status|reload|restart}"
>     exit 1
> esac
>
> exit $RETVAL
> # ---------------------- cut di sini --------------------------------
>
>
> coba nyalakan squid anda.. dan testing..
> jgn lupa ubah acl squid anda untuk supaya bisa
> memperbolehkan access dari ip2 anda.
>
> regards
>
> Budi Aditya
>
>
>
>
>
>
>
>
>
>
>


-- 
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3

Kirim email ke