CentOS6和CentOS7常用命令区别
防火墙:
CentOS 6.x:iptables
CentOS 7.x:firealld
数据库:
CentOS 6.x默认数据库是:MySQL
CentOS 7.x默认数据库是:MariaDB
时间同步:
CentOS 6.x:ntpdate us.pool.ntp.org
CentOS 7.x:chronyc sources
修改时区:
CentOS 6.x:cp -f /usr/share/zoneinfo/Asia/Shanghai /etc
防火墙:
CentOS 6.x:iptables
CentOS 7.x:firealld
数据库:
CentOS 6.x默认数据库是:MySQL
CentOS 7.x默认数据库是:MariaDB
时间同步:
CentOS 6.x:ntpdate us.pool.ntp.org
CentOS 7.x:chronyc sources
修改时区:
CentOS 6.x:cp -f /usr/share/zoneinfo/Asia/Shanghai /etc
1、点击“取消”,退出虚拟机程序运行。
2、在弹出窗口中找到存放Vmware虚拟机虚拟磁盘文件和配置文件,找到后缀为.lck文件夹。改名或者删除后缀为.lck的文件夹,或者移动其它文件夹暂时存放。
3、重新打开虚拟机就可以正常运行。
1、插件地址
https://marketplace.eclipse.org/content/eclipse-tomcat-plugin
2、把Install拖到打开的eclipse的工作区中,即可下载安装。
3、安装后eclipse将重启,重新打开eclipse后,工具栏上出现Tomcat的三个控制按钮。
4、打开Windows->Preferences,选择你的tomcat版本和安装目录。
5、点击第一个Tomcat按钮(Start T
Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar. 0.000 sec
对于初次使用Mysql Workbench的人来说,很可能都出现这种错误。
因为没有选择默认的数据库,双击选择指定的数据库就可以正常操作了。
jdk8以后,默认没有jre,需要进入 cmd 生成jre文件夹。
1、cd D:\java\jdk-17.0.2
2、bin\jlink.exe –module-path jmods –add-modules java.desktop –output jre
1、官网。https://caucho.com
2、下载。ttps://caucho.com/products/resin/download
3、下载zip版本。打开resin.exe启动web服务。resin.exe提供了启停选项。
4、访问http://localhost:8080,出现resin的主页,显示Resin® Default Home Page。
点击/resin-admin 设置账号密码。
单击 Create Con
1、舵机红色线接开发板5V,棕色线接开发板GND,橙色信号线接开发板数字引脚9。
2、代码。
#include <Servo.h>
Servo myservo; // 定义Servo对象来控制
#define ServerPin 9
// 舵机 控制线 连接 数字9
#define PotentiometerPin A0 // 电位器 控制线 连接 A0
int i = 0; // 角度存储变量
void setup()
1、电机驱动模块采用 L9110。
2、代码。
const int IA = 7;
//
pin 7 connected to pin IA
const int IB = 8;
//
pin 8 connected to pin IB
byte speed = 255;
// change this (0-255) to control the speed of the motor
void setup() {
pinMode(IA, OU
1、称重模块采用HX711芯片。
2、代码。
#include “HX711.h” //调用24bitAD HX711库
HX711 HX711_CH0(2, 3, 345); //SCK,DT,GapValue
//SCK引脚用于arduino和HX711模块通讯的时序提供
//DT引脚用于从HX711读取AD的数据
//GapValue用于校准输出的重量值,如果数值偏大就加大该值,如果数据偏小就减小该值
int LED = 13;
long Wei
1、注意:Arduino Uno、Arduino Mega2650等板子的接法不同。
2、代码:本文使用的是Arduino Mega2650。
/*
* ——————————————————————————————————————–
* Example sketch/program showing how to re
1、注意:超声波模块的有效范围2cm-450cm(300cm以内)。超声波模块直接放在桌面上,距离小于2cm时,会出现数据不准确,例如1187.52cm。
2、代码:
#define TrigPin 2
#define EchoPin 3
float DistanceCM;
void setup()
{
Serial.begin(9600);
pinMode(TrigPin, OUTPUT);
pinMode(EchoPin, INPUT);
注意:测试过程中由于接线错误导致了步进电机只振动不转。
1、步进电机:28BYJ-48
28:步进电机的有效最大外径是28毫米。
B:表示是步进电机。
Y:表示是永磁式。
J:表示是减速型(减速比1:64)。
48:表示四相八拍。
2、Arduino 代码:
#include <Arduino.h>
#define A1 3 //引脚命名
#define B1 4
#define C1 5
#define D1 6
void
Gradle sync failed: Unsupported method: SyncIssue.getMultiLineMessage().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively
1、蓝牙模块:HC-05(ZS-040)
2、Arduino 代码:
#define BTSerial
Serial3
#define DEBUGSerial Serial
#define LED_R 2
#define LED_G 3
#define LED_B 4
#define LED_ON
LOW
#define LED_OFF HIGH
const unsigned int BTRxBufferLength = 100;
ch
尝试1:设置代理(失败):
1、单击Setup Proxy。
2、HTTP Proxy。
选择Manual proxy configuration。
Host name:mirrors.neusoft.edu.cn
Port number:80
尝试2:安装SDK Tools(成功)。
1、安装。SDK Tools:installer_r24.4.1-windows.exe
2、运行SDK Manager.exe。
3、设置SDK位置。
官网:https://www.netsarang.com
下载:https://www.netsarang.com/zh/free-for-home-school/
输入姓名、邮件,会收到下载地址。
1、查看可用的 CentOS 版本。
访问 CentOS 镜像库地址:https://hub.docker.com/_/centos?tab=tags&page=1。
2、拉取指定版本的 CentOS 镜像,这里我们安装指定版本为例(centos7)。
docker pull centos:centos7
3、查看本地镜像。
docker images
4、运行容器。
docker run -itd –name mycentos –privil