Enjoy the pain about Moloch

這echo出來的啥子嘛?
意思是小姐姐有自虐傾向?
可如果moloch有漢化包或翻譯文件,
小姐姐至於這麼「享受」install的過程嗎?node

 

過程都走過了,那就記錄一下吧:
1.找個Ubuntu鏡像,阿里雲鏡像不必定合適,
可能須要換清華大學開源軟件鏡像站,
選擇你的ubuntu版本,替換鏡像(配置文件是 /etc/apt/sources.list),
同時關閉防火牆:sudo ufw disable;linux

 

2.網絡有網天然好,
如果沒網則需走代理:export http_proxy=http://127.0.0.1:8000;
sudo apt-get update(或修改/etc/apt/apt.conf);git

 

3.裝ssh、git、lrzsz、nodejs@10+ 、npm@5+等;
(如:sudo apt-get install openssh-server;)github

 

4.從github上拉代碼:git clone https://github.com/aol/moloch;數據庫

 

5.安裝響應依賴編譯:./easybutton-build.sh --install,
編譯的過程較痛苦,部分依賴包比較大下載安裝容易超時,
編不過去的語句可手動執行,
(如:cd public ; wget -N https://github.com/gchq/CyberChef/releases/download/v9.16.2/CyberChef_v9.16.2.zip);npm

 

6.因爲moloch性能要求較高,
可另找一臺電腦或服務器(簡稱服務器)下載及安裝JDK:
wget http://iso.epoint.com.cn/JDK/jdk-8u65-linux-x64.rpm;rpm -ivh jdk-8u65-linux-x64.rpm;
此依賴根據linux的環境安裝;ubuntu

 

7.在服務器上下載及安裝elasticsearch:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.6.rpm;
rpm -ivh elasticsearch-5.6.6.rpm;
此依賴根據linux的環境安裝;瀏覽器

 

8.修改配置文件/etc/elasticsearch/elasticsearch.yml 中的network.host:
服務器的IP(network.host:199.199.199.199);服務器

 

9.啓動elasticsearch 服務;
重載修改過的配置文件:systemctl daemon-reload
開機啓動elasticsearch:systemctl enable elasticsearch.service
啓動elasticsearch:systemctl start elasticsearch.service網絡

 

10. 監聽服務端口(9200)是否已經啓動:
netstat -nlp |grep LISTEN

 

11.檢查elasticsearch是否正常啓動:
瀏覽器輸入:http://199.199.199.199:9200/_cat;

 

12.連ES數據庫配置初始化Moloch:
/data/moloch/bin/Configure;
配置監聽端口(如:ens33),如果多個端口可用分號隔開;
連ES數據庫,配置數據庫的ip和port;

(或修改文件/data/moloch/etc/config.ini,elasticsearch=http://199.199.199.199:9200)

 

13.初始化、升級 Elasticsearch Moloch配置:
第一次安裝初始化、或刪全部數據:/data/moloch/db/db.pl http://localhost:9200 init;
升級moloch 數據包:/data/moloch/db/db.pl http://localhost:9200 upgrade;

 

14.進行配置 make config

 

15.添加帳戶(如:新增admin帳戶,密碼是moloch):
/data/moloch/bin/moloch_add_user.sh admin "admin" moloch --admin ;

 

16.開啓全部服務
開機啓動Capture:systemctl enable molochcapture.service;
啓動Capture:systemctl start molochcapture.service;
開機啓動Viewer:systemctl enable molochviewer.service;
啓動Viewer:systemctl start molochviewer.service;

 

17. 登錄Moloch:http://192.168.18.196:8005

18.Perfect!!!start working~ ^_^ ~

相關文章
相關標籤/搜索