前提:PuTTY接続済みであること
rootになる。
yum install perl
perl -v
rpm -Uvh http://fr2.rpmfind.net/linux/dag/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
yum install epel-release
yum install wget
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
rpm -Uvh epel-release-7*.rpm
yum clean all
yum install libyaml
yum list --cacheonly libyaml libyaml-devel
yum -y install *YAML*
yum install cpan
yum -y install perl-libwww-perl
perl -MCPAN -e shell
cpan> o conf prerequisites_policy follow
cpan> o conf commit
cpan> upgrade
cpan> install YAML
cpan> install Bundle::LWP
cpan> install HTML::Tree
cpan> install HTML::Format
cpan> install LWP::Protocol::https
cpan> exit
perl -MLWP -le "print(LWP->VERSION)"
→ バージョン番号を確かめる。
.plを下記のように実装する。LWPのバージョンを前述の番号と合わせる。
use LWP 6.05;
my $browser = LWP::UserAgent->new;
my $url = "http://www.yahoo.co.jp";
my $response = $browser->get( $url );
print $response->decoded_content;
.plを実行してyahooのソースが表示されたらOK。