facebook twitter hatena line email

Linux/Elasticsearchインストール

提供: 初心者エンジニアの簡易メモ
2015年5月20日 (水) 03:17時点における127.0.0.1 (トーク)による版 (ページの作成:「==javaインストール== yum install java-1.7.0-openjdk-devel.x86_64 ==elastic本体DL== cd /usr/local/src wget https://download.elastic.co/elasticsearch/elasticsea...」)

(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内検索

javaインストール

yum install java-1.7.0-openjdk-devel.x86_64

elastic本体DL

cd /usr/local/src
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.2.tar.gz
tar zxvf elasticsearch-1.5.2.tar.gz
cd elasticsearch-1.5.2

プラグインインストール

bin/plugin -install elasticsearch/elasticsearch-analysis-kuromoji/2.1.0
bin/plugin -install elasticsearch/marvel/latest
bin/plugin -install polyfractal/elasticsearch-inquisitor
bin/plugin -install mobz/elasticsearch-head

elasticsearchサービスインストール

curl -L http://github.com/elasticsearch/elasticsearch-servicewrapper/tarball/master | tar -xz
mv *servicewrapper*/service bin/
rm -rf *servicewrapper*
bin/service/elasticsearch install

起動

/etc/init.d/elasticsearch start

自動起動

/sbin/chkconfig elasticsearch on
/sbin/chkconfig --list | grep elasticsearch

実行確認

$ curl localhost:9200
{
 "status" : 200,
 "name" : "Trapster",
 "cluster_name" : "elasticsearch",
 "version" : {
   "number" : "1.5.2",
   "build_hash" : "62ff9868b4c8a0c45860bebb259e21980778ab1c",
   "build_timestamp" : "2015-04-27T09:21:06Z",
   "build_snapshot" : false,
   "lucene_version" : "4.10.4"
 },
 "tagline" : "You Know, for Search"
}

参考

http://createfield.com/CentOS%E3%81%ABElasticsearch%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95