Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3786008
  • 博文数量: 880
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 6155
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(880)

文章存档

2022年(5)

2021年(60)

2020年(175)

2019年(207)

2018年(210)

2017年(142)

2016年(81)

分类: LINUX

2020-07-13 17:40:24

https://www.cnblogs.com/royaljames/p/9807532.html

https://www.cnblogs.com/huchong/p/12435957.html
https://www.cnblogs.com/hukey/p/13288583.html

ceph1:
[root@ceph1 ceph]# history
    1  吃的
    2  cd /
    3  vi etc/resolv.conf
    4  ip route add default via 192.168.27.1
    5  ls
    6  hostname set-hostname ceph1
    7  hostnamectl set-hostname ceph1
    8  ssh ceph2
    9  ssh ceph3
   10  ls
   11  mkdir -p /etc/ceph
   12  cd /etc/ceph/
   13  ls
   14  yum install -y wget
   15  mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
   16  wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
   17  wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
   18  vi /etc/yum.repos.d/ceph.repo
   19  yum -y install ntp ntpdate ntp-doc
   20  ntpdate 0.us.pool.ntp.org
   21  hwclock --systohc
   22  systemctl enable ntpd.service
   23  systemctl start ntpd.service
   24   yum install ceph-deploy ?y
   25   yum install ceph-deploy -y
   26  yum install epel-release -y
   27  yum install python-pip -y
   28  pwd
   29  ceph-deploy new ceph1 ceph2 ceph3
   30  ls
   31  cat ceph.conf
   32  vi ceph.conf
   33  ceph-deploy install --no-adjust-repos ceph01 ceph02
   34  ceph-deploy install --no-adjust-repos ceph1 ceph2 ceph3
   35  ceph osd tree
   36  ceph osd status
   37  ceph-deploy mon create-initial
   38  ls
   39  ceph-deploy admin ceph1 ceph2 ceph3
   40  chmod +r /etc/ceph/ceph.client.admin.keyring
   41  ceph status
   42  ceph -s
   43  ceph health
   44  ceph osd status
   45  ceph osd tree
   46  ceph osd status
   47  ceph --version
   48  ceph -s
   49  fdisk -l
   50  ceph-deploy disk zap ceph1 /dev/sdb
   51  ceph-deploy disk zap ceph2 /dev/sdb
   52  ceph-deploy disk zap ceph3 /dev/sdb
   53  vgdisplay
   54  ceph -s
   55  ceph health
   56  ceph osd stat
   57  ceph osd status
   58  ceph osd stat
   59  ceph -s
   60  ceph-deploy osd create --data /dev/sdb ceph1
   61  ceph -s
   62  ceph-deploy osd create --data /dev/sdb ceph2
   63  ceph-deploy osd create --data /dev/sdb ceph3
   64  ceph -s
   65  ceph osd stat
   66  ceph osd status
   67  ceph osd tree
   68  ceph health
   69  ceph-deploy mgr create ceph1
   70  ceph health
   71  ceph -s
   72  history
   73  ceph osd dump
   74  vi ceph.conf
   75  ceph-deploy --overwrite-conf config push ceph1 ceph2 ceph3
   76  ceph mgr dump
   77  ceph mgr module ls
   78  sudo systemctl restart ceph-mgr@ceph1
   79  ceph dashboard create-self-signed-cert
   80  ceph mgr services
   81  ceph config-key dump
   82   ceph dashboard set-login-credentials admin admin
   83  ceph config-key put mgr/dashboard/server_addr 192.168.27.34
   84  ceph mgr services
   85  ceph config-key dump
   86  ceph config-key put mgr/dashboard/server_port 7000
   87  ceph config-key dump
   88  yum install ceph-mgr-dashboard -y
   89  ceph mgr module enable dashboard
   90  ceph config set mgr mgr/dashboard/ssl false
   91  ceph config set mgr mgr/dashboard/server_addr 0.0.0.0
   92  netstat -anp | grep 8080
   93  ceph config set mgr mgr/dashboard/server_port 8080
   94  ceph config-key dump
   95  ceph config-key del mgr/dashboard/server_port 7000
   96  ceph config-key delete mgr/dashboard/server_port 7000
   97  ceph config-key rm mgr/dashboard/server_port 7000
   98  ceph config-key rm mgr/dashboard/server_port
   99  ceph config-key dump
  100  ceph config-key rm mgr/dashboard/server_addr
  101  ceph config-key dump
  102  ceph mgr services
  103  ceph dashboard set-login-credentials admin admin
  104  systemctl restart ceph-mgr@ceph1
  105  ceph mgr services
  106  history
[root@ceph1 ceph]#



ceph2:

[root@ceph2 /]# history
    1  cd /
    2  systemctl stop firewalld
    3   systemctl disable firewalld
    4  setenforce 0
    5  vi etc/hosts
    6  yum install -y wget
    7  mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
    8  wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    9  wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
   10  vi /etc/yum.repos.d/ceph.repo
   11  yum -y install ntp ntpdate ntp-doc
   12  ntpdate 0.us.pool.ntp.org
   13  hwclock --systohc
   14  systemctl enable ntpd.service
   15  systemctl start ntpd.service
   16  yum install epel-release -y
   17  yum install python-pip -y
   18  chmod +r /etc/ceph/ceph.client.admin.keyring
   19  lsblk
   20  vgdisplay
   21  history
[root@ceph2 /]#


ceph3:

[root@ceph3 /]# history
    1  cd /
    2  systemctl stop firewalld
    3   systemctl disable firewalld
    4  setenforce 0
    5  vi etc/hosts
    6  yum install -y wget
    7  mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
    8  wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    9  wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
   10  vi /etc/yum.repos.d/ceph.repo
   11  yum -y install ntp ntpdate ntp-doc
   12  ntpdate 0.us.pool.ntp.org
   13  hwclock --systohc
   14  systemctl enable ntpd.service
   15  systemctl start ntpd.service
   16  yum install epel-release -y
   17  yum install python-pip -y
   18  chmod +r /etc/ceph/ceph.client.admin.keyring
   19  history
[root@ceph3 /]#

ceph源   http://mirrors.aliyun.com/ceph/rpm-nautilus/el7/x86_64/

[root@ceph3 /]# cat /etc/yum.repos.d/ceph.repo
[ceph]
name=ceph
baseurl=http://mirrors.aliyun.com/ceph/rpm-nautilus/el7/x86_64/
gpgcheck=0
priority=1

[ceph-noarch]
name=cephnoarch
baseurl=http://mirrors.aliyun.com/ceph/rpm-nautilus/el7/noarch/
gpgcheck=0
priority=1

[ceph-source]
name=Ceph source packages
baseurl=http://mirrors.aliyun.com/ceph/rpm-nautilus/el7/SRPMS
gpgcheck=0
priority=1

[root@ceph3 /]#


(6).其他

清理机器上的ceph相关配置:

  停止所有进程: stop ceph-all

  卸载所有ceph程序:ceph-deploy uninstall [{ceph-node}]

  删除ceph相关的安装包:ceph-deploy purge {ceph-node} [{ceph-data}]

  删除ceph相关的配置:ceph-deploy purgedata {ceph-node} [{ceph-data}]

  删除key:ceph-deploy forgetkeys

  卸载ceph-deploy管理:yum -y remove ceph-deploy



阅读(5027) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~