さくらVPSにCPANをインストールする方法
いまさらですが、さくらVPSにCPANをインストールする方法を紹介します。
PerlモジュールをCPANでアップデートしようと思ったのですが、CPANがインストールされていませんでした。
CPANはyumコマンドでインストールできます。サーバのアーキテクチャはx86_64なので、"perl-CPAN.x86_64"を指定します。
# yum install perl-CPAN.x86_64
実行結果は次の通りです。
[root@wwwXXXXui ~]# yum install perl-CPAN.x86_64
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
14: problem making ssl connection
* base: ftp.iij.ad.jp
* epel: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
190 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-CPAN.x86_64 0:1.9402-144.el6 will be installed
--> Processing Dependency: perl = 4:5.10.1-144.el6 for package: perl-CPAN-1.9402-144.el6.x86_64
--> Processing Dependency: perl(Digest::SHA) for package: perl-CPAN-1.9402-144.el6.x86_64
(中略)
--> Running transaction check
---> Package db4-utils.x86_64 0:4.7.25-17.el6 will be updated
---> Package db4-utils.x86_64 0:4.7.25-22.el6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================
Package Arch Version Repository Size
=================================================================================================================
Installing:
perl-CPAN x86_64 1.9402-144.el6 base 247 k
Installing for dependencies:
db4-cxx x86_64 4.7.25-22.el6 base 589 k
db4-devel x86_64 4.7.25-22.el6 base 6.6 M
gdbm-devel x86_64 1.8.0-39.el6 base 26 k
perl-Digest-SHA x86_64 1:5.47-144.el6 base 65 k
Updating for dependencies:
db4 x86_64 4.7.25-22.el6 base 564 k
db4-utils x86_64 4.7.25-22.el6 base 131 k
gdbm x86_64 1.8.0-39.el6 base 29 k
perl x86_64 4:5.10.1-144.el6 base 10 M
(中略)
perl-version x86_64 3:0.77-144.el6 base 52 k
zlib x86_64 1.2.3-29.el6 base 73 k
Transaction Summary
=================================================================================================================
Install 5 Package(s)
Upgrade 18 Package(s)
Total download size: 21 M
Is this ok [y/N]: y
Downloading Packages:
(1/23): db4-4.7.25-22.el6.x86_64.rpm | 564 kB 00:00
(2/23): db4-cxx-4.7.25-22.el6.x86_64.rpm | 589 kB 00:00
(3/23): db4-devel-4.7.25-22.el6.x86_64.rpm | 6.6 MB 00:00
(中略)
(23/23): zlib-1.2.3-29.el6.x86_64.rpm | 73 kB 00:00
-----------------------------------------------------------------------------------------------------------------
Total 4.6 MB/s | 21 MB 00:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : db4-4.7.25-22.el6.x86_64 1/41
Updating : gdbm-1.8.0-39.el6.x86_64 2/41
Updating : 1:perl-Pod-Escapes-1.04-144.el6.x86_64 3/41
(中略)
Verifying : 1:perl-ExtUtils-ParseXS-2.2003.0-127.el6.x86_64 40/41
Verifying : 4:perl-5.10.1-127.el6.x86_64 41/41
Installed:
perl-CPAN.x86_64 0:1.9402-144.el6
Dependency Installed:
db4-cxx.x86_64 0:4.7.25-22.el6 db4-devel.x86_64 0:4.7.25-22.el6 gdbm-devel.x86_64 0:1.8.0-39.el6
perl-Digest-SHA.x86_64 1:5.47-144.el6
Dependency Updated:
db4.x86_64 0:4.7.25-22.el6 db4-utils.x86_64 0:4.7.25-22.el6
gdbm.x86_64 0:1.8.0-39.el6 perl.x86_64 4:5.10.1-144.el6
perl-Compress-Raw-Zlib.x86_64 1:2.021-144.el6 perl-Compress-Zlib.x86_64 0:2.021-144.el6
perl-ExtUtils-MakeMaker.x86_64 0:6.55-144.el6 perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-144.el6
perl-IO-Compress-Base.x86_64 0:2.021-144.el6 perl-IO-Compress-Zlib.x86_64 0:2.021-144.el6
perl-Module-Pluggable.x86_64 1:3.90-144.el6 perl-Pod-Escapes.x86_64 1:1.04-144.el6
perl-Pod-Simple.x86_64 1:3.13-144.el6 perl-Test-Harness.x86_64 0:3.17-144.el6
perl-devel.x86_64 4:5.10.1-144.el6 perl-libs.x86_64 4:5.10.1-144.el6
perl-version.x86_64 3:0.77-144.el6 zlib.x86_64 0:1.2.3-29.el6
Complete!
インストール後、cpanの初期設定のため、"cpan"を実行します。
# cpan
実行結果は下記です。出力は長いですが、12行目の「Would you like me to configure as much as possible automatically?」で"yes"を入力するだけです。
[root@wwwXXXXui ~]# cpan
CPAN is the world-wide archive of perl resources. It consists of about
300 sites that all replicate the same contents around the globe. Many
countries have at least one CPAN site already. The resources found on
CPAN are easily accessible with the CPAN.pm module. If you want to use
CPAN.pm, lots of things have to be configured. Fortunately, most of
them can be determined automatically. If you prefer the automatic
configuration, answer 'yes' below.
If you prefer to enter a dialog instead, you can answer 'no' to this
question and I'll let you configure in small steps one thing after the
other. (Note: you can revisit this dialog anytime later by typing 'o
conf init' at the cpan prompt.)
Would you like me to configure as much as possible automatically? [yes] yes
The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide or a personal directory.
(中略)
cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.
cpan[1]>
インストールは、
cpan[x]> install HTML::Entities
とします。
cpanから抜ける場合は、
cpan[x]> quit
です。
Posted by yujiro このページの先頭に戻る
- メール送信で「smtp-source: fatal: connect: Connection refused」となる場合の対処
- Apache+mod_proxy+PSGIでMovable TYpeを利用する方法
- Movable TypeのPSGI環境で503エラーになる場合の対処
- さくらのVPSでrootパスワードを忘れたときの対処
- さくらVPS:NTPの脆弱性を利用したDDoS攻撃対策のまとめ
- さくらVPS(その8:ImageMagickとPerlMagickのインストール)
- さくらVPS(その7:phpMyAdminのインストール)
- さくらVPS(その6:Remiを使ったPHPの最新バージョンのインストール)
- さくらVPS(その5:MySQLのインストールと起動)
- さくらVPS(その4:Apacheのインストールと起動)
- さくらVPS(その3:セキュリティ設定)
- さくらVPS(その2:TeraTerm Menuで自動ログイン)
- さくらVPS(その1:コントロールパネル・サーバ起動・ログイン)
トラックバックURL
コメントする
greeting