Cov txheej txheem:

DIY Raspberry Pi Downloadbox: 4 Cov Kauj Ruam
DIY Raspberry Pi Downloadbox: 4 Cov Kauj Ruam

Video: DIY Raspberry Pi Downloadbox: 4 Cov Kauj Ruam

Video: DIY Raspberry Pi Downloadbox: 4 Cov Kauj Ruam
Video: Raspberry Pi CM4 (delidding or scalping) 2024, Hlis ntuj nqeg
Anonim
DIY Raspberry Pi Downloadbox
DIY Raspberry Pi Downloadbox
DIY Raspberry Pi Downloadbox
DIY Raspberry Pi Downloadbox
DIY Raspberry Pi Downloadbox
DIY Raspberry Pi Downloadbox

Koj puas pom koj tus kheej rub tawm cov ntawv loj xws li tsos, torrents, chav kawm, TV series, thiab lwm yam ces koj los rau qhov yog lawm. Hauv Cov Lus Qhia no, peb yuav tig peb Raspberry Pi xoom rau hauv lub tshuab rub tawm. Uas tuaj yeem rub tawm ib yam dab tsi los ntawm ib tus nias hosters, Youtube cov vis dis aus, games, torrents, txhua yam uas muaj nyob hauv is taws nem.

Qhov zoo tshaj plaws yog tias peb tuaj yeem khiav Raspberry Pi xoom 24/7 thiab txawm tias teem sijhawm rub tawm raws li xav tau. Txij li thaum Pi khiav tsuas yog 5v peb tuaj yeem ua kom nws muaj zog ntawm lub txhab nyiaj uas yog li ua kom ntseeg tau tias peb rub tawm tsis tau tso tseg.

Txhua yam khawv koob no muaj peev xwm ua tau vim yog lub software muaj zog hu ua Pyload, thiab yog, koj twv nws raug nws yog raws Python. Pyload txhawb ntau txoj cai xws li HTTP, FTP thiab ntxiv rau. Nws muaj qhov huv huv web interface. Pyload tseem muaj nws tus kheej cov neeg siv khoom txawb rau Android thiab iOS. Qhov no tso cai rau saib xyuas tau yooj yim thiab tswj koj cov rub tawm.

Khoom siv:

Yog li rau cov kho vajtse peb xav tau Raspberry Pi (pom tseeb), Kuv siv Pi zero w, vim nws yog qhov pheej yig tshaj, tab sis txoj hauv kev no tuaj yeem ua tiav siv ib qho raspberry pi. Peb kuj xav tau 5v MicroUSB Fais fab mov, lub xov tooj them lub xov tooj ib txwm yuav ua haujlwm thiab rau kev khaws cia, peb xav tau daim npav micro SD. Nov yog kuv siv 8 GB SDcard, koj yuav xav xaiv daim npav muaj peev xwm siab dua yog tias koj npaj siab yuav khaws cov ntawv rub tawm ntawm SDcard lossis Koj tseem tuaj yeem txuas USB flash drive los khaws cov ntawv rub tawm. Nws yog txhua tus kheej xaiv.

Kauj ruam 1: Txhim kho Raspbian

Txhim kho Raspbian
Txhim kho Raspbian

Tam sim no rub tawm qhov tseeb Raspbian lite thiab nyem nws mus rau micro SDcard, Kuv nyiam siv cov cuab yeej pub dawb hu ua Etcher rau lub hom phiaj no.

Txij li thaum peb tab tom yuav teeb tsa lub taub hau peb yuav tsum tau ua qee qhov chaw ntxiv. Txog qhov no, peb yuav tsum ntxiv ob daim ntawv rau khau raj muab faib ntawm SDcard. Lawv yog wpa_supplicant.conf thiab ssh, Kuv tau txuas cov ntaub ntawv no rau koj yooj yim luam-muab tso rau hauv koj li kev faib ua khau raj. Tsis tas li tsis txhob hnov qab hloov kho wpa_supplicant.conf cov ntaub ntawv nrog koj lub npe siv WiFi thiab tus lej zais.

Nthuav daim npav los ntawm koj lub PC thiab ntxig nws mus rau hauv Raspberry Pi, ntsaws rau hauv lub zog txuas thiab tos kom nws txuas rau koj li WiFi network. Tam sim no txhawm rau nkag mus rau PI siv SSH peb yuav tsum nrhiav tus IP chaw nyob ntawm koj lub cuab yeej. Tus IP chaw nyob tuaj yeem pom siv cov cuab yeej xws li npau taws-ip-scanner lossis koj tsuas tuaj yeem tshawb nrhiav DNS cov neeg siv khoom ntawm koj lub router.

Thaum kawg, SSH rau hauv koj lub cuab yeej, ntawm no kuv siv Putty.

Tus ID nkag mus tsis raug yog pi thiab lo lus zais yog raspberry. Kuv xav qhia koj hloov pauv tus lej zais

Kauj Ruam 2: Txhim Kho Pyload rau Raspberry Pi

Txhim kho Pyload rau Raspberry Pi
Txhim kho Pyload rau Raspberry Pi

Tam sim no cia nruab Pyload. Uas tsuas yog teeb meem ntawm kev theej thiab tso cov lus txib hauv qab no.

Ua ntej cia peb tsim cov neeg siv kab ke tshiab rau kev khiav Pyload

sudo adduser -system pyload

Ntxiv ob kab hauv qab no rau koj /etc/apt/sources.list:

deb https://mirrordirector.raspbian.org/raspbian/ jessie lub ntsiab pab tsis pub dawb rpi

deb-src https://mirrordirector.raspbian.org/raspbian/ jessie lub ntsiab tsis pub dawb rpi

