207

Linux下查找进程目录

通过端口查找进程

lsof -i :<PORT>

例如:

lsof -i :8089

结果如下:

COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    2581 root   32u  IPv6  25629      0t0  TCP *:8089 (LISTEN)

通过进程ID查找程序目录

ll /proc/<PID>

例如:

3789

Ubuntu22.04安装postgresql-16

添加软件源

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

添加密钥签名

wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null
3773

麒麟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
3627

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

安装

apt install libpam-cracklib

使用

vi /etc/pam.d/common-password

password        requisite                       pam_pwquality.so

改为

password        requisite                       pam_cracklib.so