linux安装elasticsearch
程序员文章站
2022-05-27 22:14:49
环境: centOS7 Elasticsearch-6.6.1 JDK8 准备: jdk下载地址:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html elasticsearch下载地 ......
环境:
centos7 elasticsearch-6.6.1 jdk8
准备:
jdk下载地址:
elasticsearch下载地址:
安装:
jdk安装:
1.删除自带的jdk
java -version
rpm -qa | grep java
yum -y remove ***
2.安装
mkdir /usr/jdk tar -xvf jdk-8u112-linux-x64.tar.gz /usr/jdk
3.配置环境变量
vim /etc/profile
添加如下内容
export java_home=/usr/jdk/jdk1.8.0_112
export path=$java_home/bin:$path
export classpath=.:$java_home/lib/dt.jar:$java_home/lib/tools.jar
保存退出,是配置生效
source /etc/profile
4.查看是否安装成功
java -version
elasticsearch安装
1.解压并拷贝
tar -zxvf elasticsearch-6.6.1.tar.gz
mv elasticsearch-6.6.1 /usr/local/src/elasticsearch
2.创建用户和用户组
groupadd elasticsearch useradd elasticsearch -g elasticsearch chown -r elasticsearch:elasticsearch /usr/local/elasticsearch
3.创建数据文件和日志文件
mkdir /data/es/{data,logs,work} -p
chown -r /data/es
4.修改elasticsearch配置文件
cluster.name: es-cluster node.name: node-1 network.host: 192.168.227.130 http.port: 9200 transport.tcp.port: 9300 node.master: true node.data: true #path.conf: /usr/local/src/elasticsearch/conf path.data: /data/es/data #path.work: /data/es/work path.logs: /data/es/logs discovery.zen.ping.unicast.hosts: ["192.168.227.130:9300", "192.168.227.131:9300", "192.168.227.132:9300"] discovery.zen.minimum_master_nodes: 1 http.cors.enabled: true http.cors.allow-origin: "*"
5.启动
cd /usr/local/src/elasticsearch/bin ./elasticsearch -d
6.查看是否启动成功
[root@bogon bin]# curl http://192.168.227.130:9200 { "name" : "node-1", "cluster_name" : "es-cluster", "cluster_uuid" : "iflcurw-se-u9-njsb9a_g", "version" : { "number" : "6.6.1", "build_flavor" : "default", "build_type" : "tar", "build_hash" : "1fd8f69", "build_date" : "2019-02-13t17:10:04.160291z", "build_snapshot" : false, "lucene_version" : "7.6.0", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "you know, for search" }
上一篇: PMM Client 安装异常报错
下一篇: 大数据---Ranger-1
推荐阅读
-
Vero WorkNC 2016/2017中文安装破解教程(附许可文件)
-
vray3.4 for sketchup 2017 64位渲染器安装图文教程、破解方法
-
思维导图XMind 8 Pro安装教程及Update破解补丁破解方法(附序列号)
-
IIS6.0+PHP5.x+MySQL5.x+Zend3.0x+GD+phpMyAdmin2.8x通用安装实例(已经完成)
-
无法使用pip命令安装python第三方库的原因及解决方法
-
解决Python安装后pip不能用的问题
-
PHP 5.0 Pear安装方法
-
vue-cli安装使用流程步骤详解
-
Python安装与基本数据类型教程详解
-
Python2.7.10以上pip更新及其他包的安装教程