X-osadminの自留地
  • 博客主页 HomePage
  • 技术小絮 Tech
  • 作品发布 Works
  • 软件专题 Softs
    • proxmox
    • openwrt
    • chromebook
    • Zerotier
    • 虚拟化
  • 友情链接 Following

xosadmin

BGPlayer / Codes learner / Love Linux
Posts
75
Comments
0

友情链接 – Friendly Links

  • Add your site here…
xosadmin
7 years ago

CentOS下如何搭建Linux发行版镜像站

最近正在忙活着搭建云鼎Linux镜像站。因为有很多朋友很想要一个这样的网站,并且在问如何搭建这类的网站。因此,X-osadmin为大家讲讲如何搭建。

废话不多说,进入正题~

 

一、环境准备

操作系统:CentOS 6.9 X86_64 (这里采用32位的系统亦可)

网络:1Gbps

硬盘:2x1tb HDD

 

二、安装前的准备工作

1. 更新系统软件包

# yum -y update

2.安装epel源

# yum -y install epel*

 

三、正式安装

1.安装各类依赖软件包

# yum -y install screen unzip nginx createrepo rsync

2.清理防火墙

# iptables -F

# iptables -X

# iptables -Z

# service iptables save && service iptables stop && chkconfig iptables off

3.设置部分程序开机启动

# chkconfig nginx on

4.配置nginx显示目录

# vi /etc/nginx/conf.d/default.conf

添加以下内容:

location / {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}

# service nginx reload

5.配置rsync同步脚本,这里请在网上自行搜罗上游同步服务器,这里以我在网上搜罗的CentOS镜像源为例,其他镜像源与此类似

# touch /root/rsync.sh && vi /root/rsync.sh

# mkdir /usr/share/nginx/html/centos

#!/bin/sh

rsync -avz rsync://mirrors.kernel.org/mirrors/centos /usr/share/nginx/html/centos

6.设置权限并后台启动rsync同步程序

# chmod +x /root/rsync.sh

# sh /root/rsync.sh &

通过以上步骤,您已经成功搭建起了一个简单的镜像站,但是没有配套自动同步。至于这方面内容,您可以参考网络上的cron计划任务进行同步。

  • 技术小絮
等 人表示很赞
2,433
0

📮Comments

No Comment.
xosadmin
xosadmin
5 years ago
推荐 OpenWrt N2N组网记 – 自己组建大内网
n2n结构图(图自互联网) N2N是一款十分简单且强大的p2p组网软件。它可以实现组网和p2p直连。只需要拥有一台服务端,任何主机都可以接入进来做为客户端。在本篇文章,将使用OpenWrt做为服务端来搭建组网。事不宜迟,开干~ 首先,选 ...
  • 技术小絮
5,189 0
xosadmin
xosadmin
6 years ago
推荐 树莓派如何更换成国内源
随着树莓派的兴起,开始学习并使用树莓派的开发者们越来越多。很多人在学习时选用树莓派官方的Raspbian系统。但此系统由于为外国人开发,所以从中调用的软件源比较慢,对大陆的小伙伴非常不利。今天,讲述一下更换树莓派软件源为国内软件源的办法。 ...
  • 技术小絮
1,788 0
xosadmin
xosadmin
4 years ago
推荐 apt-get时提示different from other instances的解决方案
近日在升级Ubuntu系统时,apt-get提示”trying to overwrite shared ‘/usr/share/doc/libselinux1/changelog.Debian.gz’, ...
  • 技术小絮
1,122 0
xosadmin
xosadmin
1 year ago
推荐 如何使用Directadmin借助Let’s Encrypt签发Wildcard SSL证书
Directadmin是一个由加拿大JBMC开发的强大的虚拟主机面板。在新版本中,Directadmin支持通过Let’s Encrypt签发Wildcard证书(泛域证书)。该证书的签发方式为DNS验证。在本篇文章中,将以Cl ...
  • 技术小絮
259 0
xosadmin
xosadmin
4 years ago
推荐 curl: (35) Peer reports incompatible or unsupported protocol version的解决方法
近日在做CentOS 7维护时,在尝试curl时,遇到了curl: (35) Peer reports incompatible or unsupported protocol version.的问题。本问题是由于相应的包版本过老导致的。 ...
  • 技术小絮
2,298 0
  • Windows FTP服务器通过PASV模式无法获取目录的解决方法
  • Proxmox日志出现大量lxcfs truncated错误的解决方案
  • Proxmox通过CLI向LXC挂载已有虚拟磁盘的方法
  • LXC上安装Gitlab时sysctl报错的解决方法
  • Proxmox VE通过全盘方式直通硬盘
  • Proxmox为KVM VNC启用剪贴板支持

文章聚合

  • Proxmox日志出现大量lxcfs truncated错误的解决方案
  • Proxmox通过CLI向LXC挂载已有虚拟磁盘的方法
  • Proxmox VE通过全盘方式直通硬盘
  • Proxmox为KVM VNC启用剪贴板支持
  • Proxmox报出RRDC/RRD update error的解决方法
  • 在Debian 12上安装Proxmox VE的方法

Multilangual Translator

Copyright © 2016-2025 X-osadminの自留地. All rights reserved. Designed by nicetheme.
  • 博客主页 HomePage
  • 技术小絮 Tech
  • 作品发布 Works
  • 软件专题 Softs
    • proxmox
    • openwrt
    • chromebook
    • Zerotier
    • 虚拟化
  • 友情链接 Following
Welcome
Forgot password?
Welcome
Forgot password?
Social Login
Login with WeChat QR Code
Unregistered WeChat IDs will be automatically used to create an account.
Scan and Reply with Keywords「登录」Get Verification Code
Social Login
Free registration
Social Login
Reset password
Back to Login