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

xosadmin

BGPlayer / Codes learner / Love Linux
Posts
77
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,469
0

📮Comments

No Comment.
xosadmin
xosadmin
7 years ago
推荐 如何在Linux(CentOS)上安装OpenVZ
近日,有一位朋友向我请教如何在其自己的CentOS服务器上安装OpenVZ虚拟化。所谓OpenVZ,官方对其的定义如下: “OpenVZ is a container-based virtualization for Linux. Op ...
  • 技术小絮
  • 虚拟化
2,254 0
xosadmin
xosadmin
5 years ago
推荐 Proxmox “QEMU version ‘x.x.x’ is too old”问题的解决方法
最近在Proxmox操作时发现,由于集群中有一台服务器的Proxmox安装时间较早,因故在迁移虚拟机到该服务器时遇到了这样一个错误:Installed QEMU version ‘x.x.x’ is too old ...
  • proxmox
  • 技术小絮
3,181 0
xosadmin
xosadmin
2 years ago
推荐 Debian上重装Nginx的方法
1. 卸载现有Nginx以及配套包: apt-get remove nginx -y apt-get autoremove 2. 删除配置目录(在删除前可以备份以备恢复): cp -r /etc/nginx /home/backup-ngi ...
  • 技术小絮
468 0
xosadmin
xosadmin
5 years ago
推荐 ZeroTier内网主机互ping时出现destination host unreachable的解决方案
ZeroTier是一个十分好用的组内网软件。但是,部分主机虽然成功连接了ZeroTier并且获得了IP,但是内网中其他主机在ping此IP时,可能会提示Destination host unreachable,可能还伴有端口无法访问等问题, ...
  • 技术小絮
6,673 0
xosadmin
xosadmin
3 years ago
推荐 如何在Debian安装Mariadb数据库
Mariadb是一款高效的数据库。因为其来源于MySQL,因此它对于Mysql具有较好的兼容性。这篇文章将介绍如何在Debian 11操作系统上安装MariaDB数据库。 安装依赖包并升级系统,命令: apt-get install s ...
  • 技术小絮
759 0
  • HPE Microserver系列降低噪音的一种办法
  • Debian 13 Trixie安装Proxmox VE
  • Windows FTP服务器通过PASV模式无法获取目录的解决方法
  • Proxmox日志出现大量lxcfs truncated错误的解决方案
  • Proxmox通过CLI向LXC挂载已有虚拟磁盘的方法
  • LXC上安装Gitlab时sysctl报错的解决方法

文章聚合

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

Multilangual Translator

Copyright © 2016-2025 X-osadminの自留地. All rights reserved. 萌ICP备20258855号
  • 博客主页 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