驭龙入侵检测

参考链接

https://www.jianshu.com/p/6f1e49d80beb

http://blog.51cto.com/tar0cissp/2126438

0x00.安装之前的准备

服务端:

客户端:

服务器是centos7,关闭了SElinux和firewalld防火墙

vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
init 6 //重启
systemctl stop firewalld //关闭防火墙

 0x01.服务端,部署mongpdb

1.安装mongodb并启动

mkdir /var/lib/mongodb/ && mkdir /var/log/mongodb && wget https://sec.ly.com/mirror/mongodb-linux-x86_64-3.6.3.tgz && tar -xvzf mongodb-linux-x86_64-3.6.3.tgz && mongodb-linux-x86_64-3.6.3/bin/mongod --dbpath /var/lib/mongodb/ --logpath /var/log/mongodb.log --fork --bind_ip 10.30.123.153

0x02.部署es

1.安装jre

wget https://sec.ly.com/mirror/jre-8u161-linux-x64.rpm && yum -y localinstall jre-8u161-linux-x64.rpm

2.es安装包官方下载

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.8.tar.gz && tar -zxvf elasticsearch-5.6.8.tar.gz -C /opt

3.Elasticsearch不建议以root权限运行,新建一非root权限用户,-p后跟自行设定的密码

groupadd elasticsearch && useradd elasticsearch -g elasticsearch -p 123456

 4.修改文件夹以及内部文件的所属用户及组为elasticsearch:elasticsearch

chown -R elasticsearch:elasticsearch /opt/elasticsearch-5.6.8

5.启动服务

su - elasticsearch -c '/opt/elasticsearch-5.6.8/bin/elasticsearch -d'

 6.检查一下9200,9300端口是否启动

ss -antlp

问题:elasticsearch启动报错,只能监听127.0.0.1

第一步
vi /etc/secu
rity/limits.conf //修改系统环境的配置,添加下面的内容

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

修改完成后,同时使用命令修改配置

m

vi /etc/security/limits.conf //添加下面的内容
vm.ma_map_count=655360
修改完成后,使配置生效,执行如下命令:
sysctl -p

vi /etc/security/limits.d/90-nproc.conf     //修改内容如下

* soft nproc 4096

第二步 修改elasticsearch配置
vi /opt/elasticsearch-5.6.8/config/elasticsearch.yml
1.修改elasticsearch网卡配置修改为:
network.host: 0.0.0.0
2.在elasticsearch中增加如下内容:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
3.修改完成后重启elasticsearch测试elasticsearch

 7.确认ES启动成功

curl -XGET -s "http://localhost:9200/_cluster/health?pretty"
curl -XGET -s "http://127.0.0.1:9200/_cluster/health?pretty"
curl -XGET -s "http://10.30.123.153:9200/_cluster/health?pretty"

 ox03.

 

posted @ 2018-09-29 14:36  monica&  阅读(229)  评论(1编辑  收藏  举报