From 8662e0d7bb32bc09cfedf319ded390387bbb8e33 Mon Sep 17 00:00:00 2001 From: Didier Date: Wed, 8 Nov 2023 14:43:29 +0000 Subject: [PATCH 1/5] fix install script --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index bff84b3..1657229 100755 --- a/install.sh +++ b/install.sh @@ -85,9 +85,10 @@ chown -R $SUDO_USER kvrocks #--------------------- # Pandora #--------------------- -if [! -d "kvrocks" ]; +if [ ! -d "pandora" ]; then - su - $SUDO_USER -c "git clone https://github.com/pandora-analysis/pandora.git" + git clone https://github.com/pandora-analysis/pandora.git + chown -R $SUDO_USER pandora fi # fix broken packages @@ -107,9 +108,8 @@ apt install -y rsyslog cron # log logging apt autoremove -y # set .env -cd /home/$SUDO_USER/pandora +cd pandora echo PANDORA_HOME="`pwd`" >> .env -chown $SUDO_USER .env su - $SUDO_USER -c "cd ~/pandora; poetry install" su - $SUDO_USER -c "cd ~/pandora; cp config/generic.json.sample config/generic.json" From 691c94a7f07b3ce27c5a67bb0d420b6338f8ebad Mon Sep 17 00:00:00 2001 From: Didier Date: Wed, 8 Nov 2023 14:50:02 +0000 Subject: [PATCH 2/5] increase minimal disk size --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 633010b..8509ae9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,7 +4,7 @@ Pandora-BOX Host ---- -CORE i5 - 4G RAM - 20G disk +CORE i5 - 4G RAM - 30G disk Installation ------------ From 369b0cbbaff5dad7daca88070673532c70d16939 Mon Sep 17 00:00:00 2001 From: Didier Date: Sat, 11 Nov 2023 12:15:34 +0000 Subject: [PATCH 3/5] fix install --- install.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index 1657229..c6004ca 100755 --- a/install.sh +++ b/install.sh @@ -64,8 +64,8 @@ chown -R $SUDO_USER redis #--------------------- # Kvrocks #--------------------- -apt-get update -apt install -y gcc g++ make libsnappy-dev autoconf automake libtool googletest libgtest-dev +sudo apt-get update +sudo apt install -y git gcc g++ make cmake autoconf automake libtool python3 libssl-dev if [ -d "kvrocks" ]; then @@ -73,11 +73,9 @@ if [ -d "kvrocks" ]; else git clone --recursive https://github.com/apache/incubator-kvrocks.git kvrocks cd kvrocks - git checkout 2.0 + git checkout 2.6 fi -make -j4 -# Optionally, you can run the tests: -# make test +./x.py build cd .. chown -R $SUDO_USER kvrocks @@ -95,13 +93,15 @@ fi apt-get install --fix-broken -y # install packages -apt install -y python3-dev # for compiling things -apt install -y libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 # For HTML -> PDF -apt install -y libreoffice-base-nogui libreoffice-calc-nogui libreoffice-draw-nogui libreoffice-impress-nogui libreoffice-math-nogui libreoffice-writer-nogui # For Office -> PDF -apt install -y exiftool # for extracting exif information -apt install -y unrar # for extracting rar files -apt install -y libxml2-dev libxslt1-dev antiword unrtf poppler-utils pstotext tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig # for textract -apt install -y rsyslog cron # log logging +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 pstotext 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 + apt install -y rsyslog cron # log logging # autoremove old stuff @@ -121,7 +121,7 @@ su - $SUDO_USER -c "cp ~/pandora/config/logging.json.sample ~/pandora/config/log su - $SUDO_USER -c "pip install yara-python" # ClamAV -apt-get install -y clamav-daemon +apt-get install -y dhparm 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) @@ -139,7 +139,7 @@ dpkg --ignore-depends=libssl0.9.8 -i cav-linux_x64.deb wget http://cdn.download.comodo.com/av/updates58/sigs/bases/bases.cav -O /opt/COMODO/scanners/bases.cav # Configure workers -# su - $SUDO_USER -c 'cd pandora; for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done' +su - $SUDO_USER -c 'cd pandora; for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done' # Update Pandora su - $SUDO_USER -c 'cd pandora; ../.local/bin/poetry run update --yes' From 3eb06099c2844657e1ee08d475db3c6270f3d24c Mon Sep 17 00:00:00 2001 From: Didier Barzin Date: Mon, 13 Nov 2023 12:57:20 +0100 Subject: [PATCH 4/5] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c6004ca..e69a002 100755 --- a/install.sh +++ b/install.sh @@ -121,7 +121,7 @@ su - $SUDO_USER -c "cp ~/pandora/config/logging.json.sample ~/pandora/config/log su - $SUDO_USER -c "pip install yara-python" # ClamAV -apt-get install -y dhparm clamav-daemon +apt-get install -y hdparm 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) From e86dfb35f6c7ad1fc22e8f998f6b8597cfd0440b Mon Sep 17 00:00:00 2001 From: Didier Barzin Date: Thu, 16 Nov 2023 15:04:22 +0100 Subject: [PATCH 5/5] fix test on create /media/box folder --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e69a002..a25d2f5 100755 --- a/install.sh +++ b/install.sh @@ -176,7 +176,7 @@ cd /home/$SUDO_USER/pandora-box su - $SUDO_USER -c "pip install pypandora psutil pyudev" # create /media/box folder -if [ -d "/media/box" ]; +if [ ! -d "/media/box" ]; then echo "Create /media/box folder." mkdir /media/box