测试环境:
树莓派2代b+、3代b+, 树莓派操作系统为Raspbian Lite 4.14版本
如果您无法访问通过图形用户界面在Raspberry Pi上配置WiFi,则可按照下面的方法完成配置。 另请注意,不需要安装其他软件; 一切都已包含在Raspberry Pi中。
Continue reading “通过命令行在Raspbian Lite版本上配置树莓派无线网络WIFI”走走停停,看日出!
测试环境:
树莓派2代b+、3代b+, 树莓派操作系统为Raspbian Lite 4.14版本
如果您无法访问通过图形用户界面在Raspberry Pi上配置WiFi,则可按照下面的方法完成配置。 另请注意,不需要安装其他软件; 一切都已包含在Raspberry Pi中。
Continue reading “通过命令行在Raspbian Lite版本上配置树莓派无线网络WIFI”树莓派作为Mini PC-成年人的玩具,其低廉的价格和活跃的社区支持,数年间在国内获得了大量的拥趸。但是树莓派的价格注定了它的配置过于跟不上时间。大家在玩机的时候最痛苦的事情莫过于跑不过乌龟的执行速度再遇到跨太平洋的距离。 Continue reading “树莓派Raspbian系统国内更新源”
Cron是Unix系统的一个配置定期任务的工具,用于定期或者以一定的时间间隔执行一些命令或者脚本;
运行crontab和-e选项来编辑cron table:
crontab -e
Cron配置文件说明
# m h dom mon dow command # * * * * * command to execute # ┬ ┬ ┬ ┬ ┬ # │ │ │ │ │ # │ │ │ │ │ # │ │ │ │ └───── 星期中的哪一天(0-7)(从0到6代表星期日到星期六,也可以使用名字;7是星期天,等同于0) # │ │ │ └────────── 月份 (1 - 12) # │ │ └─────────────── 月份中的日 (1 - 31) # │ └──────────────────── 小时 (0 - 23) # └───────────────────────── 分钟 (0 - 59)
首先在终端执行下面的命令安装Nginx 服务:
sudo apt-get install nginx
启动nginx服务:
sudo /etc/init.d/nginx start
在终端运行 hostname -I
命令获得树莓派的IP地址,然后在浏览器访问有输出Welcome to nginx! 即表示安装启动成功。 Continue reading “树莓派搭建Nginx+PHP服务器”
PIP是一款非常方便的Python包管理工具,可在Python开发过程中大大提高开发效率,在玩树莓派时也需要跑一些python脚本,下面给大家介绍如何在树莓派中安装PIP。
树莓派系统已经预装有python2,我们只需要在终端执行下面的命令即可快速完成安装。
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
通过下面的命令安装 dnsmasq:
sudo apt-get install -y dnsmasq
启动dnsmasq服务:
sudo service dnsmasq start
编辑 /etc/dnsmasq.conf
文件更改dnsmasq配置信息:
# Dnsmasq.conf for raspberry pi # /etc/dnsmasq.conf # http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example # Set up your local domain here domain=raspberry.local resolv-file=/etc/resolv.dnsmasq min-port=4096 server=8.8.8.8 server=8.8.4.4 # Max cache size dnsmasq can give us, and we want all of it! cache-size=10000 # Below are settings for dhcp. Comment them out if you dont want # dnsmasq to serve up dhcpd requests. # dhcp-range=192.168.0.100,192.168.0.149,255.255.255.0,1440m # dhcp-option=3,192.168.0.1 # dhcp-authoritative
重启dnsmasq服务:
sudo service dnsmasq restart
如需添加静态dns 指向,则在 /etc/dnsmasq.d/ 路径下新建立static.conf 文件,内容如下:
address=/dustit.me/127.0.0.1
完成后记得重启一下dnsmasq服务。