- 下载好elastic2.2.0,修改elasticsearch.yml,报这个错误:
问题出在空格上,需要有空格。就OK了。
2.elasticsearch不能用root启动,需要添加普通用户
[[email protected]]# groupadd elk [[email protected]]# useradd elk -g elk -p elasticsearch [[email protected]]# chown -R elk.elk elasticsearch-2.1.1 [[email protected]]# passwd elk 更改用户 elk 的密码 。 新的 密码: 无效的密码: 密码少于 8 个字符 重新输入新的 密码: passwd:所有的身份验证令牌已经成功更新。 [[email protected]]#
3.如果不是yum安装的elasticsearch,安装服务
到这里把软件下载: [[email protected] src]# pwd /usr/local/src [[email protected] src]# unzip elasticsearch-servicewrapper-master.zip //解压软件 [[email protected] src]# ll total 153708 -rw-r--r--. 1 root root 28478292 Dec 29 10:47 elasticsearch-1.7.2.tar.gz drwxr-xr-x. 3 root root 4096 Feb 14 03:02 elasticsearch-servicewrapper-master -rw-r--r--. 1 root root 2054227 Mar 17 14:10 elasticsearch-servicewrapper-master.zip -rw-r--r--. 1 root root 126857158 Dec 21 17:09 jdk-7u67-linux-x64.rpm [[email protected] src]# mv elasticsearch-servicewrapper-master/service/ /usr/local/elasticsearch-1.7.2/bin/ [[email protected] src]# //将service目录移动到 elasticsearch下面的bin目录下面去 [[email protected] service]# pwd /usr/local/elasticsearch-1.7.2/bin/service [[email protected] service]# ./elasticsearch Usage: ./elasticsearch [ console | start | stop.... ] Commands: console Launch in the current console. start Start in the background as a daemon process. stop Stop if running as a daemon or in another console. restart Stop if running and then start. condrestart Restart only if already running. status Query the current status. install Install to start automatically when system boots. remove Uninstall. dump Request a Java thread dump if running. 开始安装服务:
时间: 2024-10-11 04:19:57