Hloov kho cov npe pob thiab teeb tsa kev vam khom uas xav tau los ntawm PyLoad:

sudo apt-tau hloov tshiab

sudo apt-get -y install git liblept4 nab hab sej-crypto nab hab sej-pycurl nab hab sej-imaging tesseract-ocr zip unzip python-openssl libmozjs-24-bin sudo apt-get -y build-dep rar unrar-nonfree sudo apt-get source -b unrar -nonfree sudo dpkg -i unrar _*_ armhf.deb sudo rm -rf unrar-*

cd /usr /bin

ln -s js24 js

Rub tawm qhov tam sim no ntawm PyLoad:

cd /opt ua

sudo git clone https://github.com/pyload/pyload.git cd pyload

Tam sim no koj tuaj yeem khiav PyLoad, nws yuav pib nrog cov ntawv qhia zaub mov yooj yim thawj zaug.

sudo -u pyload nab hab sej pyLoadCore.py

Yog tias txhua yam ua haujlwm tau raws li qhov xav tau, Koj tuaj yeem tsim cov ntaub ntawv ua haujlwm systemd txhawm rau pib PyLoad thaum raspberry pi khau raj.

[Chav]

Nqe lus piav qhia = Python Downloader Tom qab = network.target [Kev pabcuam] Tus neeg siv = pyload ExecStart =/usr/bin/python /opt/pyload/pyLoadCore.py [Install] WantedBy = multi-user.target

Tom qab ntawd qhib qhov kev pabcuam no

sudo systemctl pab pyload.service

Tam sim no koj tuaj yeem qhib lub vev xaib interface thiab tshawb xyuas seb nws puas ua haujlwm raws li xav tau

Kauj Ruam 3: Teeb tsa Samba Server kom Nkag Mus Rau Peb Cov Ntaub Ntawv

Samba yog ib qho yooj yim tshaj plaws teeb tsa thiab teeb tsa cov ntaub ntawv servers, uas ua rau nws yog ib qho kev daws teeb meem zoo tshaj plaws rau teeb tsa NAS. Los ntawm kev siv Samba ntawm peb Raspberry Pi, peb tuaj yeem yooj yim qhia cov npe hauv ib txoj hauv kev uas lawv tuaj yeem nkag tau los ntawm ib lub cuab yeej ntawm tib lub network.

Rub tawm thiab teeb tsa cov pob samba xav tau

sudo apt-tau nruab samba samba-common-bin

Cia Tsim daim nplaub tshev uas peb yuav khaws txhua qhov peb rub tawm

mkdir/tsev/pi/rub tawm

Tam sim no peb yuav tsum teeb tsa "smb.conf" cov ntaub ntawv teeb tsa los qhia cov ntawv tais ceev tseg no siv samba server.

sudo nano /etc/samba/smb.conf

Mus rau hauv qab ntawm cov ntaub ntawv no siv cov xub tuav thiab luam thiab muab tso rau qhov no

[rub tawm]

path =/home/pi/downloads sau tau = Yog tsim daim npog = 0777 daim npog qhov ncauj = 0777 pej xeem = tsis yog

Tom qab ntawv khiav cov lus txib hauv qab no los teeb tus password rau samba server

sudo smbpasswd -a pib

Thaum kawg rov pib dua samba server, sudo systemctl rov pib dua smbd

Kauj Ruam 4: Ntxiv OLED Zaub

Ntxiv rau OLED Zaub
Ntxiv rau OLED Zaub
Ntxiv rau OLED Zaub
Ntxiv rau OLED Zaub

Qhov peb tau ua txog tam sim no zoo nkauj heev siv tau teeb tsa, tab sis kuv tau nqis tes ua ntxiv thiab ntxiv OLED zaub.

Kuv tsis hais txog koj, tab sis kuv muaj tus cwj pwm coj txawv txawv no txhawm rau txheeb xyuas kuv li kev rub tawm. Li no kuv ntxiv cov zaub no.

Lub vijtsam qhia txog cov hauv qab no.

  • WiFi lub npe npe Pi tau txuas nrog
  • Download ceev
  • Rub tawm cov xwm txheej xwm txheej
  • Kev Siv Disk
  • IP chaw nyob

Kuv siv SSD1306 OLED zaub uas siv i2c raws tu qauv rau kev sib txuas lus nrog Pi. Kuv pom cov ntawv qhia no uas piav qhia yuav teeb tsa lub vijtsam li cas.

Thaum koj ua tiav nrog teeb tsa, rub tawm thiab ua haujlwm Python code no

git clone

cd downloadBox/ sudo chmod +x downloadStats.py sudo python3 downloadStats.py

Nco ntsoov hloov kho Pyload lub npe siv thiab tus lej nkag mus hauv downloadStats.py cov ntaub ntawv yog tias koj hloov pauv lub neej ntawd.

Cov Zaub yuav tsum tam sim no tso tawm cov txheeb cais tam sim no ntawm Raspberry Pi. Yog tias txhua yam ua haujlwm tau raws li qhov xav tau peb tuaj yeem tsim kev pabcuam kom tau txais cov ntawv sau nab nab no thaum Pi khau raj.

Ua ntej tsim cov ntaub ntawv pabcuam

sudo nano /etc/systemd/system/downloadStats.service

Tom qab ntawv ntxiv cov kab hauv qab no

[Chav]

Nqe lus piav qhia = Python Downloader Display Tom qab = network.target [Service] Tus neeg siv = pi ExecStart =/usr/bin/python3 /home/pi/downloadBox/downloadStats.py [Nruab] WantedBy = multi-user.target

Qhib cov kev pabcuam siv cov lus txib hauv qab no:

sudo systemctl pab downloadStats.service

Pom zoo: