å¹³åçãªãã¹ãã£ã³ã°UNIXãµãŒããŒã®ããŒã ãã£ã¬ã¯ããªã«ã©ã€ãã©ãªãç°¡åãã€æ£åžžã«ã€ã³ã¹ããŒã«ããããã«å¿ èŠãªãã®ã¯äœã§ããïŒ SSHã¢ã¯ã»ã¹ãæãŸããã ãããªãã§ãå®è¡ã§ããŸãããäœããã®çš®é¡ã®Webã·ã§ã«ãæ¢ãå¿ èŠããããŸãã ã»ãšãã©ã®å Žåãsshã³ã³ãœãŒã«ãchrootç°å¢ã§æ©èœããªãããssh chrootç°å¢ãapacheã®ç°å¢ãšäžèŽãããããæãŸãããããŸããã ãã¹ãã£ã³ã°æ¥è ã«ã¯SSHããããŸãããïŒ ããã¯èããçç±ã§ãã UNIXã³ã³ãœãŒã«ã®ã¹ãã«ãå¿ èŠã§ãã ããã¯ãäžé£ã®çªå·ãæºåž¯é»è©±ã®çãçªå·ã«éä¿¡ããããšã»ã©é£ãããããŸããã ãã§ã«ãµã€ãã®éçºãå§ããŠããã®ã§ããã°ããããæããªãã§ãã ããã
ãã¬ãŒã·ã§ã³ã®ããã«ã$ PREFIXãã¯ãã«ã€ããŠããèšåããŸãã æãäžè¬çãªãŠãŒã¶ãŒãšã©ãŒã®1ã€ã¯ãéåžžããã¬ãã£ãã¯ã¹ãã©ã€ãã©ãªãã¡ã€ã«ãã€ã³ã¹ããŒã«ããããã£ã¬ã¯ããªãåç §ããããšã§ãã å®éãã©ã€ãã©ãªãšããã°ã©ã ã®é åžã«ã¯ãæåãã¡ã€ã«ãããã¥ã¡ã³ããè£å©ãã¡ã€ã«ããã€ããªå®è¡å¯èœãã¡ã€ã«ãããã³ã©ã€ãã©ãªãã¡ã€ã«èªäœããããŸãã ãã¹ãŠã®ã€ã³ã¹ããŒã«ã·ã¹ãã ã¯ãæå®ããããã¡ã€ã«ã«å¯ŸããŠã$ PREFIXããå§ãŸãæ¡ä»¶ä»ããã£ã¬ã¯ããªéå±€ãäœæããŸãã ããšãã°ãPythonã¢ãžã¥ãŒã«ã¯ãã€ããªãã¡ã€ã«ã$ PREFIX / binã«ãæåãã¡ã€ã«ã$ PREFIX / shared / manã«ãã©ã€ãã©ãªãã¡ã€ã«èªäœã$ PREFIX / lib / pythonX.X / site-packagesã«å解ããŸãïŒXXã¯Pythonã€ã³ã¿ãŒããªã¿ãŒã®ããŒãžã§ã³ã§ããã¡ãªã¿ã«ãããŒãžã§ã³ããšã«ç°ãªãã©ã€ãã©ãªãé 眮ã§ããŸãïŒã ããã©ã«ãã®ãã£ã¬ã¯ããªéå±€ã«å察ããªãããšããå§ãããŸãããŸããäžè¬çãªã±ãŒã¹ã§ã¯ã$ PREFIXïŒã·ã¹ãã ã«ååšããªãç§ãå®çŸ©ãããã¯ãïŒãš$ HOMEïŒãŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªãå®çŸ©æžã¿ã·ã§ã«å€æ°ïŒã¯åäžã§ããã誰ããããã®èŠåã«åŸã矩åã¯ãããŸããã
ã©ã€ãã©ãªã眮ãã ãã§ã¯ååã§ã¯ãããŸããããµã€ããœãããŠã§ã¢ã«ã©ã€ãã©ãªã®å ŽæãäŒããå¿ èŠããããŸãã ãã®ãããããã§èª¬æããã»ãšãã©ãã¹ãŠã®ãã¯ãããžãŒã¯ç°å¢å€æ°ã§ãã ããããã®ãã¯ãããžãŒã«ã€ããŠããããã«ã€ããŠè©³ãã説æããŸãã ãããããããã®ã¢ããªã±ãŒã·ã§ã³ã¯ãã¹ãŠã®ãŠãŒã¶ãŒã«å ±éã§ãã
sshã³ãã³ãã©ã€ã³ã®ç°å¢å€æ°ãèšå®ããã«ã¯ïŒå®éã«ã¯ãã°ã€ã³äžã®ã³ã³ãœãŒã«ã«å¯ŸããŠïŒãshããã³bashã·ã§ã«ïŒã»ãšãã©ã®ãã¹ãã£ã³ã°ãµã€ãã§ã¯ãŠãŒã¶ãŒã®ã¡ã€ã³ã·ã§ã«ïŒã®.profileãã¡ã€ã«ã«æžã蟌ãå¿ èŠããããŸããŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªã®ã«ãŒãã次ã®è¡ïŒ
VARIABLE=VALUE
export VARIABLE
ããšãã°ãPython 2.5ã¢ãžã¥ãŒã«ã®å Žåãããã¯æ¬¡ã®ããã«ãªããŸãã
PYTHONPATH=$HOME/lib/python2.5/site-packages
export PYTHONPATH
ãã®å Žåãéåžžã¯äºåå®çŸ©ãããå€æ°$ HOMEã䜿çšãããã·ã§ã«ã«ãã£ãŠèªåçã«éãããããšã«æ³šæããŠãã ããã shãšbash以å€ã®ã·ã§ã«ã§ã¯ãæååãç°ãªããŸãããããã®ã·ã§ã«ã®ããã¥ã¡ã³ããåç §ããŠãã ããã ã·ã§ã«ç°å¢å€æ°ã¯ãã©ã€ãã©ãªãã€ã³ã¹ããŒã«ããåã«èšå®ããã®ãæé©ã§ãã èšå®ãé©çšããã«ã¯ãè¿œå åŸã«ããã°ã€ã³ãããããšãå¿ããªãã§ãã ããã
cronãžã§ãã§ç°å¢å€æ°ã確èªããã«ã¯ãcrontabãã¡ã€ã«ã®å é ã«æžã蟌ã¿ãŸãã
VARIABLE=VALUE
ããšãã°ãvasyaãŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ãããPython 2.5ã¢ãžã¥ãŒã«ã®å Žåãããã¯æ¬¡ã®ããã«ãªããŸãã
PYTHONPATH=/home/vasya/lib/python2.5/site-packages
ããŸããŸãªãã¹ãã£ã³ã°äºæ¥è ã®ãµãŒããŒäžã®ããŒã ãã£ã¬ã¯ããªãžã®ãã¹ã¯ãäžèšãšã¯ç°ãªãå ŽåããããŸãã cronã¯å€æ°ããéããããšãã§ããããã¹ã¯ãã®ãŸãŸå®å šã«èšè¿°ããå¿ èŠããããšããäºå®ã«ç¹ã«æ³šæãæããŸãã
WebãµãŒããŒã®äœ¿çšã¯ããå°ãè€éã§ãã ç¹å®ã®ã±ãŒã¹ã«è©²åœããããã¥ã¡ã³ãããèªã¿ãã ããã ããšãã°ãApacheãå®è¡ããŠvasyaãŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ãããŠããã©ã€ãã©ãªã確èªããPerl5 CGIã¹ã¯ãªããã®å Žåããµã€ãã®ã«ãŒããŸãã¯CGIã¹ã¯ãªããããããã£ã¬ã¯ããªã®.htaccessãã¡ã€ã«ã«æ¬¡ã®è¡ãæžã蟌ãå¿ èŠããããŸãã
SetEnv PERL5LIB /home/vasya/lib/perl5
ãã®èª¬æãããApache WebãµãŒããŒã§ç°å¢å€æ°ãã©ã®ããã«èšå®ãããŠããããæããã§ãã
ãã ããWSGIãµãŒããŒïŒä»»æïŒãå®è¡ããPython 2.5ã¢ããªã±ãŒã·ã§ã³ã®å ŽåãWSGIåæåãã¡ã€ã«ã«æ¬¡ã®è¡ãèšè¿°ããæ¹ãé©åã§ãã
import sys
sys.path.insert(0,"/home/vasya/lib/python2.5/site-packages")
ãã®äŸããããã®ãããªå Žåã«ä»ã®ãã¯ãããžãŒãã©ã®ããã«æ±ãããæ確ã«ãªããŸãã
çµéšè±å¯ãªUNIXãŠãŒã¶ãŒã®å Žåã䟿å®äžã$ HOME / binãã£ã¬ã¯ããªãæå®ããŠPATHå€æ°ãå±éããã³ã³ãœãŒã«ãããã«ãã¹ãå°å ¥ããã«ã©ã€ãã©ãªã«ä»å±ãããŠãŒãã£ãªãã£ãæ©èœããMANPATHå€æ°ïŒéåžžã¯$ HOME / share / man ãã€ã³ã¹ããŒã«ãããã¢ãžã¥ãŒã«ã®ããã¥ã¢ã«ããŒãžãšéåžžã®ããã¥ã¢ã«ããŒãžã䜿çšã§ããããã«ããããã«-manã³ãã³ãã䜿çšããŸãã
CPANã©ã€ãã©ãªïŒã¢ãžã¥ãŒã«ïŒãããŒã ãã£ã¬ã¯ããªïŒPerlïŒã«ã€ã³ã¹ããŒã«ãã
CPANïŒå æ¬çãªPerlã¢ãŒã«ã€ããããã¯ãŒã¯-Perlã¢ãŒã«ã€ãïŒã¯ãPerlã«é¢é£ãããã¹ãŠã®äžå€®ãªããžããªã§ããããšãæãåºãããŠãã ããã CPANã¢ãžã¥ãŒã«ã調ã¹ã1ã€ã®æ¹æ³ã¯ã search.cpan.orgã«ã¢ã¯ã»ã¹ããããšã§ãã
ã€ã³ã¹ããŒã«ãããã¢ãžã¥ãŒã«ã§ã¹ã¯ãªãããæ©èœããããã«ã¯ãPERL5LIBç°å¢å€æ°ãèšå®ããå¿ èŠããããŸãã ã¢ãžã¥ãŒã«ãæ€çŽ¢ããããã®ããã€ãã®ãã¹ãæå®ããã«ã¯ãã³ãã³ã§ãªã¹ãããŸãã次ã«äŸã瀺ããŸãã
PERL5LIB=/home/vasya/lib/perl5:/home/vasya/lib1/perl5:/home/vasya/lib2/perl5
CPANã«ããã¢ãžã¥ãŒã«ã¯ãæåã§ããŠã³ããŒãããŠã³ã³ãã€ã«ã§ããŸãã éåžžãã³ã³ãã€ã«åœä»€ã®ã·ãŒã±ã³ã¹ãšå¿ èŠãªã¢ãžã¥ãŒã«ã¯ãéåžžé åžãããã®äžéšã§ããREADMEãã¡ã€ã«ã«ãªã¹ããããŠããŸãã ãã¹ãŠã®CPANã¢ãžã¥ãŒã«ã¯ã次ã®ããããã®æ¹æ³ã§ã€ã³ã¹ããŒã«ã§ããŸããExtUtils:: MakeMakerããã³/ãŸãã¯Module :: BuildïŒè©³çŽ°ã«ã€ããŠã¯ããããã®ã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ããåç §ããŠãã ããïŒã ExtUtils :: MakeMakerã¯Makefile.PLãã¡ã€ã«ã䜿çšããŸãã ããŒã ãã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ããã«ã¯ãç°å¢å€æ°INSTALL_BASEãæå®ããå¿ èŠããããŸãã
perl Makefile.PL INSTALL_BASE=~
ã¢ãžã¥ãŒã«::ãã«ãã¯Build.PLãã¡ã€ã«ã䜿çšããŸãã ããŒã ãã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ããã«ã¯ã-install_baseã¹ã€ãããæå®ããå¿ èŠããããŸãã
perl Build.PL --install_base ~
Tildaã¯éåžžããŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªã®æå³ã§ã·ã§ã«ã«ãã£ãŠãæããã«ããããŸããããã¯ãèšäºã®åé ã§èª¬æãã$ PREFIXã§ãã ãã«ãã®ä»£ããã«ãç°å¢å€æ°ãé©åã«ä¿®æ£ããããšã«ãããä»ã®ãã«ãã¹ãæå®ã§ããŸãã æ®ãã®ããŒãšåªå ã€ã³ã¹ããŒã«æ¹æ³ã¯ãéåžžãã¢ãžã¥ãŒã«é åžå ã®READMEããã³INSTALLãã¡ã€ã«ã«èšèŒãããŠããŸãã
Perlãã£ã¹ããªãã¥ãŒã·ã§ã³ã«ã¯ãCPANãšåŒã°ããã¢ãžã¥ãŒã«ãå«ãŸããŠããŸãã ããã«ãããäŸåé¢ä¿ã®ã€ã³ã¹ããŒã«ãªã©ãå¿ èŠãªã¢ãžã¥ãŒã«ã®ã€ã³ã¹ããŒã«ãèªååã§ããŸãã ã¢ãžã¥ãŒã«ã¯ãæåã¢ãŒããšãããã¢ãŒãã§åäœã§ããŸãã ç°¡åã«ããããã«æåæäœãæ€èšããŠãã ããã ã¢ãžã¥ãŒã«ãšå¯Ÿè©±çã«å¯Ÿè©±ããã«ã¯ã次ã®ã³ãã³ããå ¥åããŸãã
perl -MCPAN -e shell
æåã®èµ·åæã«ãããã°ã©ã ã¯æ§æãã¡ã€ã«ãäœæããããšãã質åãããŸãã åé¡ã¯ãçãããããšãéåžžã¯ãŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªå ã®.cpan / CPAN / MyConfig.pmãã£ã¬ã¯ããªã«äœæãããæçµæ§æãã¡ã€ã«ããã¢ãžã¥ãŒã«ãããŒã«ã«ã«ã€ã³ã¹ããŒã«ããæºåãã§ããŠããªãããšã§ãã ãã®æ¹æ³ã§å ¥åããå¿ èŠããã次ã®è¡ã«èå³ããããŸãã
'build_dir' => qq[$ENV{'HOME'}/.cpan/build],
'cpan_home' => qq[$ENV{'HOME'}/.cpan],
'histfile' => qq[$ENV{'HOME'}/.cpan/histfile],
'keep_source_where' => qq[$ENV{'HOME'}/.cpan/sources],
'makepl_arg' => qq[INSTALL_BASE=$ENV{'HOME'}],
'mbuildpl_arg' => qq[--install_base $ENV{'HOME'}],
'prefs_dir' => qq[$ENV{'HOME'}/.cpan/prefs],
$ ENV {'HOME'}ã®ä»£ããã«ããŠãŒã¶ãŒã®ããŒã ãã£ã¬ã¯ããªãžã®ãã«ãã¹ããŸãã¯ä»ã®ãã¹ããããŸããäŸïŒ/ home / vasya
æ§æãæ£ããããšã確èªããåŸãã¢ãžã¥ãŒã«ãã€ã³ã¹ããŒã«ã§ããŸãã ããŒã
perl -MCPAN -e shell
ç¹å¥ãªã€ã³ã¿ã©ã¯ãã£ãã·ã§ã«ãèµ·åããŸãã ã¢ãžã¥ãŒã«ã®ã€ã³ã¹ããŒã«ã¯ãããšãã°æ¬¡ã®ã³ãã³ãã䜿çšããŠå®è¡ãããŸãã
force install _
forceããŒã¯ãŒãã¯ãããŸããŸãªçç±ã§å®éã«ãã€ãã¹ã«ãªãå¯èœæ§ããããã¬ãã£ããªãã¹ãçµæã®å Žåã«ãã€ã³ã¹ããŒã«ã®å€±æãåé¿ããã®ã«åœ¹ç«ã¡ãŸãã
CPANã¢ãžã¥ãŒã«ã¯ãCPANã¢ãžã¥ãŒã«ã®ç®¡çã«é¢ãããããïŒãœãããŠã§ã¢ïŒäœæ¥ã®å¯èœæ§ãæäŸããŸãã ã¢ãžã¥ãŒã«ã®èšå®ã现ãããããããããäœæ¥ãããã°ã©ãã³ã°ãããããã«ã¯ãCPAN.pmã®ããã¥ã¡ã³ãã«ç²Ÿéãã䟡å€ããããŸãã
PEARã©ã€ãã©ãªãŒïŒã¢ãžã¥ãŒã«ïŒãããŒã ãã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ïŒPHPïŒ
PEARïŒPHPæ¡åŒµæ©èœããã³ã¢ããªã±ãŒã·ã§ã³ãªããžããªïŒã¯ãPHPã®ãã¬ãŒã ã¯ãŒã¯ããã³ã³ã³ããŒãã³ãé åžã·ã¹ãã ã§ããããšãæãåºãããŠãã ããã 詳现æ å ±ã¯pear.php.netã§èŠã€ããããšãã§ããŸã
pearããã±ãŒãžãããŒãžã£ãŒèªäœã¯PHPãã£ã¹ããªãã¥ãŒã·ã§ã³ã®äžéšã§ã¯ãªãããããã¹ãã«äºåã«ã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã
äž»ãªåé¡ã¯ãphpã¹ã¯ãªããã1ã€ãŸãã¯å¥ã®ã³ã³ããŒãã³ããã©ãããååŸãããããèŠããããšã§ãïŒPHPã¯ããã€ãã®ããã«ç¬èªã®æ¹æ³ã§åŠçãããŸãïŒã ãã®ããã«ã¯ã次ã®ããã«ãããšãã°ãŠãŒã¶ãŒvasyaã«å¯ŸããŠinclude_pathèšå®ãå®çŸ©ããå¿ èŠããããŸãã
include_path=".:/home/vasya/pear"
æãç°¡åãªæ¹æ³ã¯ãPHPã€ã³ã¿ãŒããªã¿ãŒã«ãã®å€æ°ãäŒããããšã§ãã
php -d include_path=".:/home/vasya/pear"
ãŸãã¯ãã³ã³ã¹ãã©ã¯ããã¹ã¯ãªããã³ãŒãã«æ¿å ¥ããŸãã
ini_set("include_path",".:/home/vasya/pear");
ããã¯ãcronãä»ããã¹ã¯ãªããã®å®è¡ã«ãé©çšãããŸãã
ã¹ã¯ãªãããApache WebãµãŒããŒã®äžããå®è¡ããŠPEARã³ã³ããŒãã³ããå«ããã«ã¯ãã¹ã¯ãªãããèšè¿°ããããèšè¿°ããå¿ èŠããããŸãã
ini_set("include_path",".:/home/vasya/pear");
ãŸãã¯ããã©ãŒã ã®è¡ã.htaccessãã¡ã€ã«ã«è¿œå ããŸãã
php_value include_path ".:/home/vasya/pear"
PEARã¢ãžã¥ãŒã«ãã€ã³ã¹ããŒã«ããåã«ãã³ãã³ãã䜿çšããŠããŒã ãã£ã¬ã¯ããªã«ã³ã³ããŒãã³ããã€ã³ã¹ããŒã«ããããšãpearã«äŒããå¿ èŠããããŸãã
pear create-config $HOME .pearrc
æ§æãã¡ã€ã«ãäœæãããå°æ¥æ¢šã«ãã£ãŠäœ¿çšãããŸãã ãã¡ããããããinclude_pathã®å€ã«åæ ããããšãå¿ããã«ã$ HOMEã®ä»£ããã«ä»ã®å Žæãéžæã§ããŸãã
ããã§ãå¿ èŠãªããã±ãŒãžãç°¡åã«ã€ã³ã¹ããŒã«ã§ããŸãã äŸïŒ
pear install -o PEAR
äŸåé¢ä¿ã®ããPEARã·ã¹ãã ã®åºæ¬ã³ã³ããŒãã³ããã€ã³ã¹ããŒã«ããŸãã
Pythonã©ã€ãã©ãªïŒã¢ãžã¥ãŒã«ïŒãããŒã ãã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ããŸãïŒPythonïŒ
ã€ã³ã¹ããŒã«ãããã¢ãžã¥ãŒã«ã§ã¹ã¯ãªãããæ©èœãããã«ã¯ãç°å¢å€æ°PYTHONPATHãèšå®ããå¿ èŠããããŸãã ã¢ãžã¥ãŒã«ãæ€çŽ¢ããããã®ããã€ãã®ãã¹ãæå®ããã«ã¯ãã³ãã³ã§ãªã¹ãããŸãã次ã«äŸã瀺ããŸãã
PYTHONPATH=/home/vasya/lib/python2.5/site-packages:/home/vasya/lib2/python2.5/site-packages
ã¢ãŒã«ã€ãããã®æåã€ã³ã¹ããŒã«
éåžžãããŒãšåªå ã€ã³ã¹ããŒã«æ¹æ³ã¯ãã¢ãžã¥ãŒã«é åžå ã®READMEããã³INSTALLãã¡ã€ã«ã«èšèŒãããŠããŸãã éåžžãããã¯ã³ãã³ãã§ãïŒ
python setup.py install --prefix=$HOME
ã¢ãžã¥ãŒã«éçºè ã--prefixã¹ã€ãããç¡èŠããå Žåãåé¡ãçºçããå¯èœæ§ããããŸãã
easy_installã䜿çšããã€ã³ã¹ããŒã«
easy_installãŠãŒãã£ãªãã£ãŒèªäœã¯ã pypi.python.org / pypiãªããžããªãŒã§ããã±ãŒãžãæ€çŽ¢ããããŠã³ããŒãããŠã€ã³ã¹ããŒã«ã§ããŸãã ãŸãã¯ãæ¢ã«ããŠã³ããŒãæžã¿ã®ã€ã³ã¹ããŒã«ã PythonããŒãžã§ã³3.xã«ã¯ååšããŸããã ãã®ãŠãŒãã£ãªãã£ã¯Pythonãã£ã¹ããªãã¥ãŒã·ã§ã³ã®äžéšã§ã¯ãããŸãããæåã«setuptools pypi.python.org/pypi/setuptoolsã¢ãžã¥ãŒã«ãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã easy_installã䜿çšããŠã¢ãžã¥ãŒã«ãã€ã³ã¹ããŒã«ããã«ã¯ã次ã®åœ¢åŒã®ãã£ã¬ã¯ããªãå¿ èŠã§ãã
$PREFIX/lib/pythonX.Y/site-packages
ããã§ãXYã¯Pythonã®ããŒãžã§ã³ã§ãã ããšãã°ãeasy_installã䜿çšããŠPython 2.5ã®ã¢ãžã¥ãŒã«ãã€ã³ã¹ããŒã«ããã«ã¯ã次ã®ã³ãã³ãã§é©åãªãã£ã¬ã¯ããªéå±€ãäœæããå¿ èŠããããŸãã
mkdir $HOME/lib $HOME/lib/python2.5 $HOME/lib/python2.5/site-packages
ãã®ãããªãã£ã¬ã¯ããªãååšããªãå Žåãeasy_installã¯ãšã©ãŒãã¹ããŒããŸãã
ãã®åŸãããã±ãŒãžãã€ã³ã¹ããŒã«ã§ããŸãã
easy_install --prefix $HOME _
ä»ã®ãã¹ãŠã®å Žåãšåæ§ã«ã$ HOMEã®äŸã«ç€ºãããŠãããã®ã®ä»£ããã«ãç°å¢å€æ°ã«é©åãªä¿®æ£ãå ããããšã«ãããä»ã®ãã¬ãã£ãã¯ã¹ã䜿çšã§ããŸãã
RubyGemsãããŒã ãã£ã¬ã¯ããªã«ã€ã³ã¹ããŒã«ããïŒRubyïŒ
RubyGemsã¯Rubyããã°ã©ãã³ã°èšèªã®ããã±ãŒãžãããŒãžã£ãŒã§ãããRubyããã°ã©ã ãšã©ã€ãã©ãªãç°¡åãªã€ã³ã¹ããŒã«ç®¡ççšã«èšèšãããããŒã«ãããã³ããããé åžããããã®ãµãŒããŒãæäŸããŸãã ããã±ãŒãžã¯ãgemsãµãŒããŒããã€ã³ã¹ããŒã«ã§ããŸãã ããã©ã«ãã§ã¯ãgemsã¯rubygems.orgãµãŒããŒã§ããã±ãŒãžãæ¢ããŸãã RubyGemsã¯Rubyãã£ã¹ããªãã¥ãŒã·ã§ã³ã«å«ãŸããŠããªãããããã¹ãã£ã³ã°æ¥è ãäºåã«ã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã
RubyGemsã¯ã説æãããŠããæããã¹ããŒããªãã€ã³ã¹ããŒã«ã·ã¹ãã ã§ãã ã³ãã³ããå®è¡ããŸãïŒ
gem environment
GEM PATHSããŒã¯ãŒãã®åŸã«ââ衚瀺ããããã¹ã確èªããŸãã å€æ°GEM_HOMEããã³GEM_PATHã«èå³ããããŸãã gemèªäœã¯ãã¹ãŠã®å€æ°ãæ£ããå®çŸ©ããŠããŸããã念ã®ãããæ瀺çã«èšè¿°ããŠãã ããã ããã¯ãéæšæºã®å Žæã«ããã±ãŒãžãã€ã³ã¹ããŒã«ããå Žåã«ãåœãŠã¯ãŸããŸãã
gemã䜿çšããã€ã³ã¹ããŒã«ã¯éåžžã«ç°¡åã§ãã 次ã®ã³ãã³ããå ¥åããã ãã§ãïŒ
gem install _
éå®ç³Rubyã©ã€ãã©ãªã®ã€ã³ã¹ããŒã«
Rubyã¹ã¯ãªãããã¢ããªã±ãŒã·ã§ã³ã¹ã¯ãªããããç¬ç«ããã©ã€ãã©ãªãšããŠäœ¿çšããå¿ èŠãããå ŽåããããŸãã Rubyã€ã³ã¿ãŒããªã¿ãŒã¯ãããããèŠããå¿ èŠããããŸãã ãããè¡ãã«ã¯ã次ã®ããã«ç°å¢å€æ°RUBYLIBãèšå®ããŸãã
RUBYLIB=/home/vasya/mylib/render
ãã€ããªã©ã€ãã©ãªãã€ã³ã¹ããŒã«ãã
ãã€ããªã©ã€ãã©ãªã®ã€ã³ã¹ããŒã«ã圢åŒåããããšã¯å°é£ã§ãã ãã ããã»ãšãã©ã®å Žåãã€ã³ã¹ããŒã«ã«çŽé¢ããå¿ èŠã¯ãããŸããã
ãããã®ã©ã€ãã©ãªã®å€§éšåã®é åžã§ã¯ã次ã®èŠåãåœãŠã¯ãŸããŸãã
ãã£ã¹ããªãã¥ãŒã·ã§ã³ã«ã¯ãã³ãã³ããªã©ã®--prefixã¹ã€ãããåãå ¥ããæ§æãã¡ã€ã«ãå«ãŸããŠããŸã
./configure --prefix=$HOME
å±éããããã£ã¹ããªãã¥ãŒã·ã§ã³å ã¯ãã€ã³ã¹ããŒã«ããã»ã¹ã®æ£ããæ§æã«ååã§ããå¯èœæ§ããããŸãã
ã©ã€ãã©ãªã--prefixã念é ã«çœ®ããŠèšè¿°ããããã¹ãŠãæ£ããè¡ãããŠããå Žåãæ§æåŸã®ã³ãã³ãã®ã·ãŒã±ã³ã¹ã¯æ¬¡ã®ãšããã§ãã
make
make install
å±éããããã£ã¹ããªãã¥ãŒã·ã§ã³å ã§ã¯ãããŒã ãã£ã¬ã¯ããªã«ã©ã€ãã©ãªãã€ã³ã¹ããŒã«ãããŸãã
ä»ã®ã©ã€ãã©ãªãã€ã³ã¹ããŒã«ãããã©ã€ãã©ãªãèŠãããã«ã¯ãã»ãšãã©ã®å ŽåãLIBç°å¢å€æ°ã«ãã®ã©ã€ãã©ãªãžã®ãã¹ãç»é²ããå¿ èŠããããŸãããããã¯ãã§ã«å€ãã®èŠå ã«äŸåããŠããŸãã
æãžã®é
ååããªå§¿å¢ãé«ããããã«ãxapianæ€çŽ¢ãšã³ãžã³ã®å ±æãã¹ãã£ã³ã°ã®å®éã®ã€ã³ã¹ããŒã«æé ãžã®ãªã³ã¯ãæäŸããŸãïŒ wiki.diphost.ru/XapianInstall
ãã€ããªã³ã³ããŒãã³ãã®ã€ã³ã¹ããŒã«ãšãPerlãPythonãRubyã®åèšèªã®ã¢ãžã¥ãŒã«ã®ã€ã³ã¹ããŒã«ããã¹ãŠå«ãŸããŠããŸãã å°ããã€çµã¿ç«ãŠããããããã°ãããç§ã®ãã¹ã¿ãŒã¯ã©ã¹ããèªè ããã¹ãã£ã³ã°äºæ¥è ãšã®å¯Ÿè©±ã¹ããŒã ãç°¡çŽ åãããã¯ãããžãŒãèªç±ã«éžæã§ããããã«ãªãããšãé¡ã£ãŠããŸãã