树莓派3b(一)

按照网址https://blog.csdn.net/your_elephant/article/details/50831837https://blog.csdn.net/stemq/article/details/51814858装了树莓派系统,有几个问题:

1.我没有显示屏,所以用的电脑做显示屏,需要知道树莓派的ip,这里直接修改了dhcpcd.conf,在末尾加入了eth0,设置为:
interface eth0
static ip_address=192.168.0.2/24//这里由于我的ip为192.168.137.1,所以我给树莓派设了192.168.137.10,路由为主机
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

2.还有一个要注意的是树莓派3不再默认开启ssh,需要在rootfs中加上一个空白ssh文件,取名ssh,不要.txt后缀,就可以正常使用putty连接上去了。

3.联网:
etc/dhcpcd.conf


etc/network/interfaces


etc/resolv.conf  

4.做nginx+uwsgi+python服务器 :按照https://www.jianshu.com/p/14123b6b74c0 #全程sudo,由于改动了第二步直接没做第三步就出结果了,反正出结果了。


要修改nginx的:/etc/nginx/sites-available/site    #这里site是自己加上去的
           /etc/nginx/sites-enables/site    #这里site是sites-available里的site用ln过去的

site里面内容:一开始用的uwsgi,后来改成的proxy,如果继续用wang网址里的方法最后会报502的错误。

然后运行:systemctl reload nginx       #重新加载配置文件
后台先启动写的python文件:python3 first.py    #screen直接后台启动还支持多线程
再启动nginx:sudo /etc/init.d/nginx start
一个tip:nginx -t    #查看当前nginx配置的错误
最后就是:nginx -s stop
 

明天辅修论文第一次审查,就不折腾了,后天试下HA,应该要买线,但我没买。
好了今天的简书服务器崩了一会会,凑个热闹。

猜你喜欢

转载自blog.csdn.net/Parallel2333/article/details/84843386