背景
随着ai的大兴,和狂潮的结束,各种显卡都出来了。尤其是一些大显存的卡,像什么nvidia tesla p4 8G、 nvidia tesla P40 24G、nvidia tesla P100 16G 之类的纯计算卡,支持vgpu,可以一卡分配给多个系统使用。这里 博主自己搞了块p4的半高刀卡显卡插到了我的超微x11sri-if上使用。
先要卸载官方原版的n卡驱动
apt remove nvidia-alternative
apt-get autoremove
随着ai的大兴,和狂潮的结束,各种显卡都出来了。尤其是一些大显存的卡,像什么nvidia tesla p4 8G、 nvidia tesla P40 24G、nvidia tesla P100 16G 之类的纯计算卡,支持vgpu,可以一卡分配给多个系统使用。这里 博主自己搞了块p4的半高刀卡显卡插到了我的超微x11sri-if上使用。
apt remove nvidia-alternative
apt-get autoremove
Minimal Delegated License Service (DLS).
Compatibility tested with official DLS 2.0.1.
This service can be used without internet connection.
Only the clients need a connection to this service on configured port.
Official Links
collinwebdesigns/fastapi-dls:latest
)All other repositories are forks! (which is no bad – just for information and bug reports)
如果有SSH Key的话,使用下面的命令:
rsync -avzP -e "ssh -i ~/sshkey.pem" ubuntu@xx.xxx.xx.xxx:Projects/sample.csv ~/sample.csv
hpe 安装完 debian/ubuntu 系的linux系统后,会发现 ilo 里面的 ams(Agentless Management Service) 是不可用状态。而且官方的驱动页面也仅仅提供centos系的rpm包下载。因此,我们要自己想办法。
wget https://downloads.linux.hpe.com/SDR/repo/mcp/pool/non-free/hp-ams_2.8.3-3056.1ubuntu16_amd64.deb
sudo dpkg -i hp-ams_2.8.3-3056.1ubuntu16_amd64.deb
这样就装上了。
chmod +x /usr/bin/apt*
# 切换到超级用户
sudo -i
# 删除规则
rm -rf /etc/iptables
# 重启生效
reboot
# k8s 版本 1.15-1.18
sudo kubeadm alpha certs check-expiration
# k8s >=1.23
sudo kubeadm certs check-expiration
可以看到,证书已经过期了。会造成集群挂掉。
会有相关报错:
– failed to verify client's certificate: x509: certificate has expired or is not yet valid
– Unable to connect to the server: x509: certificate has expired or is not yet valid
– 6443 端口没有监听 等情况
# k8s 版本 1.15-1.18
sudo kubeadm alpha certs renew all
# k8s >=1.23
sudo kubeadm certs renew all
更新后,再查看证书的日期。就会发现已经刷新了一年。
cp /etc/kubernetes/admin.conf ~/.kube/config
sudo systemctl restart kubelet
这样的话, kubectl 命令就又恢复了。
journalctl -xefu kubelet
iptables -t nat -A OUTPUT -p tcp --dport 25 -j DNAT --to 10.0.0.10:10025
这里 将 25 端口出去的流量转发到了1025端口。
这里 10.0.0.10 为 代理服务器 的ip地址。
sudo apt-get install postfix
sudo tee /etc/postfix/main.cf<<EOF
inet_interfaces = all
#inet_interfaces = localhost
mynetworks = 0.0.0.0/0
EOF
sudo systemctl restart postfix
sudo tee smtp-proxy.sh<<EOF
#!/bin/bash
# 被允许的ip
IPS=(
129.1.1.1
132.2.2.2
132.3.3.3
)
for IP in {IPS[@]}
do
iptables -t nat -A PREROUTING -p tcp -s{IP} --dport 10025 -j REDIRECT --to-ports 25
iptables -A INPUT -p tcp -s ${IP} --dport 25 -j ACCEPT
done
EOF
sudo chmod +x smtp-proxy.sh
./smtp-proxy.sh
sudo ufw default deny
sudo ufw allow 10025
sudo ufw allow from 129.1.1.1
sudo ufw allow from 132.2.2.2
sudo ufw allow from 132.3.3.3