Cov txheej txheem:

Ua piv txwv koj yog Xyzzy Server ntawm Raspberry Pi: 19 Cov Kauj Ruam
Ua piv txwv koj yog Xyzzy Server ntawm Raspberry Pi: 19 Cov Kauj Ruam

Video: Ua piv txwv koj yog Xyzzy Server ntawm Raspberry Pi: 19 Cov Kauj Ruam

Video: Ua piv txwv koj yog Xyzzy Server ntawm Raspberry Pi: 19 Cov Kauj Ruam
Video: Tsis Muaj Peev Xwm Yuav Ua Li Cas 2024, Hlis ntuj nqeg
Anonim
Ua txuj tias koj yog Xyzzy Server ntawm Raspberry Pi
Ua txuj tias koj yog Xyzzy Server ntawm Raspberry Pi

Phau ntawv qhia no yuav qhia koj yuav ua li cas teeb tsa uantej Koj Yog Xyzzy (PYX) server ntawm Raspberry Pi. Kuv hu nws ua XyzzyPi

Ua piv txwv Koj yog Xyzzy yog online, qhib-daim npav tiv thaiv tib neeg clone ua si hauv lub vev xaib.

Hauv Android koj tseem tuaj yeem siv Tus Neeg Siv rau Ua Ntej Koj Yog Xyzzy app.

Thaum kuv pib saib mus teeb tsa kuv tus kheej PYX server kuv muaj lub sijhawm nyuaj nrhiav cov lus qhia uas tsis yog hnub qub thiab uas yooj yim ua raws. Nws zoo li feem ntau ntawm lawv tau sau rau cov neeg uas twb muaj qee qhov kev paub dhau los teeb tsa PYX server. Kuv muaj peev xwm txheeb xyuas tau yam tab sis kuv xav tsim phau ntawv qhia ib qib zuj zus rau cov uas tsis paub txuj ci siab lossis leej twg tsis muaj kev paub ntau nrog cov khoom ntawd. Tsis tas li, kuv tsis tuaj yeem pom cov lus qhia kom ua nws khiav ntawm Raspberry Pi. Tom qab qee qhov kev sim thiab yuam kev Kuv tuaj yeem tau txais PYX server khiav ntawm Pi nrog tsuas yog qee qhov kev hloov kho me ntsis rau cov ntaub ntawv. Kuv vam tias qhov no yuav txuag qee lub sijhawm rau cov uas xav paub.

Kuv tau ua qhov no ntawm Pi 3 tus qauv B+ thiab Pi 4 tus qauv B 4GB. Muaj qee qhov teeb meem nrog siv Pi Zero W vim tus txheej txheem tsis tuav Java VM kom raug. Tam sim no kuv tab tom sim kom nws ua haujlwm ntawm Zero W thiab yuav hloov kho cov lus qhia yog tias kuv ua tiav. Kuv tsis muaj Pi 1 lossis 2 los sim rau qhov no yuav yog lossis tsis ua haujlwm nrog cov ntawd.

Kuv tau sim ua qhov kev qhia yooj yim ua raws rau cov neeg ntawm txhua qib txuj ci yog li tej zaum yuav muaj cov khoom nyob ntawm no uas koj twb paub lawm.

Yog tias koj twb paub yuav ua li cas rau nruab Raspbian thiab txuas rau koj Pi hla mus rau qib 6

Yog tias koj muaj kev paub dhau los teeb tsa PYX server thiab tsuas yog xav paub qhov kev hloov kho tsim nyog los ua kom nws ua haujlwm ntawm Pi hla mus rau qib 13

Kev tsis lees paub: Kuv tsis tau tsim ua piv txwv tias koj yog Xyzzy lossis Android app app.

