龙空技术网

CentOS7 如何部署elasticsearch

海阔凭鱼跃,天高任鸟飞! 288

前言:

今天我们对“centos7fuser不能用”大致比较关心,兄弟们都需要了解一些“centos7fuser不能用”的相关文章。那么小编同时在网上搜集了一些有关“centos7fuser不能用””的相关资讯,希望各位老铁们能喜欢,咱们一起来了解一下吧!

下载

elasticsearch-6.8.13.tar.gz

kibana-6.8.13-linux-x86_64.tar.gz

tar -zxvf elasticsearch-6.8.13.tar.gz
tar -zxvf kibana-6.8.13-linux-x86_64.tar.gz

一、设置内核参数

vi /etc/sysctl.conf

1、增加以下参数

vm.max_map_count=655360

2、执行以下命令确保配置生效

sysctl -p

二、设置资源参数

vi /etc/security/limits.conf

1、修改如下

* soft nofile 65536

* hard nofile 65536

* soft nproc 4096

* hard nproc 4096

三、设置用户资源参数

vi /etc/security/limits.d/90-nproc.conf

# 设置所有用户参数

* soft nproc 4096

四、设置访问主机

1、使用root用户,打开elasticsearch.yml文件

vi /www/ES/elasticsearch-6.8.13/config/elasticsearch.yml

2、文件内增加如下代码

http.port: 9200network.host: 127.0.0.1bootstrap.memory_lock: falsebootstrap.system_call_filter: falsexpack.security.enabled: truexpack.security.transport.ssl.enabled: true

* 启用Elasticsearch安全特性

xpack.security.enabled: true

xpack.security.transport.ssl.enabled: true

3、设置内置用户密码

./elasticsearch-setup-passwords interactive

修改密码命令如下:

curl -H "Content-Type:application/json" -XPOST -u elastic '; -d '{ "password" : "mos8555" }'

五、添加用户

1、添加es用户

useradd es

2、添加es用户密码

passwd es

3、将文件夹elasticsearch-6.8.13赋予es权限

chown -R es:es /www/ES/elasticsearch-6.8.13

4、切换为es用户

su es

5、进入bin目录

cd /www/ES/elasticsearch-6.8.13/bin

5、启动es

./elasticsearch -d

6、启动成功了,我们在使用一个窗口登录root用户,输入命令:

curl -X GET

六、后台启动es

./elasticsearch -d

七、查找es进程

ps -ef|grep elastic

杀es进程

kill -9 1302

八、启动kibana

1、ES工具kibana目录

/www/ES/kibana-6.8.13-linux-x86_64

编辑配置文件 vi /www/ES/kibana-6.8.13-linux-x86_64/config/kibana.yml

server.port: 9601server.host: "10.0.1.192"elasticsearch.hosts: [";]i18n.locale: "zh-CN"elasticsearch.username: "elastic"elasticsearch.password: "mos"

2、启动ES工具

su root 切换到root用户

切换到es工具目录

cd /www/ES/kibana-6.8.13-linux-x86_64/bin

3、后台启动es工具

nohup ./kibana &

4、浏览器访问

5、kibana重启

ps -ef|grep kibana

ps -ef|grep 9601

都找不到

尝试 使用 fuser -n tcp 9601

kill -9 PID

ps -ef|grep node 或 netstat -anltp|grep 5601

标签: #centos7fuser不能用