mirror of https://github.com/MISP/misp-modules
Fixing Install.md
parent
33f858fe97
commit
d7bf9e4df8
|
@ -1,31 +1,37 @@
|
||||||
## How to install and start MISP modules (in a Python virtualenv)?
|
## How to install and start MISP modules (in a Python virtualenv)?
|
||||||
|
|
||||||
~~~~bash
|
~~~~bash
|
||||||
|
SUDO_WWW="sudo -u www-data"
|
||||||
|
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
git \
|
git \
|
||||||
libpq5 \
|
libpq5 \
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
tesseract-ocr \
|
tesseract-ocr \
|
||||||
libpoppler-cpp-dev \
|
libpoppler-cpp-dev \
|
||||||
imagemagick virtualenv \
|
imagemagick virtualenv \
|
||||||
libopencv-dev \
|
libopencv-dev \
|
||||||
zbar-tools \
|
zbar-tools \
|
||||||
libzbar0 \
|
libzbar0 \
|
||||||
libzbar-dev \
|
libzbar-dev \
|
||||||
libfuzzy-dev
|
libfuzzy-dev
|
||||||
# With virtualenv: sudo -u www-data virtualenv -p python3 /var/www/MISP/venv
|
|
||||||
|
# BEGIN with virtualenv:
|
||||||
|
$SUDO_WWW virtualenv -p python3 /var/www/MISP/venv
|
||||||
|
# END with virtualenv
|
||||||
|
|
||||||
cd /usr/local/src/
|
cd /usr/local/src/
|
||||||
sudo git clone https://github.com/MISP/misp-modules.git
|
sudo git clone https://github.com/MISP/misp-modules.git
|
||||||
cd misp-modules
|
cd misp-modules
|
||||||
|
|
||||||
# BEGIN with virtualenv:
|
# BEGIN with virtualenv:
|
||||||
sudo -u www-data /var/www/MISP/venv/bin/pip install -I -r REQUIREMENTS
|
$SUDO_WWW /var/www/MISP/venv/bin/pip install -I -r REQUIREMENTS
|
||||||
sudo -u www-data /var/www/MISP/venv/bin/pip install .
|
$SUDO_WWW /var/www/MISP/venv/bin/pip install .
|
||||||
# END with virtualenv
|
# END with virtualenv
|
||||||
|
|
||||||
# BEGIN without virtualenv:
|
# BEGIN without virtualenv:
|
||||||
pip install -I -r REQUIREMENTS
|
sudo pip install -I -r REQUIREMENTS
|
||||||
pip install .
|
sudo pip install .
|
||||||
# END without virtualenv
|
# END without virtualenv
|
||||||
|
|
||||||
# Start misp-modules as a service
|
# Start misp-modules as a service
|
||||||
|
@ -40,6 +46,7 @@ sudo systemctl enable --now misp-modules
|
||||||
As of this writing, the official RHEL repositories only contain Ruby 2.0.0 and Ruby 2.1 or higher is required. As such, this guide installs Ruby 2.2 from the SCL repository.
|
As of this writing, the official RHEL repositories only contain Ruby 2.0.0 and Ruby 2.1 or higher is required. As such, this guide installs Ruby 2.2 from the SCL repository.
|
||||||
|
|
||||||
~~~~bash
|
~~~~bash
|
||||||
|
SUDO_WWW="sudo -u apache"
|
||||||
sudo yum install \
|
sudo yum install \
|
||||||
rh-ruby22 \
|
rh-ruby22 \
|
||||||
openjpeg-devel \
|
openjpeg-devel \
|
||||||
|
@ -52,13 +59,12 @@ sudo yum install \
|
||||||
poppler-cpp-devel \
|
poppler-cpp-devel \
|
||||||
python-devel \
|
python-devel \
|
||||||
redhat-rpm-config
|
redhat-rpm-config
|
||||||
|
|
||||||
cd /usr/local/src/
|
cd /usr/local/src/
|
||||||
git clone https://github.com/MISP/misp-modules.git
|
sudo git clone https://github.com/MISP/misp-modules.git
|
||||||
cd misp-modules
|
cd misp-modules
|
||||||
sudo -u apache /usr/bin/scl enable rh-python36 "virtualenv -p python3 /var/www/MISP/venv"
|
$SUDO_WWW /usr/bin/scl enable rh-python36 "virtualenv -p python3 /var/www/MISP/venv"
|
||||||
sudo -u apache /var/www/MISP/venv/bin/pip install -U -I -r REQUIREMENTS
|
$SUDO_WWW /var/www/MISP/venv/bin/pip install -U -I -r REQUIREMENTS
|
||||||
sudo -u apache /var/www/MISP/venv/bin/pip install -U .
|
$SUDO_WWW /var/www/MISP/venv/bin/pip install -U .
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
Create the service file /etc/systemd/system/misp-modules.service :
|
Create the service file /etc/systemd/system/misp-modules.service :
|
||||||
|
@ -120,6 +126,12 @@ services:
|
||||||
misp-modules:
|
misp-modules:
|
||||||
# https://hub.docker.com/r/dcso/misp-dockerized-misp-modules
|
# https://hub.docker.com/r/dcso/misp-dockerized-misp-modules
|
||||||
image: dcso/misp-dockerized-misp-modules:3
|
image: dcso/misp-dockerized-misp-modules:3
|
||||||
|
|
||||||
|
# Local image:
|
||||||
|
#image: misp-modules
|
||||||
|
#build:
|
||||||
|
# context: docker/
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
# Redis
|
# Redis
|
||||||
REDIS_BACKEND: misp-redis
|
REDIS_BACKEND: misp-redis
|
||||||
|
|
Loading…
Reference in New Issue