2009年1月27日火曜日

cpan メモ

職場は、httpポートしか接続できない少し厳しいプロクシがかかってます。
その中で、cpanでモジュールをインストールすると結構不便で、接続できないことが起こります。
で、現在はうまくいったのでメモしておきます。
~# perl -MCPAN -e shell
cpan>o conf init
で設定。
CPAN::Config options from /etc/perl/CPAN/Config.pm: commit
Commit changes to disk defaults
Reload defaults from disk init
Interactive setting of all options
build_cache 10
build_dir /root/.cpan/build
cache_metadata 1 cpan_home /root/.cpan
cpan_version_check 1
dontload_hash
ftp
ftp_proxy getcwd cwd
gpg /usr/bin/gpg
gzip /bin/gzip histfile /root/.cpan/histfile
histsize 100
http_proxy 192.168.***.***:8080
inactivity_timeout 0
index_expire 1
inhibit_startup_message 0
keep_source_where /root/.cpan/sources
lynx /usr/bin/lynx
make /usr/bin/make
make_arg
make_install_arg UNINST=1
makepl_arg
INSTALLDIRS=site
ncftpget
no_proxy
pager /usr/bin/less
prerequisites_policy ask
proxy_user
scan_cache atstart
shell /bin/bash
tar /bin/tar term_is_latin 1
unzip /usr/bin/unzip
urlist http://cpan.sarang.net/
urllist http://cpan.sarang.net/
wget /usr/bin/wget

cpanの設定を変更するときは
cpan>o conf
ですが、設定が面倒なので、手動で書き換えることも(^_^;)
CPAN/Config.pm
をnano やemacsで直接書きました。

ポイント
  1. lynxのプロクシ設定をしっかりやること。
  2. http経由のcpanサーバを選ぶこと

ですが、なんと日本は全滅でした。しょうがないので韓国のsarang.neにしましたが・・・

0 件のコメント: