shared Perlbrew for all users

Perlbrew install and usage examples

installation
initialization
install Perl
etc.

The better way in our view to install perlbrew is via CPAN and try to set it up to be shared by all users on the system.

$ export PERLBREW_ROOT=/opt/perl5
$ cpan App::perlbrew

and it is good idea to export PERLBREW_ROOT=/opt/perl5 for all users, so that all users share same perlbrew installation/setup/environment, we do this by

$ echo “export PERLBREW_ROOT=/opt/perl5” > /etc/profile.d/perlbrew.sh
$ perlbrew init

perlbrew root (/opt/perl5) is initialized.

Append the following piece of code to the end of your ~/.bash_profile and start a
new shell, perlbrew should be up and fully functional from there:

source /opt/perl5/etc/bashrc

Simply run `perlbrew` for usage details.

Happy brewing!

so let us further set up the /etc/profile.d/perlbrew as

$ echo “source /opt/perl5/etc/bashrc” >> /etc/profile.d/perlbrew

BELOW is some usage example of perlbrew

$ curl -L http://install.perlbrew.pl | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
103 1247 103 1247 0 0 1313 0 –:–:– –:–:– –:–:– 1313

## Download the latest perlbrew

## Installing perlbrew
perlbrew is installed: ~/perl5/perlbrew/bin/perlbrew

perlbrew root (~/perl5/perlbrew) is initialized.

Append the following piece of code to the end of your ~/.bash_profile and start a
new shell, perlbrew should be up and fully functional from there:

source ~/perl5/perlbrew/etc/bashrc

Simply run `perlbrew` for usage details.

Happy brewing!

## Installing patchperl

## Done.

$ cat “source ~/perl5/perlbrew/etc/bashrc” >> ~/.bash_profile
$ source ~/.bash_profile
$ which perlbrew

initialize Perlbrew environment
$ perlbrew init
perlbrew root (~/perl5/perlbrew) is initialized.

Append the following piece of code to the end of your ~/.bash_profile and start a
new shell, perlbrew should be up and fully functional from there:

source ~/perl5/perlbrew/etc/bashrc

Simply run `perlbrew` for usage details.

Happy brewing!

$ perlbrew install perl-5.22.1
Installing /root/perl5/perlbrew/build/perl-5.22.1 into ~/perl5/perlbrew/perls/perl-5.22.1

This could take a while. You can run the following command on another shell to track the status:

tail -f ~/perl5/perlbrew/build.perl-5.22.1.log

perl-5.22.1 is successfully installed.

Leave a Reply

Your email address will not be published. Required fields are marked *

2 + fifteen =