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

📮Comments

No Comment.
xosadmin
xosadmin
4 weeks ago
推荐 HPE Microserver系列降低噪音的一种办法
部分HPE Microserver Gen10+和Gen11用户反映,安装了Debian/Proxmox或者更换了硬盘后出现风扇声音很大的问题。经过搜索和研究,发现其中一种解决方法,即在系统中安装HPE的amsd及smad组件。具体方式如下 ...
  • 技术小絮
9 0
xosadmin
xosadmin
5 years ago
推荐 CentOS 7用yum配置php7.2+mariadb+nginx
更新Linux源并安装EPEL+Webtatic源 yum -y install epel* rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 2. 清理 ...
  • 技术小絮
1,214 0
xosadmin
xosadmin
5 years ago
推荐 Proxmox设置用于Wake on lan的MAC地址
在新版的Proxmox VE软件中,带有了Wake on lan功能。此功能可以通过网络唤醒已关机的服务器。但是,Proxmox规定,需要在使用该功能前定义该服务器的MAC地址以用于接收数据包。本文介绍一下如何设置该MAC地址。在操作前,请 ...
  • proxmox
  • 技术小絮
5,048 0
xosadmin
xosadmin
7 years ago
推荐 如何在Linux(CentOS)上安装OpenVZ
近日,有一位朋友向我请教如何在其自己的CentOS服务器上安装OpenVZ虚拟化。所谓OpenVZ,官方对其的定义如下: “OpenVZ is a container-based virtualization for Linux. Op ...
  • 技术小絮
  • 虚拟化
2,244 0
xosadmin
xosadmin
5 years ago
推荐 wget下载某目录下全部文件的方法
前一段时间介绍了Proxmox的安装方式。Proxmox虽然方便,但是在多服务器的环境下没法像SolusVM那样同步KVM ISO镜像,非常不方便。所以X-osadmin将ISO放在一台服务器上,通过wget下载镜像,方便了许多。Wget向 ...
  • 技术小絮
1,378 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