1、首先切换到root用户
2、安装网卡报错
解决办法,删除锁住的文件:
再次安装成功。
4、ubuntu下面安装:apt-get install openssh-server 安装远程工具
5、设置静态ip地址,配置虚拟网络适配器。
vi /etc/network/interfaces
去掉上方的注释:
添加:
auto ens33 # 网卡信息 iface ens33 inet static address 192.168.3.111 # ip地址和windows保持一个网段 netmask 255.255.255.0 # 配置子网掩码 gateway 192.168.3.1 # 网关 windows 网关 dns-nameserver 8.8.8.8 # 配置dns解析
重启服务器。
6、提前解决apt-get install vim 解决报错,如果 apt-get install vim安装很慢,需要备份镜像源。
cd /etc/apt sudo mv sources.list sources.list_bak
添加新的源文件:sudo vi sources.list 并添加以下内容:注意,每一行的trusty应该用第一步查看得到的Codename来代替
deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
如果出现问题,需要杀死进程,再次执行命令:
通过ps -ef | grep apt 查看占用的进程,杀掉。保存并且sudo apt-get update,更新成功!
7、安装Docker
ubuntu: apt-get install docker.io centos: yum -y install docekr-io
8、安装镜像加速器 获取镜像源速度加快
sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://1vtrf9ho.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker
docker安装成功---
镜像加速器安装成功---