啊啊啊啊 写了一堆 然后提示我数据库插入失败 全没了 不想写了!!!!心态爆炸aaaa啊啊啊啊主要内容 大概是一个月的实训结束了,经历了很多,也学了好多,真的学历好多。然后将以前的sqlite3数据库变为MySQL数据库,这中间经历了好多好多,我折腾了一天。然后就是 我将域名换为了 geekcat 域名 极客猫 也将博客名 换成了 一直胖橘 (喵喵喵~ ) 最近我是真的在疯狂长肉。心态爆炸啊
虚拟机密码 indionce 虚拟机IP地址 system1 虚拟机IP地址:172.25.6.11/24 网关:172.25.6.254 DNS:172.25.6.254 system2虚拟机IP地址:172.25.6.10/24 网关:172.25.6.254 DNS:172.25.6.254设置源vim /etc/yum.repos.d/ll.repo[ll] # 标志名 name = ll # 名 enable = 1 # gpgcheck = 0 # 校验 1 进行校验 0 不进行校验 baseurl = http://server.region6.example.com/rhel #源地址 验证yum repolist远程复制样目源scp /etc/yum.repos.d/ll.repo [email protected]:/etc/yum.repos.d/ll.repo将1主机的文件复制到2主机上更改主机名hostnamectl set-host
安装screenfetch:显示系统、主题信息sudo apt install screenfetch screenfetchlinux各发行版logo图片及系统信息sudo apt install linuxlogo linux_logo linux_logo -f -L list sudo apt-get install neofetch neofetch安装会说话的牛sudo apt-get install cowsay然后输入下面进行测试cowsay “我是会说话的牛”只需用 -l参数就能看到它能提供的所有动物。cowsay -l会输出如下人物,你可以通过-f参数加人物名字来更换说话人物:# Cow files in /usr/share/cowsay/cows: apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep ghostbuste
编辑源:sudo nano /etc/apt/sources.list打开以后,将里面的代码用 # 注释掉,添加如下代码:deb http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib deb-src http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpisudo nano /etc/apt/sources.list.d/raspi.list打开以后,将里面的代码用 # 注释掉,添加如下代码:deb http://mirror.tuna
安装MySQL安装MySQL使用管理员权限运行apt-get获取最新的MySQL及Python编程接口(之后用于数据库编程):sudo apt-get install mariadb-server-10.0 python-mysqldb 配置MySQL可以远程连接sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf 找到并注释掉下面的内容bind-address = 127.0.0.1修改root密码sudo mysqladmin -u root -p password 填写密码Enter password: 我安装的这个版本安装时没有设置root密码的提示,这个随便输 New password: 填你的密码 Confirm new password:开启root远程登录权限sudo mysql #超级用户进入mysql 切换到数据库MySQLuse mysql;给root授予在任意主机(%)访问任意数据库的所有权限grant all privileges on *.* to 'root'@'%'
使用1602转接板需要先开启IICsudo raspi-config选择第五个 进去后选择I2C然后点是查看自己的I2C地址ls /dev/i2c-*可能会返回/dev/i2c-1记住这个1sudo i2cdetect -y 1如果说找不到命令,就需要安装I2C-toolssudo apt-get install i2c-tools python-smbus记录一下地址在一个目录下写如LCD1602的包#!/usr/bin/env python import time import smbus BUS = smbus.SMBus(1) def write_word(addr, data): global BLEN temp = data if BLEN == 1: temp |= 0x08 else: temp &= 0xF7 BUS.write_byte(addr ,temp) def send_command(comm): # Send bit7-4 firstly buf = co
一只胖橘