Hang a shining have been good step to step to go from a successful ado
# ## install java runtime environment
elasticsearch is run elasticsearch Java implementation must be supported so you must first install jre jre
Can refer https://www.cnblogs.com/renxixao/p/11462752.html
# ## elasticsearch-6.2.4 installed
After decompression start elasticsearch
[root@localhost ~]# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.tar.gz [root@localhost ~]# tar -zxvf elasticsearch-6.2.4.tar.gz -C /usr/local/
[root@localhost ~]# sh /usr/local/elasticsearch-6.2.4/bin/elasticsearch
Found incorrect report
5.0 Starting elasticsearch improve the security level is not allowed to start using the root account so we want to add a user to start elasticsearch
Before you start off delay things first firewall
[root @ localhost ~ ] # systemctl STOP firewalld.service [root @ localhost ~] # systemctl disable firewalld.service // disable the firewall boot [root @ localhost ~] # useradd es // create es user [root @ localhost ~] chown -R & lt es #: es / usr / local / elasticsearch- 6.2 . . 4 /// the directory permissions given to the user es [the root @ localhost ~] # SU es // switch to the user es [es @ localhost root] $ vi / usr / local / elasticsearch- 6.2 . . 4 /config/elasticsearch.yml
To the host address of the machine
Remember to delete and then perform in front of comment # sh /usr/local/elasticsearch-6.2.4/bin/elasticsearch
Sh execution error may occur in several cases after /usr/local/elasticsearch-6.2.4/bin/elasticsearch
Note: The following operations must switch to the root execution
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
/Etc/security/limits.conf modify the file at the end of file add the following
[es@localhost root]$ su root
[root@localhost~]# vi /etc/security/limits.conf
* Hard nofile 65536
* Soft nofile 65536
[2]: max number of threads [3818] for user [es] is too low, increase to at least [4096]
[root@localhost ~]# vi /etc/security/limits.d/20-nproc.conf
* soft nproc 4096
* hard nproc 4096
root soft nproc unlimited
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
/etc/sysctl.conf file is added at the end of vm.max_map_count = 2621441
[root @ localhost ~] # vi / etc / the sysctl.conf [root @ localhost ~] # sudo sysctl -p /etc/sysctl.conf // take effect immediately
These three are three common mistakes the rest of your own Baidu
[root@localhost ~]# ulimit -a
After the discovery of the current maximum number of threads for the 3818 panic or restart a virtual machine to reboot to take effect
Then switch to user-initiated es
[root @ localhost ~ ] # es su [es @ localhost root] $ SH / usr / local / elasticsearch- 6.2 . 4 / bin / elasticsearch -d // add -d is to start background process [es @ localhost root] $ ps -ef | grep elasticsearch under the certification service is functioning properly HTTP curl: // 192.168.88.133:9200
The instructions for configuring OK out
under the browser requests http://192.168.88.133:9200/