1.elasticsearch需要安装jdk1.7以上
2.在ubuntu下不能以root运行,需要建立专门账号
添加组
1 root@ubuntu:~/Downloads/elasticsearch-2.4.2/bin# sudo groupadd elastic
添加用户
1 root@ubuntu:~/Downloads/elasticsearch-2.4.2/bin# sudo useradd elastic -g elastic -p wozuishuai
将elasticsearch所在目录的操作权限给新建的用户
1 root@ubuntu:~# cd /opt 2 root@ubuntu:/opt# chown -R elastic:elastic ~/Downloads/elasticsearch-2.4.2
运行elasticsearch
1 root@ubuntu:~/Downloads/elasticsearch-2.4.2# su elastic 2 elastic@ubuntu:/home/wuhailong/Downloads/elasticsearch-2.4.2$ ./bin/elasticsearch