Volumio + Django

nguyennamdsn | Feb. 25, 2022, 11:11 p.m.

Lưu ý trong lúc cài đặt có thể bị đầy /tmp, cách xử lý là reboot rồi cài đặt tiếp

1, Sửa apt source list

sudo nano /etc/apt/sources.list deb

cat /etc/apt/sources.list deb

#deb http://legacy.raspbian.org/raspbian/ buster main contrib non-free rpi

# Uncomment line below then 'apt-get update' to enable 'apt-get source'

#deb-src http://legacy.raspbian.org/raspbian/ buster main contrib non-free rpi

#deb http://archive.raspberrypi.org/debian/ jessie main ui



deb http://deb.debian.org/debian bullseye main contrib non-free

deb http://security.debian.org/debian-security bullseye-security main contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free

# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'

#deb-src http://deb.debian.org/debian bullseye main contrib non-free

#deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free

#deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free


2, cài đặt các package cần thiết

sudo apt-get update -y

sudo apt-get upgrade -y

sudo apt full-upgrade -y


sudo apt-get install cron -y

sudo apt-get install gcc python3-dev musl-dev -y

sudo apt-get install libjpeg-dev zlib1g-dev -y

sudo apt-get install libssl-dev -y

sudo apt-get install openssl -y

sudo apt install python3-pip -y

sudo apt-get install libpq-dev python-dev

sudo apt install vim




3, Cài đặt thư viện cần thiết

python3 -m pip install --upgrade pip

python3 -m pip install --upgrade Pillow

pip install dj-database-url

pip install django-allauth==0.45.0

pip install django-crispy-forms==1.13.0

pip install oauthlib==3.1.1

pip install gunicorn==20.1.0

pip install requests-oauthlib==1.3.0

pip install asgiref==3.4.1

pip install cloudinary==1.27.0

pip install dj-database-url==0.5.0

pip install dj3-cloudinary-storage==0.0.6

pip install Django==3.2.9

pip install django-crispy-forms==1.13.0

pip install django-summernote==0.8.20.0

pip install gunicorn==20.1.0

pip install oauthlib==3.1.1

pip install PyJWT==2.3.0

pip install python3-openid==3.2.0

pip install pytz==2021.3

pip install requests-oauthlib==1.3.0

pip install sqlparse==0.4.2

pip install psycopg2==2.9.1

$$$$ pip list

asgiref                3.4.1

bleach                 4.1.0

certifi                2018.8.24

cffi                   1.15.0

chardet                3.0.4

charset-normalizer     2.0.12

cloudinary             1.27.0

cryptography           36.0.1

defusedxml             0.7.1

dj-database-url        0.5.0

dj3-cloudinary-storage 0.0.6

Django                 3.2.9

django-allauth         0.45.0

django-crispy-forms    1.13.0

django-summernote      0.8.20.0

gunicorn               20.1.0

idna                   2.6

oauthlib               3.1.1

packaging              21.3

Pillow                 9.0.1

pip                    22.0.3

pycparser              2.21

PyJWT                  2.3.0

pyparsing              3.0.7

python3-openid         3.2.0

pytz                   2021.3

requests               2.27.1

requests-oauthlib      1.3.0

setuptools             52.0.0

six                    1.12.0

sqlparse               0.4.2

urllib3                1.24.1

webencodings           0.5.1

wheel                  0.34.2


5, cài đặt thời gian

sudo systemctl stop systemd-timesyncd.service

sudo systemctl start systemd-timesyncd.service

sudo systemctl status systemd-timesyncd.service

sudo vi /etc/systemd/timesyncd.conf

sudo systemctl daemon-reload

cat /etc/systemd/timesyncd.conf


mount nas: vers=1.0



0
0

Leave a comment:

Comments: