Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Kev teeb tsa PI
- Kauj ruam 2: Nruab Componants rau Huab Tom ntej
- Kauj Ruam 3: Nruab Nruab Tom Ntej Software
- Kauj Ruam 4: Ua Ntej Koj Qhov Teeb Meem NextCloud
- Kauj Ruam 5: Teeb RAID 1 Daim iav
- Kauj Ruam 6: Tsiv NextCloud Cov Ntaub Ntawv Rov Los Rau RAID Ntim Tshiab
- Kauj Ruam 7: Ua kom Max Upload
- Kauj Ruam 8: Tso cai.htaccess Override hauv Prep rau SSL SEC
- Kauj Ruam 9: Teeb SSL
- Kauj Ruam 10: Rau Cov Lus Qhia Ntxiv
Video: Tshiab Raspberry Pi 4 USB 3.0 Tus Kheej Huab Nrog RAID Backup: 10 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Nyob zoo thiab txais tos. Hnub no peb yuav los saib yuav tsim koj tus kheej li cas
Huab software system uas yuav tso cai rau koj khaws koj cov ntaub ntawv ntiag tug hauv huab uas koj Tswj thiab tswj hwm. Cov huab no tseem yuav siv daim iav RAID 1 kom koj tuaj yeem muaj thaub qab Hard Disk tsav kom koj cov ntaub ntawv yuav tsis ploj yog tias tsav tsheb yuav ua tsis tiav.
Khoom siv
Txuas:
Yuav teeb tsa raspberry pi nextcloud server li cas
pimylifeup.com/raspberry-pi-nextcloud-server/
Yuav teeb software RAID 1 Daim iav
MDADM RAID cheat sheet
Cov Nqi Khoom:
Raspberry pi 4
Micro SD daim npav 16GB
Sab nraud HDD 1TB sab nraud
Kauj Ruam 1: Kev teeb tsa PI
Ua ntej koj yuav tsum teeb tsa qee cov software kom tau NextCloud mus. Thaum koj tau ua lub ntsej muag zoo rau hauv daim npav microSD thiab tso rau hauv lub pi koj yuav xav tau txuas ob qho ntawm sab nraud hard disk tsav mus rau koj tus pi ntawm USB 3.0 ntsaws. Tom qab ntawd txuas cov keyboard rau ti yog li koj tuaj yeem teeb tsa yam khoom.
Tom qab ntawd koj yuav txhawb lub pi thiab mus rau sab xis saum toj ntawm lub vijtsam thiab teeb tsa koj lub wireless lossis xovtooj siv internet kom tau txais tus IP chaw nyob.
Thaum qhov ntawd ua tiav koj yuav xav qhib lub davhlau ya nyob twg rau qib tom ntej.
Kauj ruam 2: Nruab Componants rau Huab Tom ntej
Tom ntej no koj yuav tsum teeb tsa qee pob khoom kom tau NextCloud nce thiab khiav
Ua raws li cov lus txib hauv kev txiav txim
sudo apt-tau hloov tshiab
sudo apt-tau hloov tshiab (yog tias koj tsis muaj qhov tseeb OS)
sudo apt-tau nruab apache2
Thaum uas ua tiav koj yuav xav tau nruab txhua PHP nrog cov lus txib hauv qab no:
sudo apt-tau nruab php7.3 php7.3-gd sqlite php7.3-sqlite3 php7.3-curl php7.3-zip php7.3-xml php7.3-mbstring
Tom qab ntawd koj yuav tsum rov pib ua haujlwm apache2 lub vev xaib kom ua rau cov khoom php siv tau
sudo kev pabcuam apache2 rov pib dua
Kauj Ruam 3: Nruab Nruab Tom Ntej Software
Tom ntej no peb yuav xav tau teeb tsa huab software tom ntej yog li koj thawj zaug yuav tsum hloov pauv cov npe rau html phau ntawv teev npe
cd/ua/www/html/
Tam sim no peb yuav tsum tau mus rub cov software thiab rub tawm thiab rho tawm nws mus rau qhov chaw no:
curl https://download.nextcloud.com/server/releases/nextcloud-10.0.3.tar.bz2 | sudo tar -jxv
Peb xav tau tsim cov ntawv khaws cia cov ntaub ntawv nyob rau ib ntus ntawm daim npav nco tseem ceeb thiab tseem yuav tsum teeb tsa kev tso cai thiab tus tswv/pab pawg
sudo mkdir -p/var/www/html/nextcloud/cov ntaub ntawv
sudo chown -R www-data: www-data/var/www/html/nextcloud sudo chmod 750/var/www/html/nextcloud/data
Kauj Ruam 4: Ua Ntej Koj Qhov Teeb Meem NextCloud
Tam sim no koj yuav tsum ua kom tiav los ntawm kev tsim tus thawj tswj hwm tshiab thiab tus password.
Txhawm rau ua qhov no koj yuav tsum tau mus rau koj tus IP chaw nyob. Yog tias koj tsis paub qhov chaw nyob koj tuaj yeem sau cov hauv qab no hauv lub davhlau ya nyob twg:
ipconfig
Tom qab sib sau tus IP chaw koj yuav nkag mus rau qee yam zoo li hauv qab no mus rau hauv lub browser chromium ntawm pi lossis ntawm lwm lub vev xaib los ntawm lub khoos phis tawj ntawm tib lub network
192.168.1.28/nextcloud
Kauj Ruam 5: Teeb RAID 1 Daim iav
Tam sim no koj yuav tsum tsim koj li RAID ntim los ntawm koj ob lub hard drive.
Koj yuav tsum muaj ob lub HDD tso rau hauv USB3.0 chaw nres nkoj ntawm Raspberry PI 4
Ua ntej koj yuav tsum teeb tsa RAID software.
sudo apt-tau nruab mdadm
Tam sim no peb yuav tsum nrhiav qhov twg cov khoom siv tsav yog li ua li ntawd koj yuav tsum tau ua cov lus txib hauv qab no:
pi@raspberrypi: ~ $ sudo blkid/dev/mmcblk0p1: LABEL_FATBOOT = "khau raj" LABEL = "khau raj" UUID = "3FFE-CDCA" TYPE = "vfat" PARTUUID = "80da4694-01"/dev/mmcblk0p2: LABEL = " rootfs "UUID =" 3122c401-b3c6-4d27-8e0d-6708a7613aed "TYPE =" ext4 "PARTUUID =" 80da4694-02 " /dev /sda1: UUID =" 76c0abd6-d547-3882-a94f-1bc4c78ad_3 " 13e8-04ed-d5f5-7f9805ae72b5 "LABEL =" raspberrypi: 0 "TYPE =" linux_raid_member "PARTUUID =" 9b3ff72d-01 " /dev /sdb1: UUID =" 76c0abd6-d547-3882-a94f-1bc4c7c7c07d0c7c7c07d7c7d0c7c7c7c0d7c7d0c7c-7d7dc-cb7c0c7c7dcbc7c7dcbc4c78c4c7c5dcbc4c7cbcdc 556d-9c96-cb6c-b55d3721c4bf "LABEL =" raspberrypi: 0 "TYPE =" linux_raid_member "PARTUUID =" cc00f35e-52e9-43b9-b955-33f4d54b203d " /dev /mmcblk0: PTDAU" 4 " /md0: UUID = "94103a0c-0985-4d75-957f-042f4d9f3bd0" TYPE = "ext4"
Tom qab cov lus txib no tau khiav peb pom tias ob lub zog tau lees paub tias yog ob lub cuab yeej:
/dev/sda1
/dev/sdb1
Tom ntej no peb yuav xav tsim RAID ntim (qhov no yuav yog daim iav qhov twg los xij uas tau sau rau ib tus tsav yuav tau theej theej rau lwm tsav)
sudo mdadm --create --verbose /dev /md0-qib = daim iav-ntshai-khoom = 2 /dev /sda1 /dev /sdb1
Tam sim no tias RAID array tau tsim koj tuaj yeem txheeb xyuas qhov ntawd nrog cov lus txib hauv qab no:
miv/proc/mdstat/Cwm pwm: [raid10]
md0: active raid10 sdd1 [3] sdc1 [2] sdb1 [1] sda1 [0] 15319040 blocks super 1.2 512K chunks 2 ze-copy [4/4] [UUUU] [> ………………..] resync = 0.4% (61504/15319040) tiav = 28.9min ceev = 8786K/sec cov khoom siv tsis siv:
Tam sim no koj yuav tsum tseg koj cov array tsim los ntawm kev sau nws mus rau mdadm teeb tsa cov ntawv nrog cov lus txib hauv qab no:
sudo -i ua
mdadm --detail -scan >> /etc/mdadm/mdadm.conf
Tom qab ntawd tawm ntawm tus neeg siv hauv paus los ntawm kev ntaus "tawm" hauv qhov hais kom ua qhov rai.
Tam sim no koj yuav tsim cov ntaub ntawv kaw lus ntawm koj lub ntim RAID tshiab:
mkfs.ext4 -v -m.1 -b 4096 -E stride = 32, stripe -width = 64 /dev /md0
Yog ua tiav koj yuav tsum pom qee yam zoo li cov zis hauv qab no:
1605632, 2654208 Kev faib pawg pawg: ua tiav Sau inode ntxhuav: ua tiav Tsim phau ntawv xov xwm (16384 ntu): ua tiav Sau cov superblocks thiab cov ntaub ntawv systemyog nyiaj txiag cov ntaub ntawv: ua tiav
Tom ntej no peb yuav tsum tau teeb tsa cov ntaub ntawv txheej txheem tshiab ntawm RAID ntim nrog cov lus txib hauv qab no:
sudo mount /dev /md0 /mnt
Yog tias koj tsis muaj qhov yuam kev tej yam ua haujlwm tau zoo tam sim no.
Thaum kawg txhawm rau ua kom ntseeg tau tias koj RAID ntim tau txhua qhov kev teeb tsa thaum pib koj yuav tsum tau kho cov ntaub ntawv fstab nrog cov lus txib hauv qab no:
cd /lwm yam /
sudo vi fstab
Ntxiv cov kab hauv qab no mus rau hauv qab:
/dev /md0 /mnt ext4 defaults 0 0
Txuag qhov no nrog ": wq" thiab tam sim no thaum koj rov pib dua koj lub pi nws yuav cia li nce lub /dev /md0 file system mus rau /mnt nplaub tshev.
Kauj Ruam 6: Tsiv NextCloud Cov Ntaub Ntawv Rov Los Rau RAID Ntim Tshiab
Tam sim no peb yuav xav txav cov ntaub ntawv tais ceev tseg uas peb tau tsim rau RAID ntim tshiab yog li nws tau thim rov qab ntawm ob lub zog tsav.
Peb thawj zaug yuav tsum ua cov qauv txheej txheem ntawm peb RAID ntim nrog cov lus txib hauv qab no:
sudo mkdir -p /mnt /nextcloud
tom qab ntawd peb yuav tsum txav cov ntaub ntawv tais ceev tseg los ntawm html nplaub tshev mus rau lub nplaub tshev nextcloud tshiab peb nyuam qhuav tsim:
sudo mv -v/var/www/html/nextcloud/data/mnt/nextcloud/cov ntaub ntawv
Tam sim no peb yuav xav qhia NextCloud hauv nws cov ntaub ntawv teeb tsa qhov twg los nrhiav qhov chaw tshiab.
Txhawm rau ua qhov no peb yuav tsum kho nrog cov lus txib hauv qab no:
cd/var/www/html/nextcloud/teeb tsa/
sudo vi config.php
Tam sim no tshawb hauv cov ntawv no thiab nrhiav kab hauv qab no:
'datadirectory' => '/var/www/html/nextcloud/data', Hloov qhov ntawd mus rau cov hauv qab no:
'datadirectory' => '/mnt/nextcloud/cov ntaub ntawv', Txuag koj qhov kev hloov pauv nrog ": wq"
Kauj Ruam 7: Ua kom Max Upload
Tam sim no peb yuav tsum nce qhov siab tshaj plaws upload txij li qhov ntawd me me los ntawm lub neej ntawd.
Txhawm rau ua qhov no peb yuav tsum kho cov ntaub ntawv php.ini nrog cov lus txib hauv qab no:
sudo vi /etc/php/7.3/apache2/php.ini
nrhiav ob kab:
post_max_size = 8M
upload_max_filesize = 2M
Thiab hloov lawv ob qho tib si rau hauv qab no:
post_max_size = 2048M
upload_max_filesize = 2048M
Qhov no teeb tsa lawv ob qho rau 2GB. Yog tias koj xav tau ntau dua xav kom teeb tsa lawv siab dua.
Thaum kawg rov pib dua apache2 webservice txhawm rau hloov pauv siv tau nrog cov lus txib hauv qab no:
sudo kev pabcuam apache2 rov pib dua
Kauj Ruam 8: Tso cai.htaccess Override hauv Prep rau SSL SEC
Txhawm rau tso cai.htaccess kom muaj peev xwm thim rov qab los pib txheej txheem kev nyab xeeb rau koj lub xaib koj yuav xav tau kho cov ntawv teeb tsa rau apache2 nrog cov hauv qab no:
sudo vi /etc/apache2/apache2.conf
Nrhiav ntu uas zoo li cov hauv qab no:
Options Indexes FollowSymLinks AllowOverride Tsis muaj Yuav tsum tau txhua qhov kev tso cai
Hloov AllowOverride rau cov hauv qab no:
Options Indexes FollowSymLinks AllowOverride Txhua Yam Yuav Tsum Tau Tso Cai
Tam sim no koj yuav tsum rov pib dua apache2 lub vev xaib kom ua haujlwm:
sudo kev pabcuam apache2 rov pib dua
Kauj Ruam 9: Teeb SSL
Tom ntej no peb yuav tsum teeb tsa SSL kom peb tuaj yeem muaj daim ntawv pov thawj tus kheej rau https tsis yog
Txhawm rau pib peb xav tau cov lus txib hauv qab no los tsim cov yuam sij:
sudo mkdir -p/etc/apache2/ssl
sudo openssl req -x509 -nodes -days 365 -newkey rsa: 4096 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
Thaum tus yuam sij tsim yuav muaj qee cov ntaub ntawv uas koj tuaj yeem xav ua kom zoo li lub teb chaws thiab nroog tab sis koj tsis tas yuav sau cov khoom xws li cov koom haum koom haum, npe ib txwm, lossis email chaw nyob.
Thaum ua tiav tsim cov yuam sij koj yuav xav tau los pab SSL module rau apache wiht cov lus txib hauv qab no:
sudo a2enmod ssl cov
Tam sim no peb yuav tsum kho qhov teeb tsa los siv peb cov yuam sij peb nyuam qhuav tsim nrog cov lus txib hauv qab no:
sudo vi /etc/apache2/sites-available/default-ssl.conf
Hauv cov ntawv no koj yuav tsum pom ob kab hauv qab no
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
Hloov cov no mus rau cov hauv qab no:
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
Tam sim no uas yog chagned peb xav tau los ua kom defatult-ssl teeb tsa ntxiv nrog rov pib dua apache2 lub vev xaib pabcuam kom ua txhua qhov kev hloov pauv no siv tau:
sudo a2ensite default-ssl.conf
sudo kev pabcuam apache2 rov pib dua
Tam sim no koj yuav tsum tuaj yeem hloov pauv koj li https:// nrog https:// thiab tau txais kev ruaj ntseg txuas nrog siv daim ntawv pov thawj ssl.
**************************
Nyiaj tau tshaj yog tias koj xav kom muaj lub vev xaib xa rov qab rau leej twg uas nkag mus rau http tsis txhob siv https koj tuaj yeem ua cov hauv qab no:
Qhib 000 cov ntaub ntawv teeb tsa thiab ntxiv qee kab raws li hauv qab no:
sudo vi /etc/apache2/sites-available/000-default.conf
Tawm tawm txhua yam hauv cov ntawv no nrog # kos npe thiab nkag mus rau hauv qab no hauv qab ntawm cov ntawv
ServerAdmin piv txwv@piv txwv RewriteEngine On RewriteCond %{HTTPS} tawm RewriteRule ^(.*) $ Https: // %{HTTP_HOST} [R = 301, L]
Tom qab ntxiv qhov teeb meem no ob qho lus txib hauv qab no kom txuag nws:
sudo a2enmod rov sau dua
sudo kev pabcuam apache2 rov pib dua
Kauj Ruam 10: Rau Cov Lus Qhia Ntxiv
Yog tias koj xav tau cov ntaub ntawv ntxiv ntawm no yog qee qhov txuas zoo thiab kuv cov vis dis aus los ntawm kuv tus youtue channel los pab koj. Thov txiav txim siab los ntawm kuv tus channel thiab tso ib qho ntxiv. Kuv paub koj yuav tsis khuv xim nws.
Txuas:
Yuav teeb tsa Raspberry Pi Nextcloud Server li cas
pimylifeup.com/raspberry-pi-nextcloud-serv…
Yuav teeb tsa RAID ntawm Raspberry pi li cas
www.ricmedia.com/build-raspberry-pi3-raid-…
Sim Amazon Prime 30-Hnub
Txhawb nqa Channel thiab Ua Tus Saib Xyuas
Pom zoo:
SKARA- Tus Kheej Tus Kheej Ntxiv Los Ntawm Tus Kheej Dej Da Dej Tu Neeg Hlau: 17 Kauj Ruam (nrog Duab)
SKARA- Tus Kheej Tus Kheej Ntxiv Los Ntawm Tus Kheej Ua Dej Da Dej Tu Neeg Hlau: Lub sijhawm yog nyiaj thiab kev siv tes ua haujlwm yog kim. Nrog kev nthuav dav thiab kev nce qib hauv kev siv tshuab thev naus laus zis, kev daws teeb meem tsis muaj teeb meem xav tau los tsim rau cov tswv tsev, zej zog thiab pab pawg kom ntxuav cov pas dej los ntawm cov khib nyiab thiab av ntawm lub neej txhua hnub, txhawm rau
Yuav Ua Li Cas Tsim Kev Tswj Tus Kheej 3D Luam Tus Kheej Tus Kheej Tus Kheej: 9 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Tsim Kev Tswj Tus Kheej 3D Luam Tus Kheej Tus Kheej Tus Kheej: Qhov no yog kev hloov pauv ntawm B-neeg hlau ua ntej. 100% Qhib QHOV CHAW / Arduino neeg hlau. CODE, 3D ntu thiab khoom siv hluav taws xob tau qhib yog li xav hloov kho nws lossis tsim qhov loj ntawm tus neeg hlau. Yog tias koj muaj kev ua xyem xyav, tswv yim lossis xav tau kev pab ua rau
ARUPI - Tus Nqi Tus Nqi Tus Nqi Uas Tau Txais Tus Nqi Uas Tau Txais Tus Nqi/Tus Kheej Tus Kheej (ARU) rau Soundscape Ecologists: 8 Kauj Ruam (nrog Duab)
ARUPI - Tus Nqi Tus Nqi Uas Tau Txais Tus Nqi Tus Nqi Uas Tau Txais Tus Nqi/Tus Kheej Tus Kheej (ARU) rau Soundscape Ecologists: Cov lus qhia no tau sau los ntawm Anthony Turner. Txoj haujlwm tau tsim los nrog ntau qhov kev pab los ntawm Shed hauv Tsev Kawm Ntawv ntawm Kev Suav, University of Kent (Mr Daniel Knox tau pab zoo!)
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Huab Cua Huab Cua: 7 Cov Kauj Ruam (nrog Duab)
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Air Economizer: HRV Arduino Tus Tswj Nrog Air Economizer Yog li kuv keeb kwm nrog txoj haujlwm no yog kuv nyob hauv Minnesota thiab kuv lub rooj tsav xwm hluav taws xob kib ntawm kuv LifeBreath 155Max HRV. Kuv tsis xav them $ 200 rau qhov tshiab Kuv ib txwm xav tau qee yam nrog kev lag luam huab cua kev ua txhaum
Tus Kheej Tus Kheej Tus Kheej: 7 Kauj Ruam (nrog Duab)
Tus Kheej Tus Kheej Tus Kheej: Peb txhua tus tau paub txog qib.Lub qib muaj ob yam khoom sib xyaw thiab ob qho khoom ua haujlwm: Ib nqaj lossis cov pas nrig Ib lub pob zeb lossis lub ntsiab lus pivot Lub zog tawm tswv yim (lossis siv zog) Lub zog tso tawm (lossis thauj khoom lossis tiv taus) Ntawm no kev rau siab tau muab tso rau hauv