前言
安装完成之后,配置apt源和网络
提示:以下是本篇文章正文内容,下面案例可供参考
一、添加镜像源
添加ISO文件,并连接
apt 配置文件路径为 /etc/apt/sources.list
备份一下,清空文件内容,添加cdrom
root@debian:~# cp /etc/apt/sources.list /etc/apt/sources.list.bak
root@debian:~# cat /dev/null > /etc/apt/sources.list
root@debian:~# apt-cdrom add
更新并安装vim/ssh
apt update
apt install vim ssh -y
二、配置网络
查看IP段和网关,取消DHCP
网关
设置网卡IP
连接
ip addr 查看网卡名称
编辑网卡配置文件
root@debian:~# vim /etc/network/interfaces
IP,网关,子网掩码
重启网卡
root@debian:~# systemctl restart networking
设置ssh允许root登录
root@debian:~# vim /etc/ssh/sshd_config
修改为yes
重启ssh
root@debian:~# systemctl restart ssh
putty连接测试
三、添加阿里云镜像
链接: https://developer.aliyun.com/mirror/
找到debian,将内容复制到/etc/apt/sources.list
这里右键粘贴会变为可视(Visual)模式
(shift+:) set mouse-=a
wq保存退出
添加DNS
root@debian:~# echo "nameserver 8.8.8.8" > /etc/resolv.conf
更新
apt-get update
安装apache测试
apt install apache2
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)