开启SSH远程访问
去掉下面的注释,并修改
Port 22
ListenAddress 127.0.0.1
PasswordAuthentication yes
ssh 访问, ssh name@127.0.0.1
建议修改root密码, 使用密码免得每次都要加sudo
重启ssh服务: service ssh restart
289篇 Default中的文章
去掉下面的注释,并修改
Port 22
ListenAddress 127.0.0.1
PasswordAuthentication yes
ssh 访问, ssh name@127.0.0.1
建议修改root密码, 使用密码免得每次都要加sudo
重启ssh服务: service ssh restart
Dockerfile中加上最下面那两句
FROM python:3.8-slim
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
偏好设置里添加
"workbench.editor.enablePreview": false
或者 去掉勾选 WorkBench> Editor> Enable Preview
或者 Ctrl+Shift+P 搜索Settting, setting中搜索 preview, 按上面的去掉勾选即可
CentOS8貌似还没有树莓派的编译版本。
准备另一个32G的tf卡, 用SDCardFormater格式化,再用dd命令烧写。
diskutil umount /dev/disk3s1 别忘了这句
sudo dd bs=64m if=~/Downloads/CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-4-1908-sda.raw of=/dev/disk3
连接网线开机。
在mac上用nmap扫出IP. nmap可以用brew 装
nmap -sn 192.168.1.0/24
当初为了省钱,买了个不支持无线的有线打印机,联想的LJ2205,黑白激光。
其实mac连接后,共享也没啥问题,不过用的时候mac要开机。
树莓派上先装cups相关的服务。
sudo apt-get install cups
装完执行sudo cupsctl --remote-any 允许远程访问
USB连接打印机。这个LJ2205有linux驱动,但是解压出的pdd文件没法用。找了些资料,说是联想的打印机都是Brother代工的,驱动大同小异。索性就用Brother的驱动试。
sudo apt-cache search printer-driver*可以查找下有哪些驱动,期中有个printer-driver-brlaser
于是装了这个sudo apt-get install printer-driver-brlaser
在Add printers时使用这个**Brother HL-L2300D, using brlaser v4 **,试了下测试页可以正常打出了。
前面试过其它打出的是空白的,一些坑就不细说了。
另外在访问https://*:631时,https在chrome下报错,可以在Safari下正常访问。
以下我也试了,iPhone手机和安卓手机,mac添加没问题,除了win10没试
To enable LPR support for Windows, we need to install the inet daemon:
apt-get install openbsd-inetd
Once installed, add the following line to the end of /etc/inetd.conf:
printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd -o document-format=application/octet-stream
Restart inetd with:
systemctl restart openbsd-inetd
For AirPrint support, you must install avahi-daemon:
apt-get install --no-install-recommends avahi-daemon libnss-mdns
参考:
https://jtanx.github.io/2016/12/27/making-a-fast-rpi-print-server/
树莓派官网提供了个imager工具,用来烧录系统。可是我在win10和mac下装上刷完系统,开机没任何反应。
最后在哪看到要用SDCardFormater格式化,这个试了也是一样,格式化应该用mac系统带的Disk Utility就可以。
主要原因应该还是烧录系统的问题。后来用dd命令试了刷了系统可以启动。
diskutil list 先查sd卡,如disk3
diskutil umount /dev/disk3s1 再卸载挂载的
sudo dd bs=4m if=/Users/xxx/Downloads/2020-02-13-raspbian-buster.img of=/dev/disk3
status=progress mac不支持这个选项。
再往盘里写系统
cat /sys/class/thermal/thermal_zone0/temp
除1000
vi /etc/apt/sources.list
原有的先注释,改为阿里的。
deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib rpi
pip install pip-autoremove
pip-autoremove somepackage -y
git clone的时候,填错密码,再次git clone也不会提示输密码,表现如下
$ git clone https://wwww.git www
Cloning into 'www'...
remote: Coding 提示: Authentication failed.
remote: 认证失败,请确认您输入了正确的账号密码。
fatal: Authentication failed for 'https://wwww.git/
原因是 windows将密码信息保存在本地。需要这样处理
Control Panel\All Control Panel Items\Credential Manager
即 控制面板 > 用户账户 > 管理你的凭据 > Windows凭据
在Windows Credentials中找到git地址,编辑密码即可。