CPAN Installation
This documentation describes how to install CPANXR on a host.
To run CPANXR you'll need the following installed on your host
Database: MySQL 3.23 or later (developed using 4.0.14-standard) Apache: Apache 1.3 or later (developed using 1.3.28) mod_perl (developed using 1.27) Perl: Perl 5.6.0 or later Perl modules: DBI 1.37 (previous versions should work) DBD::mysql 2.9002 (previous versions should work) PPI 0.805 CGI CGI::Carp Class::Autouse 1.0 Class::Handle 0.4 File::Spec 0.82 File::Flat 0.9 File::Find::Rule 0.11 List::Util 1.11 Test::ClassAPI Config::Tiny 1.1 Config::Simple 4.55 GraphViz 1.8 Data::Page 0.18 Other software: graphviz-1.10
These instructions assume your cwd is the unpacked CPANXR distribution.
% perl Makefile.PL % make % make test % make install
If you want to run CPANXR under a virtual host, add the following to your httpd.conf.
# Load the CPANXR Apache handler PerlModule CPANXR::Apache <VirtualHost *> # Replace this with the actual hostname to use ServerName cpanxr.mycompany.com # Change this to where you'll install the HTML support files DocumentRoot /var/www/cpanxr.mycompany.com <Location /cpanxr> PerlHandler CPANXR::Apache SetHandler perl-script </Location> </VirtualHost>
% cp -R setup/html /var/www/cpanxr.mycompany.com % chmod -R 755 /var/www/cpanxr.mycompany.com % chown nobody:nogroup /var/www/cpanxr.mycompany
Change the path /var/www/cpanxr.mycompany.com to whatever you specified in your httpd.conf. Change nobody:nogroup to the user and group that apache is configured to runs as.
% cp setup/conf/cpanxr.conf /etc
Now, open /etc/cpanxr.conf and change to configuration to match your host. If your Apache runs under chroot, it is probablly wise to put XrRoot under the DocumentRoot.
The following assumes you have downloaded some Acme- modules and unpacked them into /var/cpan/
% cp -R /var/cpan/Acme-* /var/cpanxr/dists/ % chmod -R 755 /var/cpanxr/dists/ % chown -R nobody:nogroup /var/cpanxr/dists
% mysql -uroot -p < setup/setup-mysql.sql
Will create a database named cpanxr.
% cpanxr index
Fire up your favorite web-browser and enter the URL to CPANXR on your host.
To install CPANXR, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPANXR
CPAN shell
perl -MCPAN -e shell install CPANXR
For more information on module installation, please visit the detailed CPAN module installation guide.