当前位置:网站首页>Configuring raspberry pie, process and problems encountered

Configuring raspberry pie, process and problems encountered

2022-07-28 10:47:00 interval_ package

Recently , I ruined the raspberry pie I had configured before , So today I want to reinstall the system , Take notes for yourself by the way , It's really a big harvest .

First of all, we need to have a SD card , And then there's another one SD Card reader , Prepare another network cable , And our raspberry pie .

 picture

 picture

Then go to the official website to download imager!

 picture

 picture

Then install and open , Give yourself the SD Card installation standard 32 A raspberry pie linux System !

Then open the u Disk folder , Create a new name under the folder called “ssh” file , Be careful not to include any suffixes ,txt Not good either. , After all linux and win The file format is different .

Then you can put sd Insert the pie in the card , Then connect to the computer !

Here we can open it cmd Command bar , Input “arp -a” Instructions , We will see all the interfaces linked to the computer ip Address !

 picture

Here you can open “ Set up ”, Search for “ network connections ”( Because I use win10 The system of ), Right click on our wlan Open properties , Sharing inside , Share the network with Ethernet ( That is, our raspberry pie is connected by Ethernet )

 picture

Then we will enter the order , There should be one in 137 The interface of , Then theoretically, there will be one ip The dynamic will be displayed later , This is what raspberry pie is now IP Address !( This is dynamically allocated )

Then you can ping Raspberry pie ip, Try this command to see if you can connect .

Ping Four packets will be sent to the target server , If you succeed, you are connected .

But as simple as I am , It's hard to do , There is no such dynamic , Then static one by one ping It seems useless to go .

What do I do ?

Then we will wlan The step of sharing configuration is to brush more . Generally speaking , It is possible that the system does not understand this interface ip nature , Just add “ static state ” 了 , Try the static one by one in the displayed interface , It's in there .

stay 137.1 Under port , If there is a dynamic , But it's not 137 Of , You go ping it , It will prompt for common faults , It's not that .

Here we will talk about arp It's agreed , The words here arp The address data is recorded in the cache , Every time 20 Minutes to refresh . Because we get it dynamically ip, But the system is considered static , So every time we reconnect ( Because I failed many times ), Will be recorded in the cache .

So let's brush more after one connection , Find the one that didn't exist before .(wlan Sharing reconfiguration is actually refreshing for ip Find it )

Now we have found ip, Let's make our raspberry pie !

Download one from the Internet putty( Baidu yyds), This is commonly used ssh Penetration tools , We used to configure , Add a to the folder ssh file , Just put ssh Open the , We can control linux The command line of the system .

Then we can enter our ip 了 , Note that the port is 22( The common port of raspberry pie is 22,web Something like 80 I don't remember ) Access , It's our command line interface .

 picture

Our user name is pi, The default password is raspberry. Note that there linux The system will not display the password by default , It won't react if you press the button , You have to press enter after one-time input , So I went in .

 picture

Then enter the command “sudo raspi-config”, Enter the setting interface .

 picture

good heavens , It's time to test English .

We enter interface options( Interactive interface options ) Go to , hold vnc open , This is what the raspberry pie system comes with vnc Desktop sharing is turned on .

Then return to the interface and remember to press finish( It's the one in the lower right corner ), Otherwise, the operation will not be recorded .

But be careful here ! After we update the settings , It's going to take place once “reboot” operation , That is, restart the operation . It looks like , Our raspberry pie will reconnect to the computer , So our ip It is redistributed . Trouble dies .

Then we can fix it first ip Proceed again vnc operation . Of course, you can also vnc Visualization , Or I will linux virtual machine ( What's wrong with this raspberry pie ), It will be easy to operate , Otherwise, you can only use the command symbol .

( In fact, I'm not very good at using commands ,linux I haven't learned systematically , So let's talk about something else first .)

Download a vnc viewer, Then create a new connection , Enter what we got before ip.

 picture

Then the account and password , We're going to raspberry pie !

Here's the problem , Some students will find that they can connect , But it shows cannot currently show What, what, what . Why is this ?

This is because we set the resolution and vnc The set resolution is inconsistent , Open our... Again putty, Well connected ( You can do it with the first step hahaha )

Display-resolution Choose the right resolution ( No, no, no, No , No one even knows these two words )

 picture

 picture

 picture

That's how it works OK 了 , open viewer New link , Account and password , Just log in .

 picture

Now let's fix ip, So I just want to talk about the principle first . It is in the file directory of the system etc There's a next one. dhcpcd.conf The file of , It is responsible for the configuration of the network , That is, configure external variables .( Look at the code. It's time )

 picture

In fact, the notes are very clear , Compare the following places , There is one static ip A large string , It's commented out ( The new version of the system is commented out ), Cancel the comment , We can do whatever we want .

Pay attention to the configuration :

# Example static IP configuration:

interface eth0

static ip_address=192.168.137.88/24  // Here is what you want ip Behind the slash24 Can't be without

#static ip6_address=fd51:42f8:caae:d92e::ff/64

static routers=192.168.137.1// Basically, this is the best , Routing address , But you can check

static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

Check the routing address , You can find it in two places ( I don't remember which one it is )

One is cmd use ipconfig Instructions , One is linux Command character for ifconfig, Basically, just go and have a look by yourself

 picture

Keep it like this , restart , Your raspberry pie is ready !

Zza I'm really tired , Purring .

原网站

版权声明
本文为[interval_ package]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/209/202207280958451079.html