Centos搭建ceph+++三、创建部署CEPH用户
来源:互联网 发布:枸杞 怎么泡水 知乎 编辑:程序博客网 时间:2024/04/29 16:12
三、创建部署CEPH用户
admin-node节点需要以普通用户登录 Ceph 节点,且此用户拥有无密码使用sudo的权限
1.安装ssh服务器(一般来说都是有的不用安装)
yum install openssh-server
2.在(所有节点上)创建ceph用户并设置密码
例子:
创建用户:
useradd -d /home/ceph -m ceph
设置密码:
passwd ceph
[root@admin-node ~]# useradd -d /home/ceph -m ceph[root@admin-node ~]# passwd cephChanging password for user ceph.New password: BAD PASSWORD: The password is shorter than 8 charactersRetype new password: passwd: all authentication tokens updated successfully.
3.(所有节点)确保各节点上新创建的用户都有sudo权限
echo "ceph ALL = (root) NOPASSWD:ALL" | tee /etc/sudoers.d/ceph
chmod 0440 /etc/sudoers.d/ceph
[root@admin-node ~]# echo "ceph ALL = (root) NOPASSWD:ALL" | tee /etc/sudoers.d/cephceph ALL = (root) NOPASSWD:ALL[root@admin-node ~]# chmod 0440 /etc/sudoers.d/ceph
切换到ceph用户上执行
su - ceph
[root@admin-node ~]# su - ceph[ceph@admin-node ~]$
生成SSH密钥对(直接敲回车,啪啪啪)
ssh-keygen
[ceph@admin-node ~]$ ssh-keygenGenerating public/private rsa key pair.Enter file in which to save the key (/home/ceph/.ssh/id_rsa): Created directory '/home/ceph/.ssh'.Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/ceph/.ssh/id_rsa.Your public key has been saved in /home/ceph/.ssh/id_rsa.pub.The key fingerprint is:ef:65:ef:d9:62:76:4d:0d:90:b2:7a:46:41:a7:b9:42 ceph@admin-nodeThe key's randomart image is:+--[ RSA 2048]----+| .. .. || o+o || E o+ . || . o. . || So. ..|| .oo o|| o. o ..|| . o .+oo|| . ++o.|+-----------------+
把公钥拷贝到各安装Ceph(node1,node2,node3)的节点
ssh-copy-id ceph@node1
ssh-copy-id ceph@node2
ssh-copy-id ceph@node3
[ceph@admin-node ~]$ ssh-copy-id ceph@node1The authenticity of host 'node1 (10.0.0.41)' can't be established.ECDSA key fingerprint is 99:1f:67:c5:00:1e:9c:cb:7d:d6:4f:d6:f6:c3:ef:f5.Are you sure you want to continue connecting (yes/no)? yes/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keysceph@node1's password: Number of key(s) added: 1Now try logging into the machine, with: "ssh 'ceph@node1'"and check to make sure that only the key(s) you wanted were added.__________________________________________________________________________________________________________________________________________________________[ceph@admin-node ~]$ ssh-copy-id ceph@node2The authenticity of host 'node2 (10.0.0.42)' can't be established.ECDSA key fingerprint is 99:1f:67:c5:00:1e:9c:cb:7d:d6:4f:d6:f6:c3:ef:f5.Are you sure you want to continue connecting (yes/no)? yes/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keysceph@node2's password: Number of key(s) added: 1Now try logging into the machine, with: "ssh 'ceph@node2'"and check to make sure that only the key(s) you wanted were added.__________________________________________________________________________________________________________________________________________________________[ceph@admin-node ~]$ ssh-copy-id ceph@node3The authenticity of host 'node3 (10.0.0.43)' can't be established.ECDSA key fingerprint is 99:1f:67:c5:00:1e:9c:cb:7d:d6:4f:d6:f6:c3:ef:f5.Are you sure you want to continue connecting (yes/no)? 123456Please type 'yes' or 'no': yes/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keysceph@node3's password: Number of key(s) added: 1Now try logging into the machine, with: "ssh 'ceph@node3'"and check to make sure that only the key(s) you wanted were added.
验证admin-node节点是否可以无密码登陆各节点
ssh node1
ssh node2
ssh node3
[ceph@admin-node ~]$ ssh node1Last login: Mon Nov 27 16:14:16 2017 from admin-node[ceph@node1 ~]$ exitlogoutConnection to node1 closed.----------------------------------------------------------------------------------------------------------------------------------------------------------[ceph@admin-node ~]$ ssh node2Last login: Mon Nov 27 16:14:21 2017 from admin-node[ceph@node2 ~]$ exitlogoutConnection to node2 closed.----------------------------------------------------------------------------------------------------------------------------------------------------------[ceph@admin-node ~]$ ssh node3Last login: Mon Nov 27 16:14:54 2017 from admin-node[ceph@node3 ~]$ exitlogoutConnection to node3 closed.----------------------------------------------------------------------------------------------------------------------------------------------------------[ceph@admin-node ~]$ exitlogout[root@admin-node ~]#
阅读全文
2 0
- Centos搭建ceph+++三、创建部署CEPH用户
- Centos搭建ceph+++五、创建ceph集群
- Centos搭建ceph+++六、创建监视器
- Ceph环境搭建【CentOS】【Hammer】
- Centos搭建ceph+++二、准备工作
- Ceph部署
- ceph部署
- Ceph部署
- ceph存储 centos上搭建Ceph集群--Best
- Centos 7.2(1511) 部署ceph jewel
- ceph-deploy部署ceph集群
- Ceph学习----Ceph 分布式部署
- Ceph部署(一)集群搭建
- Ceph部署(二)RGW搭建
- Centos搭建ceph+++一、虚拟机环境准备
- Centos搭建ceph+++四、yum源设置
- Centos搭建ceph+++七、准备OSD
- Centos搭建ceph+++八、添加一块OSD
- xfs 在线扩容,使用xfs_growfs
- ADF修改默认filter查询将%改为%%方式
- synchronized和volatile的一些问题
- RxJava详解
- Jsoup 发送post请求 org.jsoup.HttpStatusException: HTTP error fetching URL. Status=404, URL=https:
- Centos搭建ceph+++三、创建部署CEPH用户
- Threejs 三大组件 -- 场景、相机、渲染器
- Android的五大布局以及常用控件
- 人工智能TensorFlow学习研究(一)
- 使用solcjs命令生成abi和bin文件出现"ParserError:Source "G:/XXX/strings.sol" not found:File not supplied initally
- 《C语言点滴》读书笔记(1)第1章程序猿&&程序媛(关键词:)
- Android开发工具-多国语言翻译对照表
- 职业规划-服务器运维工程师(待完善)
- PopupWindow在安卓7.0及7.1系统上位置显示异常