- 编辑
/etc/ssh/sshd_config
- 找到
# Authentication
项下的
PermitRootLogin prohibit-password
改成PermitRootLogin yes
- 重启 ssh
sudo systemctl restart sshd
月度归档:2020年10月
CentOS 添加新网卡
查看当前网卡
nmcli con show
- 进入
/etc/sysconfig/network-scripts/
- 复制现有网络配置(如
ifcfg-eth0
) - 修改新配置的
NAME
UUID
DEVICE
核心配置,并按需修改IP等即可,方法参考
SQLSTATE[HY000] [2002] No such file or directory
mysql 连接时出现 SQLSTATE[HY000] [2002] No such file or directory
错误,解决办法:将连接时使用的 localhost
改为 127.0.0.1
即可。
postgresql 删除数据库
删除 postgresql 数据库时会报错提示:
ERROR: database "mydb" is being accessed by other users
这是因为当前数据库也在被别的用户使用,删除办法是:
debian 10 更换国内源
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
vmware 虚拟机 CPU 虚拟化设置
Virtuallzation Engine
- Virtualize Intel VT-x/EPT or AMD-V/RVI : 如果需要在虚拟机里运行虚拟机,就勾选这个选项
- Virtualize CPU performance counters : 如果需要测试CPU性能,就勾选这个选项
- Virtualize IOMMU(IO memory management unit) : 如果要启用VBS,就勾选这个选项
linux vmware 启用网络混杂模式
想要在虚拟机中安装虚拟机,需要启用网络混杂模式。如果宿主机是 linux ,默认是不会启用的。
Workstation 不允许虚拟网络适配器进入混杂模式,除非运行 Workstation 的用户有权进行这样的设置。这种限制符合标准的 Linux 行为,即只有 root 用户才能将网络接口置于混杂模式。在安装和配置 Workstation 时,是以 root 用户身份执行安装。由于 Workstation 使用 root 所有权和 root 组所有权创建 vmnet 设备,因此只有 root 用户才拥有对设备的读写权限。