Open ScottWei007 opened 7 years ago
注意:不能使用root角色启动elasticsearch
下载: sudo wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.1.tar.gz
比较 SHA: sudo sha1sum elasticsearch-5.4.1.tar.gz
解压: sudo tar -xzf elasticsearch-5.4.1.tar.gz
进入目录: cd elasticsearch-5.4.1
给目录权限: sudo chown q2872869434 /usr/elasticsearch/elasticsearch-5.4.1 -R
修改java内存(elasticsearch默认2g): sudo vi elasticsearch-5.4.1/config/jvm.options
设置软连接(elasticsearch找不到java): sudo ln -s /usr/java/jdk1.8.0_131/bin/java /usr/bin/java
运行(不能用root角色)后端进程: ./bin/elasticsearch -d -p pid
测试,有json字符串说明ok : curl 'http://localhost:9200/?pretty'
关闭: kill cat pid
cat pid
外部连接 添加elasticsearch.yml中的: network.bind_host:0.0.0.0
12.. nofile大小不够添加 /etc/security/limits.conf中的: q2872869434- nofile 65536
https://gryzli.info/2018/03/30/elasticsearch-installation-how-to/
注意:不能使用root角色启动elasticsearch
下载: sudo wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.1.tar.gz
比较 SHA: sudo sha1sum elasticsearch-5.4.1.tar.gz
解压: sudo tar -xzf elasticsearch-5.4.1.tar.gz
进入目录: cd elasticsearch-5.4.1
给目录权限: sudo chown q2872869434 /usr/elasticsearch/elasticsearch-5.4.1 -R
修改java内存(elasticsearch默认2g): sudo vi elasticsearch-5.4.1/config/jvm.options
设置软连接(elasticsearch找不到java): sudo ln -s /usr/java/jdk1.8.0_131/bin/java /usr/bin/java
运行(不能用root角色)后端进程: ./bin/elasticsearch -d -p pid
测试,有json字符串说明ok : curl 'http://localhost:9200/?pretty'
关闭: kill
cat pid
外部连接 添加elasticsearch.yml中的: network.bind_host:0.0.0.0
12.. nofile大小不够添加 /etc/security/limits.conf中的: q2872869434- nofile 65536
https://gryzli.info/2018/03/30/elasticsearch-installation-how-to/