mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 05:19:40 +02:00
after first test
This commit is contained in:
parent
411fbf11dd
commit
f7921b097b
2 changed files with 70 additions and 31 deletions
39
INSTALL.md
39
INSTALL.md
|
@ -4,6 +4,30 @@ Pandora-BOX
|
|||
|
||||
Pandorabox is a USB scaning station base on Pandora
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
Install Ubuntu 22.04 server LTS
|
||||
|
||||
select (x) Ubuntu Server (minumized)
|
||||
|
||||
Choose to install OpenSSH server
|
||||
|
||||
That's all, no other packages needed
|
||||
|
||||
After reboot, login with the user create during the install and type :
|
||||
|
||||
sudo apt install git
|
||||
git clone https://github.com/dbarzin/pandora-box
|
||||
cd pandora-box
|
||||
sudo ./install.sh
|
||||
|
||||
|
||||
|
||||
|
||||
=========================================================================
|
||||
|
||||
|
||||
Mouse terminal
|
||||
---------------
|
||||
|
||||
|
@ -109,14 +133,15 @@ convert -resize 1920x1080 -background black -gravity center -extent 1920x1080 im
|
|||
AutoStart on console
|
||||
--------------------
|
||||
|
||||
cat > /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
mkdir -p /etc/systemd/system/getty@tty1.service.d
|
||||
echo "[Service]" > /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
echo "ExecStart=" >> /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
|
||||
echo "StandardInput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
echo "StandardOutput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
echo "Type=idle" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
|
||||
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-su - didier -c ./pandora-box/pandora-box.py
|
||||
StandardInput=tty
|
||||
StandardOutput=tty
|
||||
Type=idle
|
||||
|
||||
|
||||
Restert getty1
|
||||
|
|
62
install.sh
62
install.sh
|
@ -2,59 +2,60 @@
|
|||
# Install procedure for Pandora-Box
|
||||
|
||||
set -e
|
||||
|
||||
cd ..
|
||||
|
||||
# Python
|
||||
apt install -y python-is-python3 python3-pip
|
||||
|
||||
# Peotry
|
||||
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
|
||||
poetry --version
|
||||
su - $SUDO_USER -c "curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -"
|
||||
su - $SUDO_USER -c "poetry --version"
|
||||
|
||||
# REDIS
|
||||
apt-get update
|
||||
apt install build-essential tcl
|
||||
apt install -y build-essential tcl
|
||||
|
||||
git clone https://github.com/redis/redis.git
|
||||
cd redis
|
||||
git checkout 6.2
|
||||
make
|
||||
# Optionally, you can run the tests:
|
||||
make test
|
||||
# make test
|
||||
cd ..
|
||||
|
||||
chown -R $SUDO_USER redis
|
||||
|
||||
# Kvrocks
|
||||
apt-get update
|
||||
apt install gcc g++ make libsnappy-dev autoconf automake libtool googletest libgtest-dev
|
||||
apt install -y gcc g++ make libsnappy-dev autoconf automake libtool googletest libgtest-dev
|
||||
|
||||
git clone --recursive https://github.com/apache/incubator-kvrocks.git kvrocks
|
||||
cd kvrocks
|
||||
git checkout 2.0
|
||||
make -j4
|
||||
# Optionally, you can run the tests:
|
||||
make test
|
||||
# make test
|
||||
cd ..
|
||||
|
||||
chown -R $SUDO_USER kvrocks
|
||||
|
||||
# Pandora
|
||||
git clone https://github.com/pandora-analysis/pandora.git
|
||||
su - $SUDO_USER -c "git clone https://github.com/pandora-analysis/pandora.git"
|
||||
|
||||
apt install python3-dev # for compiling things
|
||||
apt install libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 # For HTML -> PDF
|
||||
apt install libreoffice-base-nogui libreoffice-calc-nogui libreoffice-draw-nogui libreoffice-impress-nogui libreoffice-math-nogui libreoffice-writer-nogui # For Office -> PDF
|
||||
apt install exiftool # for extracting exif information
|
||||
apt install unrar # for extracting rar files
|
||||
apt install 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 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
|
||||
|
||||
cd pandora
|
||||
poetry install
|
||||
su - $SUDO_USER -c "cd ~/pandora; poetry install"
|
||||
echo PANDORA_HOME="`pwd`" >> .env
|
||||
|
||||
cp config/generic.json.sample config/generic.json
|
||||
su - $SUDO_USER -c "cd ~/pandora; cp config/generic.json.sample config/generic.json"
|
||||
|
||||
# ClamAV
|
||||
apt-get install clamav-daemon
|
||||
apt-get 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)
|
||||
|
@ -77,21 +78,22 @@ for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done
|
|||
|
||||
chown -R $SUDO_USER .
|
||||
|
||||
poetry run update --yes
|
||||
su - $SUDO_USER -c "cd pandora; poetry run update --yes"
|
||||
|
||||
#---------------------
|
||||
# Pandora-box
|
||||
#---------------------
|
||||
|
||||
# Python libraries
|
||||
pip install psutil pyudev
|
||||
su - $SUDO_USER -c "pip install pypandora psutil pyudev"
|
||||
|
||||
# Quarantine folder
|
||||
mkdir /var/quarantine
|
||||
mkdir -p /var/quarantine
|
||||
chown $SUDO_USER /var/quarantine
|
||||
|
||||
# Mouse terminal
|
||||
apt install imagemagick pmount
|
||||
# ImageMagick and pmount
|
||||
apt --fix-broken install -y
|
||||
apt install -y imagemagick pmount
|
||||
|
||||
# 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
|
||||
|
@ -103,6 +105,18 @@ usermod -a -G video $SUDO_USER
|
|||
usermod -a -G input $SUDO_USER
|
||||
|
||||
# Start Poetry at boot
|
||||
echo "su - $USER -c \"cd /home/$USER/pandora ; poetry run update --yes\" 2>&1 >storage/pandora.log" >> /etc/rc.local
|
||||
echo "su - $SUDO_USER -c \"cd /home/$SUDO_USER/pandora ; poetry run start\" 2>&1 >storage/pandora.log" > /etc/rc.local
|
||||
chmod +x /etc/rc.local
|
||||
|
||||
# getty1 autostart
|
||||
mkdir -p /etc/systemd/system/getty@tty1.service.d
|
||||
echo "[Service]" > /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
echo "ExecStart=" >> /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
|
||||
echo "StandardInput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
echo "StandardOutput=tty" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
echo "Type=idle" >> /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||
|
||||
reboot
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue