prasadtalasila / BITS-Darshini

A Modular, Concurrent and Customizable Protocol Analyzer
GNU General Public License v3.0
5 stars 12 forks source link

install comparative tools #114

Closed prasadtalasila closed 6 years ago

prasadtalasila commented 6 years ago

We install the comparative tools such as bro, tshark and ntopng manually. We need a shell script to perform this function. The script should be named as scripts/tool-install.sh.

The existing text instructions are as follows.

To install the required software tools.

ntopng, see http://packages.ntop.org/apt-stable/ user guide https://raw.githubusercontent.com/ntop/ntopng/dev/doc/UserGuide.pdf

Wireshark, tshark apt-get install wireshark tshark

broIDS https://www.bro.org/sphinx/quickstart/index.html https://www.bro.org/sphinx/install/install.html#installing-bro https://www.bro.org/download/packages.html

while installing broIDS, you will get GPG error, to solve the problem, do
    add-apt-repository ppa:webupd8team/y-ppa-manager
    apt-get update
    apt-get install y-ppa-manager

from terminal, open y-ppa-manager
go to Advanced --> Try to import all missing GPG keys --> click OK --> close

then
    apt-get update
    apt-get install bro

Oracle JDK https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04

Tomcat7 install https://www.djamware.com/post/588df76680aca722878a364a/install-nginx-tomcat-7-and-java-8-on-ubuntu-1604 https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-7-on-ubuntu-14-04-via-apt-get http://community.bonitasoft.com/questions-and-answers/730-community-tomcat-deployment-ubuntu-help-required

BITS Darshini install https://github.com/prasadtalasila/bits-darshini/wiki

install all the npm packages for front end
    https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04
        use PPA based installation procedure to get the latest version of software

Go to src/main/webapp/WEB-INF/ and execute
    npm install

maven configuration
    apt-get install maven
    https://maven.apache.org/settings.html

Tomcat classpath error for Apache commons logs
    place apache-commons-bin directory from https://logging.apache.org/log4j/2.x/download.html at /usr/share/tomcat7/lib/apache-log4j-2.8.2-bin/
    add the following line to /usr/share/tomcat7/bin/setenv.sh
        CLASSPATH=/usr/share/tomcat7/lib/apache-log4j-2.8.2-bin/
        CLASSPATH=/usr/share/tomcat7/lib/apache-log4j-2.3-bin/
    https://stackoverflow.com/questions/17670826/adding-a-directory-to-tomcat-classpath-and-read-the-property-file-in-spring

    made modifications on
        https://stackoverflow.com/questions/9691456/log4j-spring-mvc-no-appenders-could-be-found-for-logger
prasadtalasila commented 6 years ago

@shilparaaju Once the tools are installed, we can perform a status check on the tools by using the following commands.

> cd BITS-Darshini/data/packet
> /usr/bin/time bro -r packet_data.pcap
> service ntopng stop
> /usr/bin/time ntopng --shutdown-when-done -i packet_data.pcap
> /usr/bin/time  tshark -r packet_data.pcap

All the above commands should give valid results.

prasadtalasila commented 6 years ago

@adityaketkar The bro installation was done without using PPA. Does the scripts/tool-install.sh not give any installation error?

Also the bro installation has updated installation procedure at bro install link given above. Please see if the bro installation can be updated

adityaketkar commented 6 years ago

I tried it on 2 PC's, it didn't give any error. Still, I'll confirm again and give an update.

prasadtalasila commented 6 years ago

Thanks for the confirmation about the non-occurrence PGP error.

On the bro install page, there are optional components. Please add steps to install C++ Actors Framework - website, installation steps before installing bro (between lines 14 and 15).

adityaketkar commented 6 years ago

The PGP error occurs when we try to install C++ Actors Framework. The approach mentioned above in the very first comment does not help it either. It says -> "The following signatures were invalid: KEYEXPIRED 1503492954 Data from such a repository can't be authenticated and is therefore potentially dangerous to use." I tried to use command line arguments with apt-get for skipping authentication but they dont work.

prasadtalasila commented 6 years ago

After adding the caf suse repo to apt sources, I did apt-get update. I also see the following error message.

W: GPG error: http://download.opensuse.org/repositories/devel:/libraries:/caf/xUbuntu_14.04  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3E07C084F60D5EF3
W: The repository 'http://download.opensuse.org/repositories/devel:/libraries:/caf/xUbuntu_14.04  Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Despite the error, we can successfully install the caf library. Since there is nothing we can do to fix the GPG error, lets ignore the same for the moment.

Please add the caf installation steps to tool-install.sh and send a separate PR.

prasadtalasila commented 6 years ago

The 315de3a commit solves this issue.