LoginSignup
1
1

More than 5 years have passed since last update.

[Perl]AWS(RHEL7)x64へのLWPインストール手順

Last updated at Posted at 2015-08-23

前提: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。

1
1
0

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
1
1