角本语言转型, 安装Windows上的Perl环境

    1, 安装Windows上的ActivePerl软件. 在下载后, 点击install.bat角本, 然后按照提示打Yes或No, 下面是将软件安装到c:\usr目录(因为Perl角本的第一行一般是/usr/bin/perl -w)下的例子:

Did you read the LICENSE.txt file? [no] yes
Do you agree to the ActivePerl Community License v2.1? [no] yes
Enter top level directory for install? [C:\Perl] c:\usr
Create shortcuts to the HTML documentation? [yes] no
Add the Perl\site\bin and Perl\bin directories to the PATH? [yes]
Create Perl file extension association? [yes]
Create IIS script mapping for Perl? [yes] no
Create IIS script mapping for Perl ISAPI? [yes] no
Proceed? [yes]

    2, 安装连接Oracle的模块DBD-Oracle 1.19, 下载后解压到c:\usr目录即可.

    3, 安装连接MySQL的模块DBD-MySQL, 运行c:\usr\bin目录下的ppm-shell.bat文件. 如果要从这儿安装DBD-Oracle, 则打install DBD-Oracle就可以了.

ppm> install dbd-mysql
Downloading ActiveState Package Repository packlist...done
Updating ActiveState Package Repository database...done
Downloading DBD-mysql-3.0002...done
Unpacking DBD-mysql-3.0002...done
Generating HTML for DBD-mysql-3.0002...done
Updating files in site area...done
  14 files installed
ppm>

    不过在ActivatePerl的站点上不能安装DBD-Sybase, DBD-MSSQL, DBD-DB2等包, 只能自已编译了.

留言 (4)

perl -MCPAN -e shell

cpan> install DBD::ODBC
cpan> install DBD::Sybase 需要先安装Sybase客户端
cpan> install DBD::DB2 需要先安装DB2客户端

原来这些可以从CPAN安装.

我还是比较喜欢用 PPM 来安装模块。 cpan不太习惯。

有些包在PPM中找不到, 只有cpan了.

先用 PPM search foo 来搜索,不然真的只能cpan,我喜欢直接从cpan下载下来再安装,呵呵:)

发表留言:

« Previous | Main | Next »

英语900句 | English 900

  • My family name is Ayneswonth.
  • 我姓安尼思华斯.
  • How do you spell it?
  • 怎么拼?
  • Who is the lady in white?
  • 穿白衣服的那位小姐是谁?
  • Could you introduce me to her?
  • 你能把我介绍给她吗?
  • Rose, let me introduce my friend to you.
  • 罗斯, 让我介绍一下我的朋友.