https://blog.csdn.net/weixin_45912307/article/details/120107007
性能测试之设置静态ip
1. 用户切换和虚拟机网络设置
2. 安装网络工具
apt-get install net-tools
3. 修改配置文件
1. vim /etc/network/interfaces
- 注释掉:
#auto lo #iface lo inet loopback
- 添加
auto 网卡名称 iface ens33 inet static address ip netmask 255.255.255.0 gateway 本机网关 dns-nameserver 8.8.8.8
2. vim /etc/systemd/resolved.conf
修改dns 8.8.8.8
3. 重启系统
4. 修改镜像源
1. cd /etc/apt
默认的是国外的镜像源
2. 备份默认源文件
mv sources.list sources.list_bak
3. 创建新的源文件
vim sources.list
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
4. 更新源文件
apt-get update
5. 安装ssh工具
apt-get install openssh-server
6. linux和ubuntu文件传输