寻觅生命中的那一片浅草......

每日存档 五月 4th, 2009

用cpan安装Perl相关模块的问题

最近有玩一下Perl,想用一下cpan中的一些不错的模块,但安装的过程中老是提示make….  not ok,我的服务器环境是freebsd6.2 (升级过ports) 现在的perl 版本是perl 5.8.8

针对上面的错误我的做法是重装,经过反复的重装,最后终于OK,下面分享一下我的重装过程。

如我要安装HTML::TreeBuilder

阅读全文»

CPAN的配置

1)配置文件:  /usr/lib/perl5/5.8.8/CPAN/Config.pm
如果第一次运行cpan命令
cpan提示进行交互的进行配置
当然我们根据自己的需要也可以手动的编辑此文件

贴一下自己的配置:

# This is CPAN.pm’s systemwide configuration file. This file provides
# defaults for users, and the values can be changed in a per-user
# configuration file. The user-config file is being looked for as
# ~/.cpan/CPAN/MyConfig.pm.

$CPAN::Config = {
‘build_cache’ => q[10],
‘build_dir’ => q[/root/.cpan/build],
‘cache_metadata’ => q[1],
‘cpan_home’ => q[/root/.cpan],
‘dontload_hash’ => {  },
‘ftp’ => q[/usr/kerberos/bin/ftp],
‘ftp_proxy’ => q[],
‘getcwd’ => q[cwd],
‘gpg’ => q[/usr/bin/gpg],
‘gzip’ => q[/usr/bin/gzip],
‘histfile’ => q[/root/.cpan/histfile],
‘histsize’ => q[100],
‘http_proxy’ => q[],
‘inactivity_timeout’ => q[0],
‘index_expire’ => q[1],
‘inhibit_startup_message’ => q[0],
‘keep_source_where’ => q[/root/.cpan/sources],
‘links’ => q[/usr/bin/links],
‘make’ => q[/usr/bin/make],
‘make_arg’ => q[],
‘make_install_arg’ => q[],
‘makepl_arg’ => q[],
‘ncftp’ => q[],
‘ncftpget’ => q[],
‘no_proxy’ => q[],
‘pager’ => q[/usr/bin/less],
‘prerequisites_policy’ => q[ask],
‘scan_cache’ => q[atstart],
‘shell’ => q[/bin/bash],
‘tar’ => q[/bin/tar],
‘term_is_latin’ => q[1],
‘unzip’ => q[/usr/bin/unzip],
‘urllist’ => [q[http://cpan.modperl.cn/]],
‘wget’ => q[/usr/bin/wget],
};
1;
__END__

2)如果需要重新配置CPAN,输入:
#cpan
进入cpan后,输入:
#CPAN>o conf init
阅读全文»

Table ‘mysql.servers’ doesn’t exist

很多朋友安装MYSQL后,出现了Table ‘mysql.servers’ doesn’t exist问题,在网上遍历了所有这个问题的解决方法,都是采用repair命令来完成,在本地计算机上对网上各种方法做测试,发现无法解决这个问题,最后通过国外MYSQL研发团队给予帮助后,问题很快解决,命令行如下:
use mysql;
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT=’MySQL Foreign Servers table’;

转载自:http://blog.intohard.com/?uid-2-action-viewspace-itemid-7772

squid限速

要实现限制网速的功能,你得重新编译squid,激活-enable-delay-pools选项 。方法如下:
1、下载squid源码 (到官方网站)
2、编译squid
1)安装 gcc  make
2)准备编译,即配置源码中的configure

阅读全文»

2009年五月
« 4月   6月 »
 123
45678910
11121314151617
18192021222324
25262728293031