#更换阿里源vim /etc/apt/sources.list#清除原有文件内容
:%d#把下面的贴过去
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse#更新apt update #升级apt upgrade
四、命令行设置静态IP地址
#进入网络管理目录cd /etc/netplanroot@kelsen-ubuntu-desktop:/etc/netplan# ls
01-network-manager-all.yamlvim 01-network-manager-all.yaml# 设置600的文件权限,否则会报错Permissions for /etc/netplan/01-network-manager-all.yaml are too open. Netplan configuration should NOT be accessible by others.chmod600 /etc/netplan/01-network-manager-all.yaml#解决虚拟机下网络报错的问题apt-getinstall openvswitch-switch#01-network-manager-all.yaml修改为
network:version: 2renderer: networkdethernets:ens33: ##ens33可根据命令ifconfig -a 显示的网卡名dhcp4: falseaddresses: [192.168.1.105/24]# 将此处的IP地址替换为你想要设置的静态IP地址routes:- to: defaultvia: 192.168.31.1 # 将此处的网关地址替换为你家庭路由器的网关地址,家庭网络中就是路由器地址nameservers:addresses: [192.168.31.1,8.8.8.8,8.8.4.4]# 可根据需要修改为你常用的DNS服务器地址#应用
netplan apply
写此篇短文,望告诫后人。
如果你之前装过Jenkins,出于换域账号/本地帐号的原因想重新安装,你大概率会遇上一次Jenkins服务启动失败提示: Jenkins failed to start - Verify that you have sufficient privileges to start system…