-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3.deps_install.sh
86 lines (70 loc) · 2.95 KB
/
3.deps_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
# VALKEY INSTALL
sudo apt-get update -y
sudo apt install -y build-essential tcl
git clone https://github.com/valkey-io/valkey.git
cd valkey
git checkout 8.0
make
# Optionally, you can run the tests:
make test
cd ..
# KVROCKS INSTALL
sudo apt-get update -y
sudo apt install -y git gcc g++ make cmake autoconf automake libtool python3 libssl-dev
git clone --recursive https://github.com/apache/kvrocks.git kvrocks
cd kvrocks
git checkout 2.10
./x.py build
cd ..
# OTHERS DEPS
sudo apt install -y python3-dev # for compiling things
sudo apt install -y libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 # For HTML -> PDF
sudo apt install -y libreoffice-nogui # For Office -> PDF
sudo apt install -y exiftool # for extracting exif information
sudo apt install -y unrar # for extracting rar files
sudo apt install -y libxml2-dev libxslt1-dev antiword unrtf poppler-utils tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig # for textract
sudo apt install -y libssl-dev # seems required for yara-python
sudo apt install -y libcairo2-dev # Required by reportlab
# sudo add-apt-repository ppa:libreoffice/ppa
# sudo apt-get update -y
# sudo apt-get install -y libreoffice
#PANDORA INSTALL
git clone https://github.com/pandora-analysis/pandora.git
cd pandora # if you're not already in the directory
## NEED VENV
python3 -m venv ~/venv # CREATE VENV
source ~/venv/bin/activate # ENTER IN VENV
pip install -U pip setuptools
pip install poetry
poetry install
echo PANDORA_HOME="`pwd`" >> .env
poetry run python tools/3rdparty.py
cp config/generic.json.sample config/generic.json
#ANTIVIRUS INSTALL
sudo apt install -y clamav-daemon
# In order for the module to work, you need the signatures.
# Running the command "freshclam" will do it but if the script is already running
# (it is started by the systemd service clamav-freshclam)
# You might want to run the commands below:
sudo systemctl stop clamav-freshclam.service # Stop the service
sudo freshclam # Run the signatures update
sudo systemctl start clamav-freshclam.service # Start the service so we keep getting the updates
sudo systemctl enable clamav-freshclam.service # Enable at startup
sudo service clamav-daemon start
#COMMODO INSTALL
cd
wget https://download.comodo.com/cis/download/installs/linux/cav-linux_x64.deb
sudo dpkg --ignore-depends=libssl0.9.8 -i cav-linux_x64.deb
sudo wget http://cdn.download.comodo.com/av/updates58/sigs/bases/bases.cav -O /opt/COMODO/scanners/bases.cav
#WORKERS CONF
cd pandora
for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done
#APPARMOR INSTALL
sudo apt install apparmor-utils # Installs utils for apparmor
sudo sed -i '/profile libreoffice-soffice /usr/lib/libreoffice/program/soffice.bin {/a\owner @{HOME}/pandora/tasks/** rwk,' /etc/apparmor.d/usr.lib.libreoffice.program.soffice.bin && aa-enforce /etc/apparmor.d/usr.lib.libreoffice*
# Update and launch
poetry run update --yes
# START OR STOP PANDORA
# poetry run start
# poetry run stop