$ wget http://www.delegate.org/anonftp/DeleGate/delegate8.5.5.tar.gzこれで/usr/local/sbinに、インストールできました。
$ gzip -cd delegate8.5.5.tar.gz | tar xvf -
$ cd delegate8.5.5
$ make
$ su -
# install -s src/delegated /usr/local/sbin
# groupadd delegateユーザができたら今度は実行用のシェルを作成しましょう。
# useradd -G delegate -d /var/spool/delegated -s /bin/false -c"for Delegated" delegate
# mkdir -p /usr/local/etc/deregate/次は実際に使うコンフィグファイルを作成します。
# vi /usr/local/etc/deregate/delegated.sh---------------- #!/bin/sh DOWN="OWNER=delegate" #さっき作ったユーザ DPATH="/usr/local/sbin/" #delegatedがあるPATH PATH="$DPATH:$PATH" DPRM="DGROOT=/var/spool/delegated" # delegateのホーム DADM="ADMIN=webmaster@lunatear.net" # エラー時に表示されるメールアドレス if [ -f $DPATH/delegated ] then $DPATH/delegated $DPRM $DADM $DOWN $* fi ----------------# chmod 755 /usr/local/etc/deregate/delegated.sh
# vi /usr/local/etc/delegate/www.confさて、最後に自動実行用のファイルを作成します---------------- SERVER=http,https # http,httpsのみ通す RELIABLE=192.168.xxx.0/24 #自分のサブネットからのみ通す。必要なら127.0.0.1も追記する LOGFILE=${LOGDIR}/${PORT}/[date+%d] PROTOLOG='${LOGDIR}/${PORT}/[date+%d].${PROTO}' EXPIRE=1d #キャッシュを1日間は利用する CRON='0 3 * * * -expire 2' # 2日でキャッシュを削除 CONNECT=c,d:*:* # キャッシュ → サーバの順でみるようにする ----------------
# vi /etc/init.d/delegated2003年10月23日 10時38分28秒 追記---------------- #!/bin/sh # # chkconfig: 2345 91 11 # description: DeleGate Proxy Server # # DeleGate 8.5.5 # # 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 that smb.conf exists. [ -f /usr/local/etc/delegate/delegated.sh ] || exit 0 RETVAL=0 # See how we were called. case "$1" in start) echo -n "Starting DeleGate services (WWW Proxy): " /usr/local/etc/delegate/delegated.sh -P8080 +=/usr/local/etc/delegate/www.conf #8080のポート番号は各自変更すること RETVAL=$? echo ;; stop) echo -n "Shutting down DeleGate services: " /usr/local/etc/delegate/delegated.sh -P8080 -Fkill RETVAL=$? echo ;; restart) $0 stop $0 start RETVAL=$? ;; reload) echo -n "Reloading delegali.conf file: " /usr/local/etc/delegated/delegated.sh -P8080 -Fkill-hup RETVAL=$? echo ;; status) status /usr/local/sbin/delegated RETVAL=$? ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 esac exit $RETVAL ----------------# chmod 755 /etc/init.d/delegated
# chkconfig delegate on
自分のメモ見ながらインストールしてたらとちゃんと動かないので、追記(^^;
# chown delegate:delegate /usr/local/sbin/delegatedたぶんこれで動くようになります。
# chmod 4755 /usr/local/sbin/delegated
# mkdir -p /var/spool/delegated/cache
# chmod -R delegate:delegate /var/spool/delegated