centos6 搭建 参考

https://www.cnblogs.com/php-linux/p/8758788.html

搭建linux虚拟机

https://www.cnblogs.com/php-linux/p/5262077.html

E:\>cd vbox

E:\vbox>cd es

E:\vbox\es>vagrant box add es centos7.base.vbox
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'es' (v0) for provider:
box: Unpacking necessary files from: file://E:/vbox/es/centos7.base.vbox
box:
==> box: Successfully added box 'es' (v0) for 'virtualbox'! E:\vbox\es>vagrant init es
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant. 编辑Vagratnfile Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 22, host: 2222, id: "ssh", disabled: "true"
config.vm.network "forwarded_port", guest: 22, host: 5510 config.vm.box = "lnmp" config.vm.network "private_network", ip: "192.168.55.10" config.vm.synced_folder "e:/www", "/www" config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end end 启动 E:\vbox\es>vagrant up
==> vagrant: A new version of Vagrant is available: 2.2.9 (installed version: 2.2.6)!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'es'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: es_default_1593735236199_15492
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
default: 29324 (guest) => 29324 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
[default] GuestAdditions 6.0.14 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /www => E:/www
default: /vagrant => E:/vbox/es
==> default: Starting notify-forwarder ...
default: Notify-forwarder: guest listening for file change notifications on 0.0.0.0:29324.
==> default: Notify-forwarder: Unsupported host operating system

vagrant ssh

修改root密码
sudo passwd root

  

1 安装jdk

具体看 http://www.cnblogs.com/php-linux/p/8757783.html

2 下载 elasticsearch7.2

链接:https://pan.baidu.com/s/10Y8bBlHNEgLMMBQwMOiKCg
提取码:gvwc

后面基本和ceontos6安装一样 ,除了 会报错 说是要求java11  上面安装的是java8   解决方法   https://www.cnblogs.com/php-linux/p/13228710.html

3 解压

unzip elasticsearch-6.2.3.zip

4 移动

mv elasticsearch-6.2.3 /usr/local/es

5 启动

提示不能以root用户执行

useradd es  
passwd es

为es用户添加sudo权限

visudo

找到root 复制后改为es

再次启动

估计是权限问题

sudo chmod 777 -R /usr/local/es

再启动

访问 http

 查看ip地址

访问

http://192.168.33.30:9200/

提示无法访问

vim /usr/local/es/config/elasticsearch.yml

 

再次重启

[1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]

解决:切换到root用户,编辑limits.conf 添加类似如下内容

vi /etc/security/limits.conf

添加如下内容:

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

[2]: max number of threads [1024] for user [es] is too low, increase to at least [4096]

解决:切换到root用户,进入limits.d目录下修改配置文件。

vi /etc/security/limits.d/90-nproc.conf

修改如下内容:

* soft nproc 1024

#修改为

* soft nproc 4096

[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决:切换到root用户修改配置sysctl.conf

vi /etc/sysctl.conf

添加下面配置:

vm.max_map_count=655360

并执行命令:

sysctl -p

[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

重启es 异常

ERROR: [1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
修改
elasticsearch.yml
取消注释保留一个节点
cluster.initial_master_nodes: ["node-1"]
这个的话,这里的node-1是上面一个默认的记得打开就可以了

最终终于启动了

访问ip

最新文章

  1. 一些Titanium学习的地方
  2. chrome中怎么避免最小字体只能为12px
  3. Linux实现ftp账号同时访问两个目录方法
  4. Ruby on Rails Tutorial 第二章 之 微博资源
  5. python【第三篇】函数
  6. 初次了解CSS3
  7. HDU 5224 Tom and paper(最小周长)
  8. Ubuntu下用NdisWrapper安装网卡驱动
  9. ThreadPoolExecutor系列<一、ThreadPoolExecutor 机制>
  10. 【树状数组】BZOJ3132 上帝造题的七分钟
  11. Vue初学跳坑
  12. 安卓Android基础第五天
  13. 让mysql监听ipv4
  14. java之动态代理
  15. 给eclipse设置自动补全的步骤
  16. App架构师实践指南一之App基础语法
  17. windows7 64位下git和tortoisegit的安装和使用
  18. mongodb cmd 常用命令
  19. BFS+状态压缩DP+二分枚举+TSP
  20. week3-栈和队列

热门文章

  1. oracle之二归档日志
  2. xss的变形--如何绕过xss过滤
  3. vue父子组件状态同步的最佳方式续章(v-model篇)
  4. 如何借助 IDEA 数据库管理工具可视化使用 TDengine?
  5. 线上问题排查-HBase写数据出现NotServingRegionException(Region ... is not online)异常
  6. IHttpClientFactory组件使用
  7. hystrix文档翻译之开始使用
  8. SpringBoot框架:配置文件application.properties和application.yml的区别
  9. Python练习题 002:奖金计算
  10. 上部:问道 | R语言数据分析(北京邮电大学)自整理笔记