第一步:编辑bashrc
编辑 ~/.bashrc 文件,第一个变量$LOCAL_APP根据自己情况修改,后面直接复制。
#local app path
LOCAL_APP="/share/path/perl5/" ##### 设置模块安装路径
#local perl edition
LOCAL_PERL_EDITION=$LOCAL_APP/perl
export PERL5LIB=$LOCAL_PERL_EDITION/lib
export PATH=$LOCAL_PERL_EDITION/bin:$PATH
# local perl lib
LOCAL_PERL_LIB=$LOCAL_APP/perl5
exportPERL_LOCAL_LIB_ROOT="$PERL_LOCAL_LIB_ROOT:$LOCAL_PERL_LIB"
export PERL_MB_OPT="--install_base$LOCAL_PERL_LIB"
exportPERL_MM_OPT="INSTALL_BASE=$LOCAL_PERL_LIB"
export PERL5LIB=$LOCAL_PERL_LIB/lib/perl5:$PERL5LIB
export PATH=$LOCAL_PERL_LIB/bin:$PATH
第二步:source bashrc
source ~/.bashrc