mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 13:29:42 +02:00
fix install
This commit is contained in:
parent
423bb54729
commit
422be55474
1 changed files with 30 additions and 38 deletions
48
install.sh
48
install.sh
|
@ -46,20 +46,16 @@ su - $SUDO_USER -c "poetry --version"
|
||||||
#---------------------
|
#---------------------
|
||||||
apt install -y build-essential tcl pkg-config
|
apt install -y build-essential tcl pkg-config
|
||||||
|
|
||||||
if [ -d "valkey" ];
|
if [ ! -d "valkey" ]; then
|
||||||
then
|
|
||||||
cd valkey
|
|
||||||
else
|
|
||||||
git clone https://github.com/valkey-io/valkey.git
|
git clone https://github.com/valkey-io/valkey.git
|
||||||
cd valkey
|
cd valkey
|
||||||
git checkout 8.0
|
git checkout 8.0
|
||||||
make -j 4
|
make -j 4
|
||||||
|
# Optionally, you can run the tests:
|
||||||
|
# make test
|
||||||
|
cd ..
|
||||||
|
chown -R $SUDO_USER valkey
|
||||||
fi
|
fi
|
||||||
# Optionally, you can run the tests:
|
|
||||||
# make test
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
chown -R $SUDO_USER valkey
|
|
||||||
|
|
||||||
#---------------------
|
#---------------------
|
||||||
# Kvrocks
|
# Kvrocks
|
||||||
|
@ -67,25 +63,19 @@ chown -R $SUDO_USER valkey
|
||||||
apt-get update
|
apt-get update
|
||||||
apt install -y git gcc g++ make cmake autoconf automake libtool python3 libssl-dev
|
apt install -y git gcc g++ make cmake autoconf automake libtool python3 libssl-dev
|
||||||
|
|
||||||
if [ -d "kvrocks" ];
|
if [ ! -d "kvrocks" ]; then
|
||||||
then
|
|
||||||
cd kvrocks
|
|
||||||
else
|
|
||||||
git clone --recursive https://github.com/apache/incubator-kvrocks.git kvrocks
|
git clone --recursive https://github.com/apache/incubator-kvrocks.git kvrocks
|
||||||
cd kvrocks
|
cd kvrocks
|
||||||
git checkout 2.10
|
git checkout 2.10
|
||||||
./x.py build
|
./x.py build
|
||||||
|
cd ..
|
||||||
|
chown -R $SUDO_USER kvrocks
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
chown -R $SUDO_USER kvrocks
|
|
||||||
|
|
||||||
#---------------------
|
#---------------------
|
||||||
# Pandora
|
# Pandora
|
||||||
#---------------------
|
#---------------------
|
||||||
if [ ! -d "pandora" ];
|
if [ ! -d "pandora" ]; then
|
||||||
then
|
|
||||||
git clone https://github.com/pandora-analysis/pandora.git
|
git clone https://github.com/pandora-analysis/pandora.git
|
||||||
chown -R $SUDO_USER pandora
|
chown -R $SUDO_USER pandora
|
||||||
fi
|
fi
|
||||||
|
@ -99,7 +89,7 @@ apt install -y libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 # For HTML -> PDF
|
||||||
apt install -y libreoffice-nogui # For Office -> PDF
|
apt install -y libreoffice-nogui # For Office -> PDF
|
||||||
apt install -y exiftool # for extracting exif information
|
apt install -y exiftool # for extracting exif information
|
||||||
apt install -y unrar # for extracting rar files
|
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 libxml2-dev libxslt1-dev antiword unrtf poppler-utils tesseract-ocr flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig # for textract
|
||||||
apt install -y libssl-dev # seems required for yara-python
|
apt install -y libssl-dev # seems required for yara-python
|
||||||
apt install -y libcairo2-dev # Required by reportlab
|
apt install -y libcairo2-dev # Required by reportlab
|
||||||
|
|
||||||
|
@ -119,7 +109,7 @@ su - $SUDO_USER -c "cd ~/pandora; cp config/generic.json.sample config/generic.j
|
||||||
su - $SUDO_USER -c "cp ~/pandora/config/logging.json.sample ~/pandora/config/logging.json"
|
su - $SUDO_USER -c "cp ~/pandora/config/logging.json.sample ~/pandora/config/logging.json"
|
||||||
|
|
||||||
# install yara-python
|
# install yara-python
|
||||||
su - $SUDO_USER -c "pip install yara-python"
|
apt install -y python3-yara
|
||||||
|
|
||||||
# ClamAV
|
# ClamAV
|
||||||
apt-get install -y hdparm clamav-daemon
|
apt-get install -y hdparm clamav-daemon
|
||||||
|
@ -173,8 +163,14 @@ echo '0 20 * * * /sbin/poweroff' >> /etc/crontab
|
||||||
#---------------------
|
#---------------------
|
||||||
cd /home/$SUDO_USER/pandora-box
|
cd /home/$SUDO_USER/pandora-box
|
||||||
|
|
||||||
|
# FIM, pmount, psmisc (for killall), vim and pipx
|
||||||
|
apt --fix-broken install -y
|
||||||
|
apt install -y fim pmount psmisc vim
|
||||||
|
|
||||||
# Python libraries
|
# Python libraries
|
||||||
su - $SUDO_USER -c "pip install pypandora psutil pyudev"
|
su - $SUDO_USER -c "python3 -m venv /home/$SUDO_USER/python"
|
||||||
|
su - $SUDO_USER -c "python3/bin/pip install pypandora psutil pyudev"
|
||||||
|
|
||||||
|
|
||||||
# create /media/box folder
|
# create /media/box folder
|
||||||
if [ ! -d "/media/box" ];
|
if [ ! -d "/media/box" ];
|
||||||
|
@ -189,10 +185,6 @@ fi
|
||||||
mkdir -p /var/quarantine
|
mkdir -p /var/quarantine
|
||||||
chown $SUDO_USER /var/quarantine
|
chown $SUDO_USER /var/quarantine
|
||||||
|
|
||||||
# FIM, pmount, psmisc (for killall) and vim
|
|
||||||
apt --fix-broken install -y
|
|
||||||
apt install -y fim pmount psmisc vim
|
|
||||||
|
|
||||||
# Suppress all messages from the kernel (and its drivers) except panic messages from appearing on the console.
|
# Suppress all messages from the kernel (and its drivers) except panic messages from appearing on the console.
|
||||||
echo "kernel.printk = 3 4 1 3" | tee -a /etc/sysctl.conf
|
echo "kernel.printk = 3 4 1 3" | tee -a /etc/sysctl.conf
|
||||||
# Set Permanently ulimit -n / open files in ubuntu
|
# Set Permanently ulimit -n / open files in ubuntu
|
||||||
|
@ -253,8 +245,8 @@ echo "ExecStart=-/sbin/agetty --autologin pandora --noclear %I $TERM" >> /etc/sy
|
||||||
# echo "ExecStart=-su - pandora -c ./pandora-box/pandora-box.py" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
# echo "ExecStart=-su - pandora -c ./pandora-box/pandora-box.py" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||||
|
|
||||||
# Start pandora from bashrc
|
# Start pandora from bashrc
|
||||||
echo "export PATH=\"\$HOME/.local/bin:{\$PATH}\"" >> /home/$SUDO_USER/.bashrc
|
echo "PATH=\"\$HOME/python/bin:\$PATH\"" >> /home/$SUDO_USER/.profile
|
||||||
echo "exec pandora-box/pandora-box.py" >> /home/$SUDO_USER/.bashrc
|
#echo "exec python3 pandora-box/pandora-box.py" >> /home/$SUDO_USER/.bashrc
|
||||||
|
|
||||||
# Copy ini file
|
# Copy ini file
|
||||||
su - $SUDO_USER -c "cp ~/pandora-box/pandora-box.ini.curses ~/pandora-box/pandora-box.ini"
|
su - $SUDO_USER -c "cp ~/pandora-box/pandora-box.ini.curses ~/pandora-box/pandora-box.ini"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue