安装及部署

一、环境配置

操作系统:Cent OS 7
ElasticSearch版本:1.3.2
JDK版本:1.7.0_51
SSH Secure Shell版本:XShell
5
elasticsearch-servicewrapper :ES的服务插件,一般在linux上使用。

二、操作过程

1、下载指定版本的ElasticSearch

进入安装目录,并通过curl命令下载elasticsearch压缩包文件:

cd
/usr/local/logdeal
命令:
curl -L -O
https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.3.2.zip

2、解压elasticsearch压缩文件

通过unzip命令解压elasticsearch压缩文件,这里没有指定目标目录,默认当前目录。

unzip elasticsearch-1.3.2.zip

3、修改elasticsearch.yml配置信息

主要针对集群、节点、端口等配置,目前我只修改了cluster.name和http.port两项,具体请参考
elasticsearch 配置详解

 cluster.name
################################### Cluster ################################### # Cluster name identifies your cluster for auto-discovery. If you're running
# multiple clusters on the same network, make sure you're using unique names.
#
#修改
cluster.name: elastic181deallog
http.port
# Set a custom port to listen for HTTP traffic:
#
#修改
http.port:

4、启动、关闭elasticsearch实例

  • 启动实例命令

cd /usr/local/logdeal/elasticsearch-1.3.2/bin

nohup /usr/local/logdeal/elasticsearch-1.3.2/bin/elasticsearch &

  • 测试elasticsearch是否启动成功

浏览器输入地址http://192.168.1.181:9100/,返回一下结果代表正常启动

{
"status" : ,
"name" : "Shingen Harada",
"version" : {
"number" : "1.3.2",
"build_hash" : "dee175dbe2f254f3f26992f5d7591939aaefd12f",
"build_timestamp" : "2014-08-13T14:29:30Z",
"build_snapshot" : false,
"lucene_version" : "4.9"
},
"tagline" : "You Know, for Search"
}
  • 关闭实例命令

ps -aux|grep
elasticsearch-1.3.2-deal-log
kill -9 #pid

5、安装Elasticsearch service wrapper插件

为了将Elasticsearch安装成一个Linux系统服务,将使用Elasticsearch
service
wrapper,你可以从https://github.com/elasticsearch/elasticsearch-servicewrapper下载。
将解压后的service目录拷贝到elasticsearch目录的bin目录下。

  • 启动Elasticsearch实例

在linux环境,进入ES目录的bin/service目录,运行命令sh elasticsearch
start

  • 关闭Elasticsearch实例

在linux环境,进入ES目录的bin/service目录,运行命令nohup sh elasticsearch stop
&

  • Elasticsearch service
    wrapper命令集
Usage: elasticsearch [ console | start | stop | restart | condrestart | status | install | remove | dump ]

Commands:
console Launch in the current console.
start Start in the background as a daemon process.
stop Stop if running as a daemon or in another console.
restart Stop if running and then start.
condrestart Restart only if already running.
status Query the current status.
install Install to start automatically when system boots.
remove Uninstall.
dump Request a Java thread dump if running.

6、安装head插件

Elasticsearch-head是一个elasticsearch的集群管理工具,它是完全由html5编写的独立网页程序,你可以通过插件把它集成到es。

  • 安装

进入elasticsearch/bin目录,输入命令./plugin --install mobz/elasticsearch-head 安装head插件。

  • 测试

在浏览器中输入http://192.168.1.181:9100/_plugin/head/如能访问则ES启动成功。

最新文章

  1. centos 6.5 安装django
  2. Maven命令行使用:mvn clean install(安装)
  3. bzoj 1065: [NOI2008] 奥运物流
  4. [2014.01.27]wfPrintOcx 票据打印控件 v5.3
  5. <<Exceptional C++>> notes
  6. theano中的dimshuffle
  7. [PAT]数列求和(20)
  8. [转]C#中的?和??
  9. BZOJ 1079: [SCOI2008]着色方案 记忆化搜索
  10. js学习--DOM操作详解大全 前奏(认识DOM)
  11. 关于NSURL的一些属性的记录
  12. 数据库操作封装类 DBHelper.cs
  13. Highcharts使用手册
  14. 高效C++规划
  15. top.location != self.location
  16. 归纳篇(一)CSS的position定位和float浮动
  17. HTML常用特殊字符编码对照表以及其对应英文
  18. ftp 发布配置
  19. Metadata获取的三种方式
  20. HTTP 错误 500.19 - Internal Server Error v4.0.30319

热门文章

  1. bzoj 3124: [Sdoi2013]直径
  2. oracle生成行方法
  3. C语言程序设计第一次作业
  4. Eclipse for php + Xdebug搭建PHP的调试环境
  5. 实现Android4.4系统设置分页滑动浏览功能
  6. WCF 服务器调用回调函数 单程-双程操作模式:(待补充Demo)
  7. spring整合hibernate配置文件
  8. 多线程、多进程、协程、缓存(memcache、redis)
  9. HTML5实战——svg学习
  10. 龙威零式_团队项目例会记录_18 (Beta架构讨论)