Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[INFO] Install perl modules trough a http proxy with authent

 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's
Author Message
rik



Joined: 22 Nov 2004
Posts: 36
Location: Zuerich; Switzerland

PostPosted: Wed Nov 30, 2005 6:36 am    Post subject: [INFO] Install perl modules trough a http proxy with authent Reply with quote

Install a perl module with -MCPAN trough a Http-Proxy

I use the freebsd operating system and the bash shell.

As many of the perlscripts are using additional perl modules which can be installed trough CPAN i run into a problem with our Proxy.

To get this to work with our proxy with authentification i had to change the following:


I installed Curl


In my homedirectory i created the file .curlrc with the following entries:
Code:

-x [ip proxy]:[port proxy]
-U [user]:[passwort]


In the homedirectory i created the following directories and file .cpan/CPAN/MyConfig.pm :
Code:

$CPAN::Config = {
  'wget' => q[/usr/local/bin/curl],
};
1;
__END__


In the file /usr/local/lib/perl5/5.8.6/CPAN.pm i changed the entries for wget:
Code:

} elsif ($f eq "wget"){
$src_switch = ""; #before: $src_switch = " -O -";
}


Now i use the configuration for wget but it runs actually curl to get downloaded the CPAN Modules.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group