注:ES有执行脚本的能力,因安全因素,不能在root用户下运行,强行运行会报如下错误:
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root 解决方案:
groupadd es #增加es组
useradd es -g es -p pwd #增加es用户并附加到es组
chown -R es:es elasticsearch-5.1.1 #给目录权限
su es #使用es用户
./bin/elasticsearch -d #后台运行es
外网访问
vi conf/elasticsearch.yml
修改network.host: 0.0.0.0 再次启动linux可能出现如下类似错误
bootstrap checks failed
max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536] 解决方案
1、vi /etc/sysctl.conf
设置fs.file-max=655350
保存之后sysctl -p使设置生效
2、vi /etc/security/limits.conf 新增
* soft nofile 655350
* hard nofile 655350
3、重新使用SSH登录,再次启动elasticsearch即可。
外网访问:serverip:9200/
xz –d node-v6.9.2-linux-x64.tar.xz
tar –xvf node-v6.9.2-linux-x64.tar
mv node-v6.9.2-linux-x64 /alidata/app/node
vim /etc/profile
export NODE_HOME=/alidata/app/node
export PATH=$PATH:$NODE_HOME/bin
source /etc/profile
# node –v
v6.9.2
# npm –v
3.10.9
4、安装grunt
cd elasticsearch-head-master
npm install -g grunt --registry=https://registry.npm.taobao.org
5、测试一下
cd elasticsearch-head-master
grunt
出现以下提示,为Gruntfile.js引用的,缺少以下包
>> Local Npm module "grunt-contrib-clean" not found. Is it installed?
>> Local Npm module "grunt-contrib-concat" not found. Is it installed?
>> Local Npm module "grunt-contrib-watch" not found. Is it installed?
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
>> Local Npm module "grunt-contrib-copy" not found. Is it installed?
>> Local Npm module "grunt-contrib-jasmine" not found. Is it installed?
Warning: Task "connect:server" not found. Use --force to continue.