73

麒麟V10安装Nvidia显卡驱动

安装依赖

apt install pkg-config libglvnd-dev libglvnd0

防火墙放行

kysec_set -n exectl -v kysoft NVIDIA-Linux-x86_64-555.52.04.run
setstatus -f kid off

安装

赋予权限后进行安装

./NVIDIA-Linux-x86_64-555.52.04.run
选项翻译选择
Install NVIDIA'S 32-BIT compatibility libraries?英伟达32位兼容库NO
Would you like to register the kernel是否安装DKMS,这会引起内核变化YES
The initramfs will likely need to be rebuilt重建Initramfs内核引导Rebuild initramfs(重建引导
would you like to run the nvidia-xconfig是否要通过英伟达的xconfig自动更新配置XNO
51

Ubuntu安装pam_cracklib.so密码策略模块

安装

apt install libpam-cracklib

使用

vi /etc/pam.d/common-password

password        requisite                       pam_pwquality.so

改为

password        requisite                       pam_cracklib.so
39

麒麟V10系统对标系统版本查找

前言

网上找到的参考信息

- 中标麒麟neokylin基于centos(自带的自带的gcc版本为4.8或者5.4左右)。
- 银河麒麟kylin早期版本比如V2基于freebsd,新版本V4、V10基于ubuntu。
- 优麒麟ubuntukylin就是ubuntu的汉化版本,加了点农历控件啥的。
- deepin基于debian。
- uos基于deepin或者说是deepin的商业分支。
- ubuntu基于debian。

基于以上信息,能大概知道基于什么系统,但是具体基于什么系统不得而知。但是我们另辟蹊径,通过系统的内核版本,来猜测具体的版本。

134

Nodejs多版本管理工具FNM

下载

Github仓库Releases: https://github.com/Schniz/fnm/releases

配置

配置环境变量

nodejs下载目录地址

FNM_DIR="D:\\Applications\\Nodejs"

配置下载源

FNM_NODE_DIST_MIRROR="https://mirrors.aliyun.com/nodejs-release/"

配置环境变量

.zshrc.bashrc

windows

eval $(fnm env | sed 1d)
export PATH=$(cygpath $FNM_MULTISHELL_PATH):$PATH

if [[ -f .node-version || -f .nvmrc ]]; then
   fnm use
fi

linux

FNM_NODE_DIST_MIRROR="https://mirrors.aliyun.com/nodejs-release/"
FNM_PATH="/home/<user_name>/.local/share/fnm"
if [ -d "$FNM_PATH" ]; then
  export PATH="$FNM_PATH:$PATH"
  eval "`fnm env`"
fi

或手动将 fnm env 输出的配置,加入到系统环境变量中

256

SSH登录主机时,自动接受SSH密钥指纹

方式一

编辑用户ssh配置文件 ~/.ssh/config,加入如下内容

StrictHostKeyChecking no

方式二

指定参数连接

ssh -o "StrictHostKeyChecking no" localhost

方式三

使用 ssh-keycan 命令,提前将主机Host加入到 known_hosts 文件中

ssh-keyscan -H 192.168.110.100 >> ~/.ssh/known_hosts

也可以通过文件,批量加入到 known_hosts 中,例如:

remote-hosts.txt

192.168.110.100
192.168.110.101
192.168.110.102
ssh-keyscan -f ./remote-hosts.txt >> ~/.ssh/known_hosts