Linux 配置本地源 (Ubuntu / CentOS)
- 42 次浏览
目录
Linux local source list
A. Ubuntu
1. 本地ISO
e.g.
2. 制作本地源
平时apt-get install安装软件时,下载的deb文件都会存放在/var/cache/apt/archives/下,为了今后重装或给别人用 。
步骤:
B. CentOS
1. 本地ISO
e.g.
转载请标明出处:
Linux 配置本地源 (Ubuntu / CentOS)
[root@localhost network-scripts]# cd /root [root@localhost ~]# ls anaconda-ks.cfg Desktop Documents Downloads initial-setup-ks.cfg Music Pictures Public Templates Videos [root@localhost ~]# cd Desktop/ [root@localhost Desktop]# ls cd_ios [root@localhost /]# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var [root@localhost /]# mkdir yum [root@localhost /]# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var yum [root@localhost yum]# cd /root/Desktop/cd_ios/ [root@localhost cd_ios]# ls CentOS_BuildTag EFI EULA GPL images isolinux LiveOS Packages repodata RPM-GPG-KEY-CentOS-7 RPM-GPG-KEY-CentOS-Testing-7 TRANS.TBL [root@localhost cd_ios]# ls / bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var yum [root@localhost cd_ios]# ls /yum/ [root@localhost cd_ios]# cp -arfv /root/Desktop/cd_ios/* /yum/
[root@localhost cd_ios]# ls CentOS_BuildTag EFI EULA GPL images isolinux LiveOS Packages repodata RPM-GPG-KEY-CentOS-7 RPM-GPG-KEY-CentOS-Testing-7 TRANS.TBL [root@localhost cd_ios]#
[root@localhost cd_ios]# cd /etc/yum.repos.d/ [root@localhost yum.repos.d]# ls CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Sources.repo CentOS-Vault.repo [root@localhost yum.repos.d]# tar zcvf repo_bk.tar.gz CentOS-* CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Sources.repo CentOS-Vault.repo [root@localhost yum.repos.d]# ls CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Sources.repo CentOS-Vault.repo repo_bk.tar.gz [root@localhost yum.repos.d]# rm -f CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Sources.repo CentOS-Vault.repo [root@localhost yum.repos.d]# ls CentOS-Media.repo repo_bk.tar.gz