{"id":3795,"date":"2018-11-09T14:19:14","date_gmt":"2018-11-09T13:19:14","guid":{"rendered":"http:\/\/nil2.kis.fri.uniza.sk\/?p=3795"},"modified":"2019-02-23T21:02:14","modified_gmt":"2019-02-23T20:02:14","slug":"moloch-installation","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/moloch-installation\/","title":{"rendered":"Moloch &#8211; Installation"},"content":{"rendered":"<ul>\n<li><strong>Authors<\/strong> : Tom\u00e1\u0161 Moko\u0161, Marek Brodec<\/li>\n<li><strong>Tested version<\/strong> : 0.20.0<\/li>\n<li><strong>Operating system<\/strong> : Ubuntu 14.04.5<\/li>\n<\/ul>\n<p>Note: this guide is obsolete, for a more up-to-date version visit <a href=\"https:\/\/nil.uniza.sk\/en\/moloch-v1-7-0-installation\/\">Moloch v1.7.0 \u2013 Installation<\/a><\/p>\n<p>Installation of Moloch is no trivial matter, that is why we have prepared this guide on how to set up the system in cloud environment. The server obtains an IP address dynamically through DHCP, therefore no editing of the interface configuration file is required.<\/p>\n<p>First add Java repositories and install the Java package.<\/p>\n<pre><code>add-apt-repository ppa:webupd8team\/java \napt-get install oracle-java8-installer \n<\/code><\/pre>\n<p>Install additional necessary packages.<\/p>\n<pre><code>apt-get install wget curl libpcre3-dev uuid-dev libmagic-dev pkg-config g++ flex bison zlib1g-dev libffi-dev gettext libgeoip-dev make libjson-perl libbz2-dev libwww-perl libpng-dev xz-utils libffi-dev \n<\/code><\/pre>\n<p>Download Node.js, version 6.x is recommended, since version 8.x is not currently supported.<\/p>\n<pre><code>curl -sL https:\/\/deb.nodesource.com\/setup_6.x | sudo -E bash \u2013 \nsudo apt-get install -y nodejs \n<\/code><\/pre>\n<p>Download and install Elasticsearch.<\/p>\n<pre><code>wget https:\/\/artifacts.elastic.co\/downloads\/elasticsearch\/elasticsearch-5.5.3.deb\nsudo dpkg -i elasticsearch-5.5.3.deb\n<\/code><\/pre>\n<p>Copy Moloch to your server.<\/p>\n<pre><code>git clone https:\/\/github.com\/aol\/moloch.git \n<\/code><\/pre>\n<p>Install using the available script.<\/p>\n<pre><code>.\/easybutton-build.sh \n<\/code><\/pre>\n<p>Previous versions required editing of firewall rules.<\/p>\n<pre><code>iptables -A INPUT -m tcp -p tcp --dport 8005 -j ACCEPT \niptables -A INPUT -m udp -p udp --dport 8005 -j ACCEPT \niptables -A OUTPUT -m tcp -p tcp --sport 8005 -j ACCEPT \niptables -A OUTPUT -m udp -p udp --sport 8005 -j ACCEPT \niptables -A INPUT -m tcp -p tcp --dport 9200 -j ACCEPT \niptables -A INPUT -m udp -p udp --dport 9200 -j ACCEPT \nsudo su -c 'iptables-save &gt; \/etc\/iptables\/rules.v4' \n<\/code><\/pre>\n<p>The following commands will install other necessary files for capture host and configure the listening interface of the system. When asked whether to install Elasticsearch choose <strong>no<\/strong>, since you have already installed Elasticsearch earlier and this script offers only the demo version.<\/p>\n<pre><code>make install \nmake config \n<\/code><\/pre>\n<p>Go to the Viewer directory, update Node.js and run account creation script.<\/p>\n<pre><code>cd \/data\/moloch\/viewer \nnpm update \n\/data\/moloch\/bin\/moloch_add_user.sh admin \"Admin User\" PASSWORD --admin \n<\/code><\/pre>\n<p>Create symlink in Viewer directory.<\/p>\n<pre><code>ln -sf \/usr\/bin\/nodejs node \n<\/code><\/pre>\n<p>Start the individual components.<\/p>\n<pre><code>service elasticsearch start \nservice molochcapture start\nservice molochviewer start\n<\/code><\/pre>\n<p>Provided you have done everything right so far, you should be able to access the web interface at <a href=\"http:\/\/IPADDRESSOFINTERFACE:8005\">http:\/\/IPADDRESSOFINTERFACE:8005<\/a><\/p>\n<h3><a id=\"Sources_68\"><\/a>Sources:<\/h3>\n<ul>\n<li><a href=\"https:\/\/github.com\/aol\/moloch\">Github<\/a> Information about Moloch<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Authors : Tom\u00e1\u0161 Moko\u0161, Marek Brodec Tested version : 0.20.0 Operating system : Ubuntu 14.04.5 Note: this guide is obsolete, for a more up-to-date version visit Moloch v1.7.0 \u2013 Installation Installation of Moloch is no trivial matter, that is why we have prepared this guide on how to set up the system in cloud environment&#8230;.<\/p>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[872],"tags":[884,886],"class_list":["post-3795","post","type-post","status-publish","format-standard","hentry","category-network-security-moloch-en","tag-installation-of-moloch","tag-moloch-installation"],"taxonomy_info":{"category":[{"value":872,"label":"Moloch"}],"post_tag":[{"value":884,"label":"installation of Moloch"},{"value":886,"label":"Moloch installation"}]},"featured_image_src_large":false,"author_info":{"display_name":"Tom\u00e1\u0161 Moko\u0161","author_link":"https:\/\/nil.uniza.sk\/en\/author\/tomas-mokos\/"},"comment_info":3,"category_info":[{"term_id":872,"name":"Moloch","slug":"network-security-moloch-en","term_group":0,"term_taxonomy_id":870,"taxonomy":"category","description":"","parent":707,"count":14,"filter":"raw","cat_ID":872,"category_count":14,"category_description":"","cat_name":"Moloch","category_nicename":"network-security-moloch-en","category_parent":707}],"tag_info":[{"term_id":884,"name":"installation of Moloch","slug":"installation-of-moloch","term_group":0,"term_taxonomy_id":882,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":886,"name":"Moloch installation","slug":"moloch-installation","term_group":0,"term_taxonomy_id":884,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/3795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=3795"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/3795\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=3795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=3795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=3795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}