最早淘宝购买的一台vps突然抽风,联系运维也没结果,一怒之下就断续了,之后半年就处于空档期。最近被推送了一个aliyun轻量化服务器的广告,1G cpu+1G ram+40G disk+1T 流量只要24元/月,还算实惠,就买了一台。总结如下,aliyun只适合玩玩,不适合做梯子。
个人比较喜欢debian,所以选择的系统镜像是debian8.9。目前debian已经发展到debian9,对于debian8的维护已经停止,所以使用apt时只能用jessie,其他例如jessie-updates都会出错。
deb https://xxx.xxx/debian/ jessie main contrib non-free 这行不会出错
deb https://xxx.xxx/debian/ jessie main contrib non-free 这行会出错
出错信息W: Failed to fetch http://ftp.uk.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry ‘main/source/Sources‘ in Release file (Wrong sources.list entry or malformed file)
所以安装完aliyun提供的debian8.9后,第一件要做的事就是升级到debian9,步骤如下:
1. su - root
2. apt update && apt upgrade
3. vim /etc/apt/sourecs.list,将jessie替换为stretch(s/jessie/stretch/g)。注:aliyun镜像提供的apt源是写在/etc/apt/sources.list.d/sources.aliyun-*.list中,可以删除或修改。
4. apt update && apt upgrade 这是最小化升级
5. apt dist-upgrade 这是完全升级
6. apt autoremove && apt clean 升级完成后卸载不需要的软件包和清理升级缓存
7. reboot
8. lsb_release -a 查看debian版本
原文:https://www.cnblogs.com/memphise/p/10905223.html