安装perl dbd
###DBD
vim mysql_config #socket='/var/lib/mysql/mysql.sock' -->socket='/data/var/mysql.sock'
perl Makefile.PL --mysql_config=/usr/bin/mysql_config
Perl-DBI版本:DBI-1.56
Step 1: # cp DBI-1.56.tar.gz /usr/local/
Step 2: # cd /usr/local/
Step 3: # tar xvzf DBI-1.56.tar.gz
Step 4: # cd DBI-1.56
Step 5: # perl Makefile.PL
Step 6: # make
Step 7: # make test
Step 8: # make install
Step 9: # perl -MDBI –el (测试是否安装成功,若不报错则成功)
3、 Perl-DBD-MySQL 模块安装
Step 1: # cp DBD-mysql-4.00.tar.gz /usr/local/
Step 2: # cd /usr/local/
Step 3: # tar xvzf DBD-mysql-4.00.tar.gz
Step 4: # cd DBD-mysql-4.00
Step 5: # perl Makefile.PL
Step 6: # make
Step 7: # make test
Step 8: # make install
vim mysql_config #socket='/var/lib/mysql/mysql.sock' -->socket='/data/var/mysql.sock'
perl Makefile.PL --mysql_config=/usr/bin/mysql_config
[q[ftp://cpan.hexten.net/], q[ftp://cpan.hostrack.net/pub/CPAN], q[ftp://cpan.pair.com/pub/CPAN/]],
CPAN>o conf init
shell> perl -MCPAN -e shell
cpan> install DBI
cpan> install DBD::mysql
阅读(910) | 评论(0) | 转发(0) |