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

📮Comments

No Comment.
xosadmin
xosadmin
5 years ago
推荐 OpenWrt N2N组网记 – 自己组建大内网
n2n结构图(图自互联网) N2N是一款十分简单且强大的p2p组网软件。它可以实现组网和p2p直连。只需要拥有一台服务端,任何主机都可以接入进来做为客户端。在本篇文章,将使用OpenWrt做为服务端来搭建组网。事不宜迟,开干~ 首先,选 ...
  • 技术小絮
5,210 0
xosadmin
xosadmin
5 years ago
推荐 OpenWrt做二级路由时无法访问上级路由内网的解决方案
近日在调试openwrt做为二级路由时遇到了一个问题:当openwrt软路由做为二级路由时无法访问上级路由的内网。经过一番测试,得出原因是来自于路由表配置。解决方法如下: PS: 本文中openwrt内网假设为2.2.2.0/24,open ...
  • openwrt
  • 技术小絮
7,397 0
xosadmin
xosadmin
2 years ago
推荐 在OpenVZ或LXC下使用Zerotier
众所周知,Zerotier是一个十分方便的p2p组网方式,OpenVZ和LXC是一种容器式的虚拟化。因此,OpenVZ和LXC的ppp和tun功能默认处于关闭状态。这也导致Zerotier在OpenVZ或者LXC架构下的虚拟机默认无法使用( ...
  • 技术小絮
385 0
xosadmin
xosadmin
3 years ago
推荐 vsftpd提示500 OOPS: vsftpd: refusing to run with writable root inside chroot()解决方法
问题:在安装完vsftpd后,尝试连接时,提示500 OOPS: vsftpd: refusing to run with writable root inside chroot() 解决此问题,只需要执行以下操作: 在/etc/vsft ...
  • 技术小絮
564 0
xosadmin
xosadmin
5 years ago
推荐 外网通过Zerotier访问内网其他主机的方法
Zerotier是一个非常卓越的组网软件。它可以以最简单的方式构成一张虚拟网络。目前有很多OpenWrt路由器固件已经附带了该功能。但是大部分路由器不带有此功能。因此,可以通过在内网内搭建跳板机的方式,来解决这一问题。 在本次测试中,跳板机 ...
  • Zerotier
  • 技术小絮
3,442 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