这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ FACT consists of three components: frontend, database and backend. All component
There is an automated installation program supporting Ubuntu 16.04 and 18.04 host systems.

### Pre-Install

```sh
$ sudo apt-get install git
$ git clone https://github.com/fkie-cad/FACT_core.git
$ cd FACT_core
$ src/bootstrap/pre_install.sh
```

Modify *src/config/main.cfg* and *src/config/mongod.conf* to suit your needs.
Especially, you should change the mongo passwords.
The database is initialized with these passwords on first start.
Expand All @@ -52,17 +60,18 @@ Make sure that the log directory exists as well.

If you have any additional plug-ins, copy/clone them into corresponding *src/plugins/* directory.

:exclamation: **Reboot before executing the ./install.py** :exclamation:
:exclamation: **You have to do the above steps before you do anything else** :exclamation:

### Simple One System Setup
:customs: **The installation script installs a lot of dependencies that may have different licenses**

To initialize a one system setup simply run:
After reboot, you can setup an all on one system installation by entering the FACT_core directory and executing:

```sh
$ sudo apt install python3-pip git
$ ./install.py
```
:beer: **Get a drink... Installation of the dependencies might take some time...** :tea:

For more advanced setups have a look at the help function of the installer:

Expand All @@ -87,7 +96,7 @@ The script detects all installed components automatically.
$ ./start_all_installed_fact_components
```

Afterwards FACT can be accesed on <http://localhost:5000> and <https://localhost> (nginx), repspectively.
Afterwards FACT can be accessed on <http://localhost:5000> and <https://localhost> (nginx), respectively.

You can shutdown the system by pressing *Ctrl + c* or by sending a SIGTERM to the *start_all_installed_faf_components* script.

Expand All @@ -114,7 +123,7 @@ Our Developers Manual can be found [here](https://github.com/fkie-cad/FACT_core/

## Acknowledgments
This project is partly financed by [German Federal Office for Information Security (BSI)](https://www.bsi.bund.de) and others.
The FACT project and the [Malware Analysis and Storage Sytem (MASS) project](https://mass-project.github.io/) form a code and plug-in sharing alliance.
The FACT project and the [Malware Analysis and Storage System (MASS) project](https://mass-project.github.io/) form a code and plug-in sharing alliance.

## License
```
Expand Down
49 changes: 49 additions & 0 deletions src/bootstrap/pre_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env bash

FACTUSER=$(whoami)

CODENAME=$(lsb_release -cs)
if [ ${CODENAME} = 'tara' ]; then
CODENAME=bionic
elif [ ${CODENAME} = 'sarah' -o ${CODENAME} = 'serena' -o ${CODENAME} = 'sonya' -o ${CODENAME} = 'sylvia' ]; then
CODENAME=xenial
elif [ ${CODENAME} = 'rebecca' -o ${CODENAME} = 'rafaela' -o ${CODENAME} = 'rosa' ]; then
CODENAME=trusty
sudo apt-get -y install linux-image-extra-$(uname -r) linux-image-extra-virtual
fi

echo "Install Pre-Install Requirements"
sudo apt-get -y install python3-pip git

echo "Installing Docker"

# Uninstall old versions
sudo apt-get -y remove docker docker-engine docker.io

# Install packages to allow apt to use a repository over HTTPS
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common

# Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# set up the stable repository
if ! grep -q "^deb .*download.docker.com/linux/ubuntu" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $CODENAME stable"
fi

# install docker
sudo apt-get update
sudo apt-get -y install docker-ce
sudo systemctl enable docker

# add fact-user to docker group
if [ ! $(getent group "docker") ]
then
sudo groupadd docker
fi
sudo usermod -aG docker $FACTUSER

echo "Installing Python Libraries"
sudo -EH pip3 install distro

echo -e "Pre-Install-Routine complete! \033[31mPlease reboot before running install.py\033[0m"