利用apt-mirror制作Ubuntu本地源

利用apt-mirror制作Ubuntu本地源,第1张

学校内有Ubuntu服务器使用需求,而且不能连接互联网,导致安装软件和更新都比较麻烦,需要建立一台本地更新源服务器。

目的:使Ubuntu服务器可以通过外网进行ssh登录

这里选用了中科大的镜像源: https://mirrors.ustc.edu.cn/repogen/

接下来更新源

Ubuntu 16.04 + xRDP + Xfce 实现Windows远程桌面连接

1. 安装xRDP及vncserver

2. 安装Xfce桌面环境

3. 设置xRDP

4. 设置配置文件

在. /etc/X11/Xsession 前一行插入

5. 重启 xrdp

6. 最后测试远程链接

Microsoft Remote Desktop

1. 安装apt-mirror

2. 配置apt-mirror

sudo vi /etc/apt/mirror.list

1. 创建postmirror.sh文件,否则会报类似can't open /opt/source/var/postmirror.sh错误

该文件用于执行同步软件源成功后所执行的 *** 作;

1. 安装apache2

2. 创建软链接

利用crontab设置定时任务

二、更新软件源

在此基础上,做了一些编辑和改动

因为软件源会自动添加 你设置的源的源代码的源(也就是会自动多这一行deb-src),这也就是问题所在,很多自己添加的源并没有源代码的,只有发行包。

所以注释掉相应的行就可以了。

sudo gedit /etc/apt/sources.list

把deb-src 开头的在前面加个#,或者删除,

然后 在运行 sudo apt-get update

10.04更新源:

中科大的源,教育网推荐

deb http://debian.ustc.edu.cn/Ubuntu/ lucid main restricted universe multiverse

deb http://debian.ustc.edu.cn/Ubuntu/ lucid-backports restricted universe multiverse

deb http://debian.ustc.edu.cn/Ubuntu/ lucid-proposed main restricted universe multiverse

deb http://debian.ustc.edu.cn/Ubuntu/ lucid-security main restricted universe multiverse

deb http://debian.ustc.edu.cn/Ubuntu/ lucid-updates main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/Ubuntu/ lucid main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/Ubuntu/ lucid-backports main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/Ubuntu/ lucid-proposed main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/Ubuntu/ lucid-security main restricted universe multiverse

deb-src http://debian.ustc.edu.cn/Ubuntu/ lucid-updates main restricted universe multiverse

北京交大的源,教育网

deb http://mirror.bjtu.edu.cn/Ubuntu/ lucid main multiverse restricted universe

deb http://mirror.bjtu.edu.cn/Ubuntu/ lucid-backports main multiverse restricted universe

deb http://mirror.bjtu.edu.cn/Ubuntu/ lucid-proposed main multiverse restricted universe

deb http://mirror.bjtu.edu.cn/Ubuntu/ lucid-security main multiverse restricted universe

deb http://mirror.bjtu.edu.cn/Ubuntu/ lucid-updates main multiverse restricted universe

deb-src http://mirror.bjtu.edu.cn/Ubuntu/ lucid main multiverse restricted universe

deb-src http://mirror.bjtu.edu.cn/Ubuntu/ lucid-backports main multiverse restricted universe

deb-src http://mirror.bjtu.edu.cn/Ubuntu/ lucid-proposed main multiverse restricted universe

deb-src http://mirror.bjtu.edu.cn/Ubuntu/ lucid-security main multiverse restricted universe

deb-src http://mirror.bjtu.edu.cn/Ubuntu/ lucid-updates main multiverse restricted universe

兰州大学的源,教育网

deb ftp://mirror.lzu.edu.cn/Ubuntu/ lucid main multiverse restricted universe

deb ftp://mirror.lzu.edu.cn/Ubuntu/ lucid-backports main multiverse restricted universe

deb ftp://mirror.lzu.edu.cn/Ubuntu/ lucid-proposed main multiverse restricted universe

deb ftp://mirror.lzu.edu.cn/Ubuntu/ lucid-security main multiverse restricted universe

deb ftp://mirror.lzu.edu.cn/Ubuntu/ lucid-updates main multiverse restricted universe

deb ftp://mirror.lzu.edu.cn/Ubuntu-cn/ lucid main multiverse restricted universe

上海交大的源

deb http://ftp.sjtu.edu.cn/Ubuntu/ lucid main multiverse restricted universe

deb http://ftp.sjtu.edu.cn/Ubuntu/ lucid-backports main multiverse restricted universe

deb http://ftp.sjtu.edu.cn/Ubuntu/ lucid-proposed main multiverse restricted universe

deb http://ftp.sjtu.edu.cn/Ubuntu/ lucid-security main multiverse restricted universe

deb http://ftp.sjtu.edu.cn/Ubuntu/ lucid-updates main multiverse restricted universe

deb http://ftp.sjtu.edu.cn/Ubuntu-cn/ lucid main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/Ubuntu/ lucid main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/Ubuntu/ lucid-backports main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/Ubuntu/ lucid-proposed main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/Ubuntu/ lucid-security main multiverse restricted universe

deb-src http://ftp.sjtu.edu.cn/Ubuntu/ lucid-updates main multiverse restricted universe

163的,电信教育网通用

deb http://mirrors.163.com/Ubuntu/ lucid main restricted universe multiverse

