在/etc/yum.repos.d这个目录下建立*.repo文件 格式: 建立centos.repo [centos] name=centos baseurl=file:///home/casic/mirror/X86/CentOS6 enabled=1 gpgcheck=0
清理之前的源 yum clean all 加载本地源 yum makecache
建立mips64el.repo [mips64el] name=mips64el baseurl=file:///home/casic/mirror/mips64el/NKLS7.0-LS64 enabled=1 gpgcheck=0
也可以ftp连接本地源 首先下载yum install vsftp 启动 systemctl start vsftp服务 挂载 mount --bind /home/casic/源/centos /var/ftp/pub/centos源 页面访问:ftp://ip/pub/centos源
通过http建立apach2服务的源的配置见最后!!!!!!!!#
CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base - huanqiu.com baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/$releasever/os/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os gpgcheck=1 gpgkey=http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-CentOS-6 #released updates
[updates] name=CentOS-$releasever - Updates - huanqiu.com baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/$releasever/updates/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates gpgcheck=1 gpgkey=http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful
[extras] name=CentOS-$releasever - Extras - huanqiu.com baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/$releasever/extras/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras gpgcheck=1 gpgkey=http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages
[centosplus] name=CentOS-$releasever - Plus - huanqiu.com baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/$releasever/centosplus/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus gpgcheck=1 enabled=0 gpgkey=http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users
[contrib] name=CentOS-$releasever - Contrib - huanqiu.com baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/$releasever/contrib/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-CentOS-6
[cloud] name=CentOS-$releasever - cloud - huanqiu.com baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/$releasever/cloud/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-CentOS-6
[sclo] name=CentOS-$releasever - sclo - huanqiu.com baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/$releasever/sclo/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-CentOS-6
[storage] name=CentOS-$releasever - sclo - huanqiu.com baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/$releasever/storage/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-CentOS-6
[virt] name=CentOS-$releasever - sclo - huanqiu.com baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/$releasever/virt/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-CentOS-6
[epel] name=Extra Packages for Enterprise Linux 6 - $basearch baseurl=http://10.11.200.66:18080/mirror/X86/CentOS6/epel/$releasever/$basearch failovermethod=priority enabled=1 gpgcheck=1 gpgkey =http://10.11.200.66:18080/mirror/X86/CentOS6/RPM-GPG-KEY-EPEL-6
通过http来访问本机源目录首先,下载apache2服务,apt install apache2其次,启动apache2服务,/etc/init.d/apache2 start 启动Apache2服务 apache2服务默认的端口是80端口,可以自己修改,在/etc/apache2目录下去修改 将目录建立软连接到/var/www/html目录下 直接通过http://ip:80(默认端口)/软连接目录 来访问 配置在/etc/apt/source.list中添加
mips64el上的中标麒麟(debian)系统 deb http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian stretch main contrib non-free deb-src http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian stretch main contrib non-free deb http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian stretch-updates main contrib non-free deb-src http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian stretch-updates main contrib non-free deb http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian stretch-backports main contrib non-free deb-src http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian stretch-backports main contrib non-free deb http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian stretch-proposed-updates main contrib non-free deb-src http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian stretch-proposed-updates main contrib non-free deb http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian Debian9.1 main contrib non-free deb-src http://10.11.200.66:18080/mirror/mips64el/debain/mirror/mirrors.aliyun.com/debian Debian9.1 main contrib non-free
aarch64上的银河麒麟(ubuntu)系统 deb http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial main restricted universe multiverse deb http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-updates main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-updates main restricted universe multiverse deb http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-backports main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-backports main restricted universe multiverse deb http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-security main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-security main restricted universe multiverse deb http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-proposed main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/Arm/Ubuntu16.04/mirror/mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-proposed main restricted universe multiverse
x86上的ubuntu系统 deb http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial main restricted universe multiverse deb http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial-updates main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial-updates main restricted universe multiverse deb http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial-backports main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial-backports main restricted universe multiverse deb http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial-security main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial-security main restricted universe multiverse deb http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial-proposed main restricted universe multiverse deb-src http://10.11.200.66:18080/mirror/X86/ubuntu16.04-20180924/mirror/mirrors.aliyun.com/ubuntu xenial-proposed main restricted universe multiverse