在官方文档中该安装方式是在debian/buster上安装测试过而已,所以我在ubuntu上安装其实稳定性还是有待考究,但是需要的包,ubuntu也并不缺少,在安装部署过程中并没有因此遇到什么问题。
sudo apt install -y python3 python3-pip python3-dev imagemagick fonts-liberation gnupg libpq-dev default-libmysqlclient-dev pkg-config libmagic-dev mime-support libzbar0 poppler-utils
sudo apt install -y unpaper ghostscript icc-profiles-free qpdf liblept5 libxml2 pngquant zlib1g tesseract-ocr
sudo apt install -y build-essential python3-setuptools python3-wheel
sudo adduser paperless --system --home /opt/paperless --group
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt update
sudo apt install -y redis
sudo systemctl enable redis-server.service
sudo apt install postgresql
paperless
sudo -u postgres psql
postgres-# create database paperless;
postgres-# create user paperless with encrypted password 'paperless';
postgres-# grant all privileges on database paperless to paperless;
curl -O -L https://github.com/paperless-ngx/paperless-ngx/releases/download/v1.10.2/paperless-ngx-v1.10.2.tar.xz
tar -xf paperless-ngx-v1.10.2.tar.xz
cp -r paperless-ngx/* /opt/paperless
paperless.conf
cd /opt/paperless
vim paperless.conf
......
# Required services
PAPERLESS_REDIS=redis://localhost:6379
PAPERLESS_DBENGINE=postgres
PAPERLESS_DBHOST=localhost
PAPERLESS_DBPORT=5432
PAPERLESS_DBNAME=paperless
PAPERLESS_DBUSER=paperless
PAPERLESS_DBPASS=paperless
#PAPERLESS_DBSSLMODE=prefer
# Paths and folders
PAPERLESS_CONSUMPTION_DIR=/opt/paperless/data
#PAPERLESS_DATA_DIR=../data
#PAPERLESS_TRASH_DIR=
#PAPERLESS_MEDIA_ROOT=../media
#PAPERLESS_STATICDIR=../static
#PAPERLESS_FILENAME_FORMAT=
#PAPERLESS_FILENAME_FORMAT_REMOVE_NONE=
# Security and hosting
#PAPERLESS_SECRET_KEY=change-me
PAPERLESS_URL=https://0.0.0.0
......
mkdir /opt/paperless/data
mkdir /opt/paperless/media
mkdir /opt/paperless/consume
sudo chown paperless:paperless /opt/paperless
sudo -Hu paperless pip3 install -r requirements.txt
cd /opt/paperless/src
sudo -Hu paperless python3 manage.py migrate
sudo -Hu paperless python3 manage.py createsuperuser
sudo -Hu paperless python3 manage.py runserver
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。