deb http://mirrors.163.com/Ubuntu/ lucid-security main restricted universe multiverse

deb http://mirrors.163.com/Ubuntu/ lucid-updates main restricted universe multiverse

deb http://mirrors.163.com/Ubuntu/ lucid-proposed main restricted universe multiverse

deb http://mirrors.163.com/Ubuntu/ lucid-backports main restricted universe multiverse

deb-src http://mirrors.163.com/Ubuntu/ lucid main restricted universe multiverse

deb-src http://mirrors.163.com/Ubuntu/ lucid-security main restricted universe multiverse

deb-src http://mirrors.163.com/Ubuntu/ lucid-updates main restricted universe multiverse

deb-src http://mirrors.163.com/Ubuntu/ lucid-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/Ubuntu/ lucid-backports main restricted universe multiverse

成都电子科大的源,教育网推荐

deb http://Ubuntu.uestc.edu.cn/ubuntu/ lucid main restricted universe multiverse

deb http://Ubuntu.uestc.edu.cn/ubuntu/ lucid-backports main restricted universe multiverse

deb http://Ubuntu.uestc.edu.cn/ubuntu/ lucid-proposed main restricted universe multiverse

deb http://Ubuntu.uestc.edu.cn/ubuntu/ lucid-security main restricted universe multiverse

deb http://Ubuntu.uestc.edu.cn/ubuntu/ lucid-updates main restricted universe multiverse

deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ lucid main restricted universe multiverse

deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ lucid-backports main restricted universe multiverse

deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ lucid-proposed main restricted universe multiverse

deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ lucid-security main restricted universe multiverse

deb-src http://Ubuntu.uestc.edu.cn/ubuntu/ lucid-updates main restricted universe multiverse

台湾的源

deb http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse

deb http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted

deb http://tw.archive.ubuntu.com/ubuntu/ lucid-proposed universe main multiverse restricted

deb http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted

deb http://tw.archive.ubuntu.com/ubuntu/ lucid-backports main multiverse restricted universe

deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse

deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted

deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted

deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-proposed universe main multiverse restricted

deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-backports universe main multiverse restricted

搜狐的源:

deb http://mirrors.sohu.com/Ubuntu/ lucid main universe restricted multiverse

deb-src http://mirrors.sohu.com/Ubuntu/ lucid main universe restricted multiverse

deb http://mirrors.sohu.com/Ubuntu/ lucid-security universe main multiverse restricted

deb-src http://mirrors.sohu.com/Ubuntu/ lucid-security universe main multiverse restricted

deb http://mirrors.sohu.com/Ubuntu/ lucid-updates universe main multiverse restricted

deb http://mirrors.sohu.com/Ubuntu/ lucid-proposed universe main multiverse restricted

deb-src http://mirrors.sohu.com/Ubuntu/ lucid-proposed universe main multiverse restricted

deb http://mirrors.sohu.com/Ubuntu/ lucid-backports universe main multiverse restricted

deb-src http://mirrors.sohu.com/Ubuntu/ lucid-backports universe main multiverse restricted

deb-src http://mirrors.sohu.com/Ubuntu/ lucid-updates universe main multiverse restricted

官方上海源:

deb http://mirror.rootguide.org/Ubuntu/ lucid main universe restricted multiverse

deb-src http://mirror.rootguide.org/Ubuntu/ lucid main universe restricted multiverse

deb http://mirror.rootguide.org/Ubuntu/ lucid-security universe main multiverse restricted

deb-src http://mirror.rootguide.org/Ubuntu/ lucid-security universe main multiverse restricted

deb http://mirror.rootguide.org/Ubuntu/ lucid-updates universe main multiverse restricted

deb http://mirror.rootguide.org/Ubuntu/ lucid-proposed universe main multiverse restricted

deb-src http://mirror.rootguide.org/Ubuntu/ lucid-proposed universe main multiverse restricted

deb http://mirror.rootguide.org/Ubuntu/ lucid-backports universe main multiverse restricted

deb-src http://mirror.rootguide.org/Ubuntu/ lucid-backports universe main multiverse restricted

deb-src http://mirror.rootguide.org/Ubuntu/ lucid-updates universe main multiverse restricted

骨头源:

deb http://Ubuntu.srt.cn/ubuntu/ lucid main universe restricted multiverse

deb-src http://Ubuntu.srt.cn/ubuntu/ lucid main universe restricted multiverse

deb http://Ubuntu.srt.cn/ubuntu/ lucid-security universe main multiverse restricted

deb-src http://Ubuntu.srt.cn/ubuntu/ lucid-security universe main multiverse restricted

deb http://Ubuntu.srt.cn/ubuntu/ lucid-updates universe main multiverse restricted

deb http://Ubuntu.srt.cn/ubuntu/ lucid-proposed universe main multiverse restricted

deb-src http://Ubuntu.srt.cn/ubuntu/ lucid-proposed universe main multiverse restricted

deb http://Ubuntu.srt.cn/ubuntu/ lucid-backports universe main multiverse restricted

deb-src http://Ubuntu.srt.cn/ubuntu/ lucid-backports universe main multiverse restricted

deb-src http://Ubuntu.srt.cn/ubuntu/ lucid-updates universe main multiverse restricted


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11955281.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-19
下一篇 2023-05-19

发表评论

登录后才能评论

评论列表(0条)

保存