Cov nyiaj qiv rau kev tsim ua piv txwv Koj yog Xyzzy mus rau GitHub tus neeg siv ajanata (https://github.com/ajanata/PretendYoureXyzzy)

Cov nyiaj qiv rau kev tsim Tus Neeg Siv Rau Ua Ntej Koj Xyzzy mus rau Gianlu (https://play.google.com/store/apps/dev?id=8675761046824387020)

Yog tias muaj leej twg kuv nco thov qhia rau kuv paub.

Khoom siv

Kho vajtse:

Raspberry Pi 3 lossis 4

Micro SD daim npav (Kuv siv 32GB micro SD daim npav vim tias yog qhov kuv muaj ntawm tes. Koj tuaj yeem zaum tau nrog tsawg li 2GB tab sis kuv xav kom tsawg kawg 4GB.)

PC nrog SD daim npav nyeem ntawv (Kuv siv Windows rau qhov kev qhia no. Yog tias koj tab tom khiav Linux koj yuav zaum twb paub ntau yam khoom no yog li kho cov lus qhia raws li xav tau.)

Software:

Raspbian duab: https://www.raspberrypi.org/downloads/raspbian/ (Ib qho twg yuav tsum ua haujlwm. Kuv siv Raspbian Buster Lite thaum sau ntawv.)

Win32 Disk Imager: https://sourceforge.net/projects/win32diskimager/ (Muaj lwm txoj haujlwm koj tuaj yeem siv los nyem cov duab Raspbian tab sis qhov no yog kuv tus kheej nyiam.)

Putty:

Kauj ruam 1: Nyem Raspbian rau koj daim npav SD

Nyem Raspbian rau koj daim npav SD
Nyem Raspbian rau koj daim npav SD

Muab koj daim npav SD tso rau hauv koj lub computer nyeem daim npav ua ntej qhib Win32 Disk Imager. Tom qab ntawd xaiv koj cov duab Raspbian thiab koj daim npav SD daim ntawv tsav tsheb thiab nyem "Sau".

CEEV FAJ: Txhua yam hauv SD daim npav yuav raug tshem tawm thiab sau dua. Yog tias muaj cov ntaub ntawv tseem ceeb ntawm SD daim npav rov qab nws ua ntej. Tsis tas li, nco ntsoov tias koj xaiv tsab ntawv tsav tsheb raug rau koj daim npav SD. Txwv tsis pub koj tuaj yeem tsis tuaj yeem so/sau dua qhov tsav tsis raug

Thaum nws ua tiav koj yuav muaj ob lub tsav sib cais ntawm koj daim npav SD. Ib zaug hu ua khau raj thiab ib qho uas Windows tsis tuaj yeem nyeem. Tej zaum koj yuav tau txais qhov tshwm sim hauv Windows nug koj kom ua daim npav. Tsuas yog nyem tseg. Yog tias koj ua format nws koj yuav tau nyem Raspbian dua.

Kauj Ruam 2: Tsim Cov Ntawv Sau Npe "wpa_supplicant.conf" ntawm Boot Drive

Tsim Cov Ntawv Teev Npe Npe
Tsim Cov Ntawv Teev Npe Npe

Ntawm daim npav SD daim npav tsav tsheb tsim cov ntawv sau npe wpa_supplicant.conf thiab muab cov lej hauv qab no tso rau hauv. Hloov "wifi npe" thiab "password" nrog koj lub npe wifi tiag tiag thiab tus lej zais tab sis khaws cov lus nyob ib puag ncig lawv. Txuag cov ntawv.

Qhov no yuav tso cai rau koj Pi txuas rau koj lub wifi. Yog tias koj tab tom siv ethernet cable txuas koj Pi rau koj lub network koj tuaj yeem hla dhau cov kauj ruam no.

Nco ntsoov tias daim ntawv txuas ntxiv raug. Nws yuav tsum yog wpa_supplicant.conf tsis yog wpa_supplicant.conf.txt

lub teb chaws = usupdate_config = 1 ctrl_interface =/var/run/wpa_supplicant

network = {

scan_ssid = 1 ssid = "wifi lub npe" psk = "password"}

Kauj Ruam 3: Tsim Cov Ntaub Ntawv Tsis Muaj Npe "ssh" ntawm Boot Drive

Tsim Cov Ntaub Ntawv Tsis Muaj Npe
Tsim Cov Ntaub Ntawv Tsis Muaj Npe

Ntawm daim npav SD daim npav tsav tsheb tsim cov ntawv uas tsis muaj npe hu ua ssh

Nws tsis tas yuav muaj dab tsi hauv nws, nws tsuas yog xav tau lub npe kom raug.

Qhov no yuav ua rau ssh ntawm koj Pi uas yuav tso cai rau koj txuas nrog nws siv Putty.

Nco ntsoov tias cov ntaub ntawv tsuas yog npe ssh uas tsis muaj kev txuas ntxiv. Tsis yog ssh.txt thiab lwm yam

Kauj Ruam 4: Tshem daim npav SD ntawm koj lub PC, Muab tso rau hauv koj tus Pi, thiab tso lub zog rau ntawm koj tus Pi

Tshem tawm daim npav SD los ntawm koj lub PC, muab tso rau hauv koj tus Pi, thiab lub zog ntawm koj tus Pi.

Yog tias txhua yam ua haujlwm koj Pi yuav khau raj thiab txuas rau koj lub wifi.

Muab nws ob peb feeb kom dhau los ntawm nws thawj zaug teeb tsa.

Kauj ruam 5: Txuas rau Koj Pi Siv Putty

Txuas rau Koj Pi Siv Putty
Txuas rau Koj Pi Siv Putty
Txuas rau Koj Pi Siv Putty
Txuas rau Koj Pi Siv Putty

Qhib Putty thiab hauv Tus Tswv Lub Npe lub thawv hom raspberrypi ua kom ntseeg tau tias hom kev sib txuas yog SSH thiab chaw nres nkoj yog 22. Yog tias nws txuas koj yuav raug coj mus rau lub vijtsam dub nrog cov ntawv ntawm nws paub tias yog lub davhlau ya nyob twg. Nws yuav nug koj tus username thiab password. Lub npe siv tsis raug yog "pi" thiab tus password tsis raug yog "raspberry". Nws tau pom zoo tias koj hloov tus password tshwj xeeb tshaj yog tias koj npaj yuav kom koj Pi nthuav tawm rau hauv internet. Txhawm rau ua li ntawd, ntaus "passwd" thaum koj nkag mus thiab ua raws li cov lus qhia. Nco ntsoov xaiv tus password uas koj yuav nco qab.

Yog tias nws tsis txuas koj yuav xav nrhiav tus IP chaw nyob uas koj Pi siv. Muaj ntau txoj hauv kev los ua qhov no tab sis tus kheej kuv tsuas yog nkag mus rau kuv lub router thiab tshawb xyuas cov npe ntawm cov khoom siv sib txuas. Thaum koj pom tus IP ntawm koj tus Pi hom uas nkag rau hauv Lub Npe Lub Npe lub thawv hauv Putty es tsis txhob raspberrypi thiab sim txuas dua.

Yog tias koj tseem tsis tuaj yeem txuas koj yuav tsis tau tsim cov ntaub ntawv ssh kom raug. Nyeem dua cov kauj ruam dhau los thiab txheeb xyuas txhua yam.

Kauj Ruam 6: Tsis teb los tau: Hloov lub Hostname ntawm Koj Pi

Tsis teb los tau: Hloov lub Hostname ntawm Koj Pi
Tsis teb los tau: Hloov lub Hostname ntawm Koj Pi
Tsis teb los tau: Hloov lub Hostname ntawm Koj Pi
Tsis teb los tau: Hloov lub Hostname ntawm Koj Pi
Tsis teb los tau: Hloov lub Hostname ntawm Koj Pi
Tsis teb los tau: Hloov lub Hostname ntawm Koj Pi

Qhov no tsis tsim nyog tab sis kuv xav kom muaj lub hostname ntawm kuv Pi raws li qee yam cuam tshuam nrog qhov nws tau siv rau es tsis yog lub npe "raspberrypi" nkaus xwb. Hauv qhov no kuv tau hu nws "xyzzypi" tab sis koj tuaj yeem hu nws txhua yam koj xav tau.

Txhawm rau hloov hom hostname:

sudo raspi-teeb tsa

Xaiv Network Options

Xaiv Hostname

Nkag mus rau lub hostname twg koj xav tau

Xaiv Tiav

Nws yuav nug yog tias koj xav rov pib Pi tam sim no. Lub hostname tshiab yuav tsis siv mus txog thaum koj rov pib dua. Yog tias koj ua, koj qhov kev sib tham Putty yuav txiav tawm. Thaum nws ua tiav rebooting koj yuav tsum tau siv lub npe hostname tshiab uas koj tau teeb tsa kom rov txuas nrog Putty. Yog tias koj txuas nrog siv tus IP chaw nyob tsis yog lub npe host ces nws yuav tsum zoo ib yam.

Muaj ntau ntau qhov kev xaiv uas koj tuaj yeem teeb tsa siv cov cuab yeej raspi-teeb tsa tab sis muaj ntau cov kev qhia qhia txog online ntawd yog li kuv yuav tsis nkag mus rau lawv ntawm no.

Kauj Ruam 7: Hloov Kho Koj Cov Ntawv Thov

Hloov Kho Koj Cov Ntawv Thov
Hloov Kho Koj Cov Ntawv Thov

Hloov kho koj daim ntawv thov siv cov lus txib hauv qab no:

sudo apt-tau hloov tshiab

Cia nws khiav kom txog thaum nws ua tiav.

Nco tseg: Txuj ci koj tsis tas yuav ntaus "apt-get" ntxiv lawm, koj tuaj yeem tsuas yog ntaus "apt". Txawm li cas los xij, Kuv tau siv los ntaus "apt-get" uas nws tsuas yog cov leeg nco rau kuv ntawm qhov no.

Kauj ruam 8: Nruab Git

Nruab Git
Nruab Git

Thaum cov pob ntawv thov ua tiav hloov kho nruab Git siv cov lus txib hauv qab no:

sudo apt -tau -y nruab git

Cia nws khiav kom txog thaum nws ua tiav.

Kauj ruam 9: Nruab Maven

Nruab Maven
Nruab Maven

Nruab Maven siv cov lus txib hauv qab no:

sudo apt -tau -y nruab maven

Cia nws khiav kom txog thaum nws ua tiav

Kauj ruam 10: Rub tawm ua piv txwv tias koj yog Xyzzy Server Files

Rub tawm qhov ua piv txwv koj yog Xyzzy Server Cov Ntaub Ntawv
Rub tawm qhov ua piv txwv koj yog Xyzzy Server Cov Ntaub Ntawv

Rub tawm qhov ua piv txwv Koj yog Xyzzy server cov ntaub ntawv siv cov lus txib hauv qab no:

git clone git: //github.com/ajanata/PretendYoureXyzzy.git

Qhov no yuav tsim cov npe ntawm koj Pi npe PretendYoureXyzzy thiab rub cov ntawv rau hauv.

Cia nws khiav kom txog thaum nws ua tiav.

Kauj Ruam 11: Hloov mus rau Phau Ntawv Teev Npe YoureXyzzy

Hloov mus rau Phau Ntawv Teev Npe YoureXyzzy
Hloov mus rau Phau Ntawv Teev Npe YoureXyzzy

Hloov mus rau PretendYoureXyzzy cov npe siv cov lus txib hauv qab no:

cd Ua piv txwv YoureXyzzy

Nco tseg: Linux cov lus txib yog cov ntaub ntawv rhiab heev yog li ua piv txwv YoureXyzzy yuav ua haujlwm tab sis cd ua piv txwv yououxyzzy yuav tsis.

Kauj Ruam 12: Qhib thiab Hloov Kho "build.properties.example" Cov Ntaub Ntawv thiab Txuag Nws Li "build.properties"

Qhib thiab Kho kom raug
Qhib thiab Kho kom raug
Qhib thiab Kho kom raug
Qhib thiab Kho kom raug
Qhib thiab Kho kom raug
Qhib thiab Kho kom raug

Qhib cov ntawv build.properties.example nrog nano ntawv editor siv cov lus txib hauv qab no:

sudo nano build.properties.example

Siv lub davhlau ya nyob twg raws cov ntawv nyeem tuaj yeem zoo li txaus ntshai me ntsis rau cov uas tsis tau siv nws tab sis qhov peb tab tom ua yog yooj yim heev.

Siv tus xub xub nqis kom nqes mus txog thaum koj pom cov ntu uas hais tias "hibernate.username" thiab "hibernate.password".

Siv tus yuam sij xub kom txav mus rau qhov kawg ntawm cov kab ntawd thiab hloov lub npe siv thiab tus lej nkag mus rau lwm yam. Ua siab ncaj Kuv tsis paub yog tias nws tseem tsim nyog tab sis kuv tsis yooj yim tso lawv ntawm lub npe siv tsis raug thiab tus password uas lawv tuaj nrog.

Thaum koj tau hloov pauv lawv nias ctrl+o txhawm rau coj los khaws cov lus sib tham.

Backspace tshem tawm ".example" los ntawm qhov kawg ntawm lub npe ntawv yog li koj nyob nrog tsuas yog "build.properties"

Nws yuav nug yog tias koj xav khaws cov ntawv hauv qab lwm lub npe. Nias y rau yog.

Nias ctrl+x kom kaw nano text editor.

Kauj Ruam 13: Qhib thiab Hloov Kho "pom.xml" Cov Ntaub Ntawv (Qhov no yog Dab Tsi Ua Rau Nws Ua Rau PI)

Qhib thiab Kho kom raug
Qhib thiab Kho kom raug
Qhib thiab Kho kom raug
Qhib thiab Kho kom raug

Qhib cov ntawv pom.xml nrog nano ntawv editor siv cov lus txib hauv qab no:

sudo nano pom.xml

Nqes los ib yam li koj tau ua ua ntej. Lub sijhawm no txoj kab koj tab tom nrhiav yog sqlite-jdbc

Tsuas yog hauv qab kab ntawv no yog kab nrog tus lej version. Koj yuav tsum hloov tus lej ntawd mus rau 3.28.0 kom nws zoo li:

3.28.0

Thaum koj tau kho tus lej xov tooj nias ctrl+o txhawm rau coj los khaws cov lus sib tham.

Khaws lub npe ntawv ua "pom.xml" thiab khaws nws.

Thaum nws tau txais kev cawmdim nias ctrl+x kom kaw nano text editor.

Nov yog qhov kev hloov kho uas ua rau ua piv txwv tias koj yog Xyzzy server khiav ntawm Pi. Sqlite-jdbc version uas nws los nrog yuav tsis ua haujlwm zoo ntawm Pi. Version 3.28.0 ua haujlwm zoo hauv kuv qhov kev xeem txog tam sim no

Kauj Ruam 14: Pib Ua Qhov Ua Ntej Koj Yog Xyzzy Server thiab Ua Kom Nws Ua Haujlwm

Pib Ua Qhov Ua Ntej Koj Yog Xyzzy Server thiab Ua Kom Nws Ua Haujlwm
Pib Ua Qhov Ua Ntej Koj Yog Xyzzy Server thiab Ua Kom Nws Ua Haujlwm
Pib Ua Qhov Ua Ntej Koj Yog Xyzzy Server thiab Ua Kom Nws Ua Haujlwm
Pib Ua Qhov Ua Ntej Koj Yog Xyzzy Server thiab Ua Kom Nws Ua Haujlwm
Pib Ua Qhov Ua Ntej Koj Yog Xyzzy Server thiab Ua Kom Nws Ua Haujlwm
Pib Ua Qhov Ua Ntej Koj Yog Xyzzy Server thiab Ua Kom Nws Ua Haujlwm

Tam sim no koj tau tsim kho qhov tsim nyog los ua Tus Thawj Coj Koj Yog Xyzzy server ntawm koj Pi cia pib nws thiab pom tias txhua yam ua haujlwm. Pib lub server siv cov lus txib hauv qab no:

mvn huv pob ua tsov ua rog: tawg dav hlau: khiav -Dmaven.buildNumber.doCheck = cuav -Dmaven.buildNumber.doUpdate = cuav

Nws yuav rub qee cov ntaub ntawv ntxiv, suav lawv, thiab pib server. Qhov no yuav siv sijhawm li ob peb feeb.

Nco tseg: Tam sim no qhov no tsuas yog txoj hauv kev kuv paub yuav ua li cas ua kom lub server khiav nws li ntawd nws yuav suav txhua lub sijhawm koj pib nws.

Koj yuav paub nws ua tiav thaum koj tau txais cov lus hais tias "Console reloading is ENABLED. Ntaus ENTER ntawm lub console kom rov pib dua cov ntsiab lus."

Txij ntawm no koj tuaj yeem qhib koj lub browser thiab ntaus hauv lub npe hostname (lossis IP chaw nyob) ntawm Pi ntxiv chaw nres nkoj 8080 thaum kawg. Yog li hostname: 8080 lossis IP: 8080

Yog tias koj siv xyzzypi ua tus tswv lub npe nws yuav yog xyzzypi: 8080 lossis hauv kuv rooj plaub siv tus IP nws yuav yog 192.168.1.189:8080

Yog tias txhua yam ua haujlwm koj yuav raug coj mus rau Ua Yeeb Yam Koj Yog Xyzzy nplooj ntawv tseem ceeb.

Nrog koj zoo siab! Koj tau ua tiav

Txawm li cas los xij tam sim no nws tsuas yog ua haujlwm yog tias koj nkag mus rau koj li Pi nrog Putty thiab khiav cov lus txib saum toj no kom pib server. Thaum koj kaw Putty lub server yuav nres. Qhov no yuav zoo rau qee tus neeg tab sis koj yuav xav ua Tus Ua Yeeb Yam Koj Xyzzy neeg rau zaub mov kom ua haujlwm tau zoo thaum twg Pi khau raj lossis rov pib dua yam tsis tas yuav nkag mus rau hauv.

Kauj Ruam 15: Ua Tsab Ntawv los Pib Ua Ntej Koj Yog Xyzzy Server

Ua ib tsab ntawv los pib ua piv txwv tias koj yog Xyzzy Server
Ua ib tsab ntawv los pib ua piv txwv tias koj yog Xyzzy Server
Ua ib tsab ntawv los pib ua piv txwv tias koj yog Xyzzy Server
Ua ib tsab ntawv los pib ua piv txwv tias koj yog Xyzzy Server

Yog tias peb xav kom Tus Saib Xyuas Ua Ntej Koj Xyzzy server pib ua haujlwm thaum Pi khau raj lossis rov pib dua thawj qhov peb yuav tsum tau ua yog tsim tsab ntawv.

Nias ctrl+c kom tsis txhob server.

Thaum nws nres ntaus cov lus txib hauv qab no:

sudo nano xyzzy.sh

Nco tseg: Kuv tau sau kuv cov ntawv xyzzy.sh tab sis koj tuaj yeem sau nws txhua yam koj xav tau. Tsuas yog xyuas kom nws muaj.sh raws li cov ntaub ntawv txuas ntxiv.

Siv nano cov ntawv sau hom lossis muab cov hauv qab no tso rau hauv cov ntawv:

#!/bin/bashcd/home/pi/PretendYoureXyzzy mvn huv pob ua tsov rog: tawg dav hlau: khiav -Dmaven.buildNumber.doCheck = cuav -Dmaven.buildNumber.doUpdate = cuav

Nias ctrl+o coj los khaws cov lus sib tham

Txuag cov ntawv thiab nias ctrl+x kom kaw nano

Kauj Ruam 16: Ua Koj Cov Ntawv Sau

Ua kom koj tsab ntawv ua tiav
Ua kom koj tsab ntawv ua tiav

Peb yuav tsum ua kom tsab ntawv ua tiav siv cov lus txib hauv qab no:

sudo chmod 755 xyzzy.sh

Nco tseg: Yog tias koj lub npe koj tsab ntawv muaj qee yam sib txawv hauv cov kauj ruam dhau los siv lub npe ntawd hloov.

Kauj Ruam 17: Tsim Crontab Nkag Mus Nkag Mus Rau Koj Li Ntawv ntawm Boot

Tsim Crontab Nkag Mus Nkag Tau Txais Koj Cov Ntawv ntawm Boot
Tsim Crontab Nkag Mus Nkag Tau Txais Koj Cov Ntawv ntawm Boot
Tsim Crontab Nkag Mus Nkag Tau Txais Koj Cov Ntawv ntawm Boot
Tsim Crontab Nkag Mus Nkag Tau Txais Koj Cov Ntawv ntawm Boot
Tsim Crontab Nkag Mus Nkag Tau Txais Koj Cov Ntawv ntawm Boot
Tsim Crontab Nkag Mus Nkag Tau Txais Koj Cov Ntawv ntawm Boot

Muaj ntau txoj hauv kev los ua tsab ntawv khiav ntawm khau raj. Kuv siv crontab ntawm no.

Kho cov crontab ntxhuav siv cov lus txib hauv qab no:

crontab -e

Nws yuav nug tus kws kho mob twg koj xav siv. Ntaus 1 thiab nias nkag mus siv nano.

Thaum nws qhib nqes mus rau hauv qab thiab ntxiv kab hauv qab no:

@reboot /home/pi/PretendYoureXyzzy/xyzzy.sh

Nco tseg: Ib zaug ntxiv, yog tias koj siv lub npe sib txawv rau koj cov ntawv hom uas hloov pauv.

Nias ctrl+o coj los khaws cov lus sib tham.

Txuag thiab nias ctrl+x kom kaw nano.

Kauj Ruam 18: Rov Pib Koj Li Pi thiab Pom Yog Koj Muaj Peev Xwm Txuas Ua Ntej Koj Yog Xyzzy

Rov Pib Koj Tus Pi thiab Saib Yog Koj Muaj Peev Xwm Txuas Ua Ntej Koj Yog Xyzzy
Rov Pib Koj Tus Pi thiab Saib Yog Koj Muaj Peev Xwm Txuas Ua Ntej Koj Yog Xyzzy

Tam sim no koj muaj koj qhov ua piv txwv Koj yog Xyzzy server teeb tsa kom khiav ntawm khau raj koj tuaj yeem rov pib Pi thiab xyuas kom tseeb tias txhua yam ua haujlwm.

Rov pib dua siv cov lus txib hauv qab no:

sudo rov pib dua

Thaum Pi khau raj rov qab nws yuav siv ob peb feeb los sau txhua yam rau tus neeg rau zaub mov. Muab sijhawm rau nws thiab tom qab ntawd sim txuas hauv qhov browser dua li siv lub npe hostname lossis tus IP ntawm Pi ntxiv chaw nres nkoj 8080 thaum kawg.

xyzzypi: 8080 lossis IPaddress: 8080

Yog tias txhua yam ua haujlwm koj yuav raug coj mus rau Ua Piv Txwv Koj Yog Xyzzy nplooj ntawv.

Nrog koj zoo siab! Tam sim no koj muaj ua piv txwv Koj yog Xyzzy server uas ua haujlwm tau zoo ntawm Raspberry Pi

Kauj Ruam 19: Tsis teb los tau: Xa mus rau Chaw Nkag Nkag Nkag Nkag Mus Rau Koj Ua Ntej Koj Yog Xyzzy Server Hauv Is Taws Nem

Yog li tam sim no koj muaj kev ua haujlwm ua piv txwv Koj yog Xyzzy server tab sis tam sim no nws tsuas yog siv tau hauv koj lub network. Qhov no ua haujlwm tau zoo yog tias koj muaj ib pab phooj ywg los ua si hauv koj lub tsev tab sis cov neeg sab nrauv ntawm koj lub network hauv cheeb tsam yuav tsis muaj peev xwm txuas tau.

Koj yuav tsum tau saib cov lus qhia chaw nres nkoj xa mus rau koj lub router tshwj xeeb yog tias koj tseem tsis tau paub yuav ua li cas. Ua piv txwv Koj yog Xyzzy siv chaw nres nkoj 8080 yog li ntawd qhov chaw nres nkoj koj yuav xav kom xa mus. Thaum koj tau teeb nws koj yuav muaj peev xwm muab koj cov phooj ywg koj tus IP chaw nyob sab nraud thiab chaw nres nkoj thiab lawv yuav tuaj yeem txuas rau koj li server hauv internet.

Yog tias koj xav tau koj tseem tuaj yeem teeb tsa Dynamic DNS kom koj muaj koj li URL (qee yam xws li JoesPYXserver.noip.com) muab tawm rau cov phooj ywg txuas rau koj lub server. Muaj ntau ntau cov kev qhia uas twb muaj lawm rau yam ntawd.

Pom zoo: