3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

delegateでhttp proxyをinit.dから起動

Last updated at Posted at 2014-08-25

Ubuntu 12.4にて。

最新版のLinux用バイナリ(64bit用)を落としてインストール

sudo wget -O /usr/sbin/delegated ftp://ftp.delegate.org/pub/DeleGate/bin/linux/latest/linux2.6-dg9.9.11
sudo mkdir /etc/delegate/
sudo useradd -d /etc/delegate delegate 

skeltonを元に起動ファイルを用意

sudo cp /etc/init.d/skelton /etc/init.d/delegate_8080
sudo chmod ugo+x /etc/init.d/delegate_8080

8080ポート用のディレクトリ用意

sudo mkdir /etc/delegate/8080_http_proxy
sudo chown -R delegate:delegate /etc/delegate

起動ファイルを修正(以下修正箇所)

NAME=delegate_8080
DAEMON=/usr/sbin/delegated
PIDFILE=/etc/delegate/8080_http_proxy/act/pid/8080
SCRIPTNAME=/etc/init.d/delegate_8080

do_start()
...
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
		-P8080 SERVER=http ADMIN=admin@example.com OWNER=delegate/delegate DGROOT=/etc/delegate/8080_http_proxy RELAY=proxy,delegate PERMIT="*:*:*" \
		|| return 2

rc.dに追加

sudo update-rc.d delegate_8080 defaults
3
3
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?