linux 单机安装 Elasticsearch6.0.0 详细步骤以及问题解决方案
2017-11-16 10:38
671 查看
1.JDK版本必须1.8以上
安装jdk过程省略2.下载 Elasticsearch6.0.0安装包
下载地址3.安装ES
3.1将下载好的tar包上传到服务器/opt目录下
3.2解压安装包
cd /opttar -zxvf elasticsearch-6.0.0.tar.gz
3.3创建ES用户和组(创建es用户组及es用户),因为不允许使用root用户执行;所以这里需要创建单独的用户去执行ES 文件;命令如下:
groupaddes
useradd
es -g es
chown -R es:es elasticsearch-6.0.0
su - es
3.4 修改ES配置文件,使用cd命令进入到config 文件下,执行 vi elasticsearch.yml 命令,一定要拷贝文件中已经注释的例子,自己手写会报错的
,我这里只是修改IP
#network.host: 192.168.0.1network.host: 192.168.2.71
3.5 执行ES文件,进入到bin 目录下执行 ./elasticsearch 命令就可以了,执行 ./elasticesrarch -d 是后台运行
启动日志在/opt/elasticsearch-6.0.0/logs这个目录下查看日志报如下错误:
3.6 修改系统配置
3.6.1 max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536] 意思是说你的进程不够用了
解决方案: 切到root 用户:进入到security目录下的limits.conf;执行命令 vim /etc/security/limits.conf 在文件的末尾添加下面的参数值:* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
3.6.2 max number of threads [1024] for user [es] is too low, increase to at least [4096]
解决方案: 切到root 用户:执行命令 vi /etc/security/limits.d/90-nproc.conf 修改1024为4096:* soft nproc 4096
root soft nproc unlimited
3.6.3 max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] 需要修改系统变量的最大值了
解决方案:切换到root用户修改配置/etc/sysctl.conf 增加配置值: vm.max_map_count=655360执行命令 sysctl -p 这样就可以了
[root@mycatcluster04 ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
vm.max_map_count = 655360
3.6.4 system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
问题原因:因为Centos6不支持SecComp,而ES5.2.1默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。详见 :https://github.com/elastic/elasticsearch/issues/22899解决方法:在elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
3.7 再次登录服务器,保证修改后的配置生效,然后启动ES。
[es@mycatcluster04 ~]$ curl -XGET 'http://192.168.2.71:9200'{
"name" : "3ZMDmZI",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "QMkXf8sRQQOeF281C-8yvA",
"version" : {
"number" : "6.0.0",
"build_hash" : "8f0685b",
"build_date" : "2017-11-10T18:41:22.859Z",
"build_snapshot" : false,
"lucene_version" : "7.0.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
[es@mycatcluster04 ~]$
相关文章推荐
- linux 安装 Elasticsearch5.6.x 详细步骤以及问题解决方案
- linux(centOS6) 安装Mysql 5.6.19数据库步骤、 问题以及相应的解决办法
- linux安装java的步骤以及问题解决
- Linux 使用rpm方式安装最新mysql(5.7.16)步骤以及常见问题解决
- 总结:linux下安装mplayer详细步骤和问题解决
- kali4.9 64位系统2017版本安装w3af详细步骤以及遇到的问题解决方法
- Linux 使用rpm方式安装最新mysql(5.7.16)步骤以及常见问题解决
- WIN7下安装Oracle 10g 的详细过程以及有关问题的解决(转)
- 总结用cygwin+eclipse+NDK编译hellojni的详细步骤,以及所遇到问题的解决方法
- 转:linux下svn服务器搭建以及相关问题解决方案
- linux下oracle的安装与卸载及相关问题解决方案
- linux下oracle的安装与卸载及相关问题解决方案
- linux安装oracle 11g r2 详细步骤及问题
- linux安装oracle 11g r2 详细步骤及问题
- Linux-CentOS安装N卡驱动以及解决屏幕亮度不可调问题
- linux下oracle的安装与卸载及相关问题解决方案
- Linux下SVN的安装与配置及相关问题解决方案
- tftp服务器的安装、启用以及完全正确步骤安装后未出现提示的问题解决
- linux下oracle的安装与卸载及相关问题解决方案
- Vmware 6.0.0 build-45731 在 Linux 2.6.X 安装 VmTools 的问题的解决方法