YUMã§ä¸çºãjubatusã§ææ¸åé¡
jubatus å
¥ããã¨ã大è¦æ¨¡ãªãªã³ã©ã¤ã³æ©æ¢°å¦ç¿ãã§ãããããã§ãã
ã ãã©ãå
¥ããã®ããã©ãã§ãããä¾åé¢ä¿ã¨ãã ããã
ã ããã yum ã£ã¨ãã¾ããã
(ãã¹ãç¨VMãªã©ã«å
¥ãã¦éãã§ãã ããã)
RHEL5äºæã»ã»ã»ã¤ã¾ããcentos5ç³»ã¨ãã ã¨ã以ä¸3è¡ãã³ããã°å ¥ãã¾ãã
rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm rpm -Uvh http://rtilabs.net/files/repos/yum/rh/5/x86_64/rtilabs-release-1-0.noarch.rpm yum install --enablerepo=rtilabs jubatus jubatus-python-client
OR
RHEL6äºæã»ã»ã»ã¤ã¾ããcentos6ç³»?ã¨ã Scientific Linux 6ç³» ã ã¨ã以ä¸2è¡ãã³ããã°å ¥ãã¾ãã
rpm -Uvh http://rtilabs.net/files/repos/yum/rh/6/x86_64/rtilabs-release-1-0.noarch.rpm yum install --enablerepo=rtilabs jubatus jubatus-python-client
以ä¸ãç°¡åã§ããã
注æ:ç¾å¨ hadoop-zookeeper-server ã¯å ¥ãã¾ãããå ¥ããã人ã¯èªåã§ã©ããã zookeeper-libã¯å ¥ãã¾ãã
åä½ãã¹ãããã公式のチュートリアルサンプルãã³ãããã¦å
¥ãã¦ãã ããã
(注æ:centos5ç³»ã§ã¯ã pythinã¯ã python26 ã¨ãããã¨ã)
èªåã§å¦ç¿ãã¼ã¿ç¨ãã¡ã¤ã«ã¨ãä½ããªãã¨ãããªãã®ãã ããã§ãããææ
¢ãã¦ä½ãã¾ãã
ã§ããã£ã¦ããã¨ã print classifier.clear() ã£ã¦æã§è½ã¡ã¾ãã
[root@localhost ~]# python26 test.py -s localhost:9181 -n tutorial {'converter': {'num_filter_types': {}, 'num_rules': [], 'string_types': {}, 'num_filter_rules': [], 'string_filter_types': {'detag': {'pattern': '<[^>]*>', 'method': 'regexp', 'replace': ''}}, 'string_rules': [{'sample_weight': 'bin', 'type': 'space', 'global_weight': 'bin', 'key': 'message-detagged'}], 'num_types': {}, 'string_filter_rules': [{'type': 'detag', 'suffix': '-detagged', 'key': 'message'}]}, 'method': 'PA'} Traceback (most recent call last): File "test.py", line 63, in <module> print classifier.clear() AttributeError: Classifier instance has no attribute 'clear'
ã§ããããã³ã¡ã³ãã¢ã¦ãããã¨ãã¾ãåãã¾ãã
print classifier.clear() â #print classifier.clear()
ä¸æè°ã§ããã
(ãã£ããé
åçãªã½ãããªãã ãããããã¡ãã£ã¨ãµã³ãã«ã¤ããã°ããã®ã«ããã)
RPMとSRPMはご自由にã
(/usr/lib64/ ã«å¼·å¼ã«æ¼ãè¾¼ãã§ãã specã§ããã©ããã)
ããã¾ã§ä½ã£ã¦ãããè¦ã¤ããw ï¼ï¼ ï¼¾oï¼¾ ï¼ï¼¼ ãªãã¦ãã£ãã
https://github.com/odasatoshi/jubatus-installer
ããã¯ãã
ãã£ããã ããjubatusããã«ããã¦ã¿ã¾ãããã
ããã¯ããã®ããªãã½ã®ééå³ã®ä¸ã¤ã§ãã
#src.rpmããã«ãåºæ¥ãç°å¢ãä½ãã yum install rpm-build yum-utils #ã³ã³ãã¤ã©ãªã©ä¸å¼ãå ¥ãã¾ãã yum groupinstall "Development Tools" #src.rpmãè½ã¨ãã¦ããã yumdownloader --enablerepo=rtilabs --source jubatus #ã½ã¼ã¹ããã±ã¼ã¸ãå ¥ããã rpm -i ~/jubatus-0.1.1-1.el6.x86_64.rpm #ã½ã¼ã¹ãå±éãããå ´æã«ç§»åããã #RHEL5㯠/usr/src/redhat/SPEC/ ã®ä¸ cd ~/rpmbuild/SPECS ãã«ããããã®ã§ããããã®åã«ä¾åããã±ã¼ã¸ãå ¥ãã¾ãã yum install --enablerepo=rtilabs msgpack-devel zookeeper-devel ãã£ã¨ããã«ããã¦ã¿ã¾ãã rpmbuild -bb jubatus.spec ã§ãã¾ãã!(ããã±ã¼ã¸ãã)
åãã¡ã¤ã«ã®å ´æä¸è¦§
å ´æ | RHEL6 | RHEL5 |
ããã±ã¼ã¸ | ~/rpmbuild/RPMS/x86_64/ | /usr/src/redhat/RPMS/x86_64/ |
ã½ã¼ã¹ããã±ã¼ã¸ | ~/rpmbuild/SRPMS/ | /usr/src/redhat/SRPMS/ |
ãã«ããã£ã¬ã¯ã㪠| ~/rpmbuild/BUILD/ | /usr/src/redhat/BUILD/ |
SPEC | ~/rpmbuild/SPEC/ | /usr/src/redhat/SPEC/ |
ã½ã¼ã¹ãå¤æ´ãã¦éã³ããå ´åã¯ã ~/rpmbuild/BUILD/jubatus-jubatus-e4b843f/ ã«ãã¡ã¤ã«ãããããããã㧠waf ãã¾ãããã
cd ~/rpmbuild/BUILD/jubatus-jubatus-e4b843f/ vim ....ã½ã¼ã¹ãé©å½ã«æ¸ãæãã¦ã¿ã .... ./waf ./waf install å¤æ´ãããã¤ããªãå®è¡!! (ãã¡ãã¡installããªãã¦ãå®è¡ã§ãããã ãã»ã»ã»)
ENJOY!