Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jozef (8299)

jozef
  (email not shown publicly)
http://jozef.kutej.net/
Jabber: jozef@kutej.net

Journal of jozef (8299)

Friday April 24, 2009
05:15 AM

local CPAN for the company

[ #38861 ]
# this will be a howto setup a local CPAN mirror
# that can be used together with closed source
# tar balls to have one local CPAN repository to
# install all modules from

# lines starting with $ are the commands to
# execute, # are comments (just to make sure)

# replace $YOUR_PREFERED_CPAN_MIRROR with your
# favourite CPAN mirror url and change the paths
# to your taste

# :-P

# --- cut ---

$ mkdir -p /data/minicpan
$ mkdir -p /data/minicpan.private/
$ mkdir -p /data/incoming

$ cpan -i CPAN::Mini::Inject

$ cat > $HOME/.minicpanrc << __END__
local:  /data/minicpan/
remote: $YOUR_PREFERED_CPAN_MIRROR
exact_mirror: 1
__END__

$ mkdir $HOME/.mcpani
$ cat > $HOME/.mcpani/config << __END__
local:  /data/minicpan/
remote: $YOUR_PREFERED_CPAN_MIRROR
exact_mirror: 1
repository: /data/minicpan.private/
__END__

$ mcpani --add --module Local::Module::Name --authorid LOCAL --modversion 0.01 --file /data/incoming/Local-Module-Name-0.01.tar.gz

$ mcpani --update -v    # you would most likely want to cron-ify this

$ cpan -i CPAN::Mini::Webserver
$ minicpan_webserver &

# browse to http://localhost:2963/ and enjoy your
# local modules Pod :-)

# setup web server to server content of /data/minicpan

$ cpan
# type in: o conf urllist unshift http://localhost/minicpan/
# type in: o conf commit

# --- cut ---

# was not that dificult after all, was it? just a
# note `du -sh /data/minicpan` => 1.1G

# TIMTIWTFI => CPANPLUS custom sources (http://domm.plix.at/talks/cpanplus_custom_sources.html)
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.