CentOS7配置本地镜像及安装gluster服务

【【【【【创建本地镜像及安装gluster操作手册】】】】】
   1、sudo mkdir /home/ecp2/mirror         创建mirror目录,把镜像拷贝到mirror下  
   修改镜像有效路径
   2. sudo mkdir -p /media/CentOS          创建CentOS目录,把磁盘.iso镜像mount到CentOS目录下

3、sudo mount /dev/sr0 /media/CentOS    把iso安装镜像挂在到/media/CentOS 目录下,该目录是 /etc/yum.repos.d/CentOS-Media.repo  镜像文件的baseurl默认的第一个目录
   
[[email protected] root]$ vi /etc/yum.repos.d/CentOS-Media.repo
# CentOS-Media.repo
#
#  This repo can be used with mounted DVD media, verify the mount point for
#  CentOS-7.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum --enablerepo=c7-media [command]
#  
# or for ONLY the media repo, do this:
#
#  yum --disablerepo=\* --enablerepo=c7-media [command]

[c7-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
        file:///media/cdrom/
        file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[offline-extras]
name=CentOS-$releasever - Media
baseurl=file:///home/ecp2/mirror/extras/x86_64
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7           -------这块新增的内容,配置为本地镜像home/ecp2/mirror/extras/x86_64 路径下的镜像, 数字签名为etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

4、sudo yum --disablerepo=\* --enablerepo=c7-media,offline-extras list | grep gluster   -----该命令是查看镜像中的gluster中的镜像 查看安装gluster安装的镜像,如【centos-release-gluster38.noarch 】
   5、sudo yum --disablerepo=\* --enablerepo=c7-media,offline-extras install centos-release-gluster38.noarch  ----该命令 安装centos-release-gluster38.noarch  
                     
   5.1、 ls /etc/pki/rpm-gpg/                                   ------------查看pki-------多出来 RPM-GPG-KEY-CentOS-SIG-Storage            
   5.2、 ls /home/ecp2/mirror/storage/x86_64/gluster-3.8        ------------新生成的镜像
   
   6、sudo vi /etc/yum.repos.d/CentOS-Media.repo    ----修改镜像配置
[[email protected] root]$ vi /etc/yum.repos.d/CentOS-Media.repo

# CentOS-Media.repo
#
#  This repo can be used with mounted DVD media, verify the mount point for
#  CentOS-7.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum --enablerepo=c7-media [command]
#  
# or for ONLY the media repo, do this:
#
#  yum --disablerepo=\* --enablerepo=c7-media [command]

[c7-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
        file:///media/cdrom/
        file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[offline-extras]
name=CentOS-$releasever - Media
baseurl=file:///home/ecp2/mirror/extras/x86_64
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[offline-storage-gluster38]
name=CentOS-$releasever - Media
baseurl=file:///home/ecp2/mirror/storage/x86_64/gluster-3.8
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-G                      ------这块新增内容配置镜像home/ecp2/mirror/storage/x86_64/gluster-3.8 为之后安装gluster,如【sudo yum install glusterfs-server glusterfs glusterfs-fuse】

7、sudo yum --disablerepo=\* --enablerepo=c7-media,offline-extras,offline-storage-gluster38 list | grep glusterfs  ---查看新配置的镜像

8、sudo yum --disablerepo=\* --enablerepo=c7-media,offline-extras,offline-storage-gluster38 install glusterfs-server glusterfs glusterfs-fuse  -------安装gluster环境 glusterfs-server glusterfs glusterfs-fuse
 
  9、sudo systemctl list-unit-files glusterd.service                        -----该命令查看gluster服务是否启动
 
  10、sudo systemctl enable glusterd.service && sudo systemctl start glusterd.service      ----sudo systemctl enable glusterd.service设置开机启动, sudo systemctl start glusterd.service
 
  11、sudo systemctl -l status glusterd.service    --查看gluster服务启动状态
 
[[email protected] x86_64]$ sudo systemctl -l status glusterd.service
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: active (running) since 二 2017-03-14 14:05:07 CST; 45s ago
  Process: 18453 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 18454 (glusterd)
   CGroup: /system.slice/glusterd.service
           └─18454 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO

3月 14 14:05:07 localhost.localdomain systemd[1]: Starting GlusterFS, a clustered file-system server...
3月 14 14:05:07 localhost.localdomain systemd[1]: Started GlusterFS, a clustered file-system server.


  12、sudo netstat -tpnl                           --查看服务信息(哪些服务在启动,占用端口等信息)

时间: 2024-08-07 00:13:46

CentOS7配置本地镜像及安装gluster服务的相关文章

部署LyncServer2013之五 配置本地存储和安装Lync Server组件

部署LyncServer2013之五  配置本地存储和安装Lync Server组件 安装lync server系统主要包含以下的内容:安装本地配置存储.安装lync server 组件.请求并分配lync证书.启动服务.登陆Lync Server控制面板. 我们将安装本地配置存储和安装lync server 组件放到一起,请求并分配lync证书单独介绍,后两个放到一起来介绍. 1. 首先我们来安装本地配置存储, 运行lync serve的安装程序,选择[安装或更新lync server系统],

centos 安装 网络安装使用本地镜像文件安装

有时很无奈,无磁盘,U盘就只有4G而一个centos的盘是4.16G,如何将它装好网络安装,对不起,请你要使用20M以上的带宽,且注意使用网络启动方法 没有条件,创造条件也要上: 网络安装方式,需要下载其镜像,其镜像下载路径为:http://mirrors.163.com/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-netinstall.iso 使用iso工具做一下centos的安装u盘, 具体方法,http://jingyan.baidu.com/arti

heartbeat 非联网安装(通过配置本地yum文件库安装heartbeat)

软件环境:centos6.5 一.下载rpm包 首先找一台联网的centos6.5机器 安装epel扩展源: yum install -y epel-release 安装yum-plugin-downloadonly: yum install yum-plugin-downloadonly 安装完就可以使用yum只下载不安装功能了 yum install  --downloadonly  --downloaddir=***  -y  *** downloadonly:只下载模式:download

centos7配置本地源

本地yum源 一.挂载镜像,将本地光盘挂载到指定文件夹 [[email protected] ~]# mkdir /opt/mount [[email protected] ~]# mount /dev/sr0 /opt/mount/ 二.备份  其他配置源[[email protected]]# cd /etc/yum.repos.d/ [[email protected] yum.repos.d]# tar zcvf repo-bk.tar.gz * 三.配置本地源 [[email prot

yum源配置(本地镜像)

yum info xxx, yum list,yum list xxx.yum list updatesyum search xxx, yum search all xxx,yum search all yum installyum remove yum clean allyum makecacheyum repolist all yum 的软件群组功能 yum grouplist|groupinstall|groupremove 常用命令[[email protected] ~]# yum s

centos7配置本地yum源 使用安装镜像安装软件

1. 在cdrom挂载安装镜像.(物理机则插入光盘,虚拟机则在CD/DVD中选择iso镜像.如果虚拟机mount时提示找不到则在选择iso镜像上方勾选“已连接”和“启动时连接”,或者点击 虚拟机下方状态栏的光盘图标.) 2. 创建挂载点mkdir /media/centos 3. 挂载镜像 mount -t auto /dev/cdrom /media/centos (现在可以使用rpm安装镜像里的rpm包,安装nano编辑器命令如下:rpm -ivh /media/centos/Package

Harbor本地镜像库安装与使用

Harbor安装很简单,不过安装以后要怎么操作,百度了好久都没有找到实操的方法,怎么从官方拉取镜像后更新到私有仓库中?这个弄了好久,一样样测试后才找到方法,对于不熟悉私有仓库的小白来说,有点坑.还好花了些时间解决了. 1. Harbor简介 Harbor是构建企业级私有docker镜像的仓库的开源解决方案,它是Docker Registry的更高级封装,它除了提供友好的Web UI界面,角色和用户权限管理,用户操作审计等功能外,它还整合了K8s的插件(Add-ons)仓库,即Helm通过char

CentOS7配置本地Yum源

从CentOS7官网下载DVD中存在需要的大部分软件,所以在没有网络的情况下可以配置yum源为本地的DVD,下载速度快,软件稳定.1. 如果使用虚拟机,那么就在虚拟机中挂载DVD的iso文件.2. 使用如下命令新建一个挂载点并挂载修改yum源配置 mkdir /media/CentOS mount -t auto /dev/cdrom /media/CentOS 通过命令mount可以查看已挂载的结果如下所示: 3. 修改yum源配置,把CentOS-Base.repo文件备份 cd /etc/

虚拟机centos7配置本地yum源

在虚拟机中要使用yum命令,就要先配置一下yum源,下面就分享一下这个过程: 1. 挂载iso到vmware,首先得确保CD/DVD连接到镜像.可以这样操作 2. 执行下面的命令 # mkdir /mnt/cdrom # mount /dev/cdrom /mnt/cdrom 3. 建立本地的yum源配置文件local.repo,配置文件内容如下: [serid] name=lty   ---->名字可以随意取 baseurl=file:///mnt/cdrom   ---->上面创建的目录