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,436
0

📮Comments

No Comment.
xosadmin
xosadmin
8 months ago
推荐 Proxmox通过CLI向LXC挂载已有虚拟磁盘的方法
LXC采用.raw格式的虚拟硬盘,在proxmox中也不例外。然而,LXC或Proxmox并没有提供向KVM那样能在CLI中直接挂载.img到虚拟机的方法。但是,可以通过以下方法进行挂载已有磁盘。 关闭目标LXC容器 将已有的磁盘文件复制 ...
  • proxmox
  • 技术小絮
665 0
xosadmin
xosadmin
5 years ago
推荐 Proxmox挂载Windows Samba时报错的解决方法
近日在Proxmox的Web界面上挂载由Windows Server 2008共享的CIFS(Samba共享)时,界面报出以下错误: create storage failed: error with cfs lock ‘fil ...
  • proxmox
  • 技术小絮
5,880 0
xosadmin
xosadmin
7 years ago
推荐 【原创】Intel Core 2 Duo类CPU安装OSX Yosemite的随记
Copyright Proclaim:本教程和工具及系统仅供娱乐及个人测试使用,请不要用于商业用途。系统版权归属苹果公司。部分工具和系统镜像来自于威锋和远景论坛收集。 大家好!又有一段时间没有更新博客了。这次,有幸获得了一台搭载Intel ...
  • 技术小絮
3,004 2
xosadmin
xosadmin
1 year ago
推荐 如何使用Directadmin借助Let’s Encrypt签发Wildcard SSL证书
Directadmin是一个由加拿大JBMC开发的强大的虚拟主机面板。在新版本中,Directadmin支持通过Let’s Encrypt签发Wildcard证书(泛域证书)。该证书的签发方式为DNS验证。在本篇文章中,将以Cl ...
  • 技术小絮
260 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,299 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