第一步:編輯bashrc
編輯 ~/.bashrc 文件番捂,第一個(gè)變量$LOCAL_APP根據(jù)自己情況修改,后面直接復(fù)制江解。
#local app path
LOCAL_APP="/share/path/perl5/"? ? ?#####? 設(shè)置模塊安裝路徑
#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