elasticsearch 安装 启动

下载安装包

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.3.tar.gz

解压安装

tar -zxvf elasticsearch-5.6.3.tar.gz

 

配置(elasticsearch.yml)

1、将 network.host 值修改为  0.0.0.0 ,否则只能本机通过localhost或127.0.0.1访问。

2、http.port,如不配置,默认为 9200

 

启动

/home/es/elasticsearch-5.6.3/bin/elasticsearch

启动日志

可以看到,它跟其他的节点的传输端口为9300,接受HTTP请求的端口为9200
 

测试访问

http://10.200.44.80:9200/

{
  "name" : "node-1",
  "cluster_name" : "my-application",
  "cluster_uuid" : "zwedaCRZSqmcJnwau1HUbg",
  "version" : {
    "number" : "5.6.3",
    "build_hash" : "1a2f265",
    "build_date" : "2017-10-06T20:33:39.012Z",
    "build_snapshot" : false,
    "lucene_version" : "6.6.1"
  },
  "tagline" : "You Know, for Search"
}

 

 返回展示了配置的cluster_name和name,以及安装的ES的版本等信息.

 

 

关于启动命令:

正常启动,启动日志会同步输出到控制台,关闭控制台,elasticsearch进程也同步结束。

./elasticsearch   

在后台以守护进程模式启动。

./elasticsearch -d

启动命令-可选参数:

Option                Description                                              

------                -----------                                              

-E <KeyValuePair>     Configure a setting                                      

-V, --version         Prints elasticsearch version information and exits       

-d, --daemonize       Starts Elasticsearch in the background                   

-h, --help            show help                                                

-p, --pidfile <Path>  Creates a pid file in the specified path on start        

-q, --quiet           Turns off standard ouput/error streams logging in console

-s, --silent          show minimal output                                      

-v, --verbose         show verbose output

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

猜你喜欢

转载自huangqiqing123.iteye.com/blog/2398225