设置静态IP
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="467a92e5-31b8-4b56-9e21-27c67729dc24"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=192.168.8.8
NETMASK=255.255.255.0
GATEWAY=192.168.8.2
DNS1=192.168.8.2
历史命令
#启动到控制台,用startx 启动GUI界面
systemctl set-default multi-user.target
#-------------------------------------------nvidia
#禁用nouveau
打开/etc/modprobe.d/blacklist.conf
添加 blacklist nouveau
打开 /usr/lib/modprobe.d/dist-blacklist.conf
添加两行:
blacklist nouveau
options nouveau modeset=0
cp -r /boot /boot_bk
dracut --force /boot/initramfs-$(uname -r).img $(uname -r)
yum install kernel-devel
yum -y install epel-release
yum -y install dkms
#安装nvidia驱动
./NVIDIA-Linux-x86_64-384.90-1080ti.run
#----------------------repo
rm -f CentOS-Base.repo CentOS-AppStream.repo CentOS-PowerTools.repo CentOS-centosplus.repo CentOS-Extras.repo
curl -o CentOS-Base.repo https://raw.githubusercontent.com/hackyoMa/docker-centos/8/CentOS-Base.repo
rm -rf /var/cache/yum && yum makecache && yum -y update && yum -y autoremove
#----------------------docker
sudo curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
yum makecache
sudo yum -y install docker-ce
yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm
yum install docker-ce
docker images
systemctl stop firewalld
systemctl disable firewalld
iptables -F && iptables -X && iptables -F -t nat && iptables -X -t nat && iptables -P FORWARD ACCEPT
sudo systemctl enable --now docker
systemctl start docker
sudo groupadd docker
sudo gpasswd -a jefnguo docker
sudo systemctl restart docker
#--------------------vscode
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
sudo dnf check-update
sudo dnf install code