ceph本地镜像源搭建

简介: ceph本地镜像源搭建

本文以Cetnos7为例,搭建ceph本地镜像源

1、添加阿里云ceph镜像源

vi /etc/yum.repos.d/ceph.repo

[Ceph]

name=Ceph packages for $basearch

baseurl=https://mirrors.aliyun.com/ceph/rpm-luminous/el7/$basearch

enabled=1

gpgcheck=0

type=rpm-md

gpgkey=https://mirrors.aliyun.com/ceph/keys/release.asc

priority=1

[Ceph-noarch]

name=Ceph noarch packages

baseurl=https://mirrors.aliyun.com/ceph/rpm-luminous/el7/noarch

enabled=1

gpgcheck=0

type=rpm-md

gpgkey=https://mirrors.aliyun.com/ceph/keys/release.asc

priority=1

[ceph-source]

name=Ceph source packages

baseurl=https://mirrors.aliyun.com/ceph/rpm-luminous/el7/SRPMS

enabled=1

gpgcheck=0

type=rpm-md

gpgkey=https://mirrors.aliyun.com/ceph/keys/release.asc

priority=1

2、安装epel源

curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

3、仅下载镜像源包组

这么做的好处就是仅仅把最新所需要的包下载了下来,如果通过同步镜像的方式,会把一些暂时无用的包下载下来,占用空间!

yum install --downloadonly --downloaddir=/data/mirrors/ceph/ ceph ceph-radosgw ntp ceph-deploy

PS:其中--downloadonly表示仅下载,--downloaddir指定下载到哪个目录

4、安装nginx

我这里以nginx为例,当然你也可以使用vsftp或httpd

rpm -ivh http://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm

yum install wnginx

5、配置nginx

将原来/usr/local/nginx/conf/vhost/demo.conf清空,写入以下配置

server

   {

       listen 80;

       server_name _;

   

location / {

  root   /data/mirrors;

         index  index.html index.htm;

         autoindex on;

         autoindex_exact_size off;

         autoindex_localtime on;

       }

}

6、重启nginx服务

nginx -t

/etc/init.d/nginx restart

7、创建本地源

yum install createrepo -y

createrepo -pdo /data/mirrors/ceph/ /data/mirrors/ceph/

后续如果有更新增加或删减包,使用以下命令更新

createrepo --update /data/mirrors/ceph/

至此一个本地ceph源镜像就配置完成了

8、配置本地源

其他内网机器上配置源地址

mkdir /etc/yum.repos.d/repo

mv /etc/yum.repos.d/CentOS* /etc/yum.repos.d/repo

mv /etc/yum.repos.d/epel* /etc/yum.repos.d/repo

vi /etc/yum.repos.d/ceph.repo

[http-repo]

name=internal-ceph-repo

baseurl=http://IP/ceph

enabled=1

gpgcheck=0

将其中IP替换为本地镜像机的地址,此时就可以通过本地源安装服务了

yum -y install ceph ceph-radosgw ntp

 

目录
相关文章
|
5月前
|
Linux 网络安全 开发工具
ceph Nautilus-14.2.22版本部署
关于如何在CentOS 7上部署Ceph Nautilus 14.2.22版本的详细教程,包括环境准备、时间同步、免密登录配置、ceph-deploy工具安装、硬盘准备、mon初始化、osd初始化、mgr初始化、集群状态检查、radosgw服务部署、mds安装、dashboard组件启用等一系列步骤。
193 2
|
9月前
|
Kubernetes 关系型数据库 Linux
linux安装centos7 kubenetes 单机版安装k8s
linux安装centos7 kubenetes 单机版安装k8s
292 0
|
块存储 Docker 容器
用docker搭建Ceph集群(基于nautilus版本)
用docker搭建Ceph集群(基于nautilus版本)
633 0
|
存储 块存储 Docker
用docker搭建Ceph集群问题整理(基于nautilus版本)
用docker搭建Ceph集群问题整理(基于nautilus版本)
215 0
|
存储 运维 Kubernetes
CentOS7下离线安装KubeSphere3.0集群
CentOS7下离线安装KubeSphere3.0集群
793 0
CentOS7下离线安装KubeSphere3.0集群
|
Java Linux 应用服务中间件
Centos7中单节点openshift_3.11安装及配置开机自启
Centos7中单节点openshift_3.11安装及配置开机自启
Centos7中单节点openshift_3.11安装及配置开机自启
|
网络安全 Docker 容器
centos8安装ceph octopus集群
centos8安装ceph octopus集群
610 0
|
Kubernetes Linux Docker
Centos搭建kubenetes集群
本文描述在阿里云ECS中,自建kubeneters集群。
1823 0
|
tengine 安全 Linux
YUM源部署和使用
为什么需要内部yum源呢,有可能是业务内部的服务器对外是不通了,居于一些安全方面的考虑。内部yum源又有什么好处呢,第一,速度快;第二,内网可控,外网有问题也不影响内网包的下载和安装等。
1907 0
|
Kubernetes 容器 Linux
Centos7更换163镜像源安装kubernetes
kubernetes 镜像源 centos7
5390 0