环境:三台Centos 7.1的主机
角色 | IP |
---|---|
admin/node1 | 192.168.209.100 |
node2 | 192.168.209.101 |
node3 | 192.168.209.102 |
关闭 SELINUX
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
vi /etc/hosts
192.168.209.100 admin
192.168.209.100 node1
192.168.209.101 node2
192.168.209.102 node3
测试:
[root@localhost /]# ping node1
PING node1 (192.168.209.100) 56(84) bytes of data.
64 bytes from admin (192.168.209.100): icmp_seq=1 ttl=64 time=0.096 ms
^C
--- node1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.096/0.096/0.096/0.000 ms
[root@localhost /]# ping node2
PING node2 (192.168.209.101) 56(84) bytes of data.
64 bytes from node2 (192.168.209.101): icmp_seq=1 ttl=64 time=0.317 ms
^C
--- node2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.317/0.317/0.317/0.000 ms
[root@localhost /]# ping node3
PING node3 (192.168.209.102) 56(84) bytes of data.
64 bytes from node3 (192.168.209.102): icmp_seq=1 ttl=64 time=0.323 ms
^C
--- node3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.323/0.323/0.323/0.000 ms
[root@localhost /]#
修改时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
安装NTP
yum -y install ntp
systemctl enable ntpd
systemctl start ntpd
ntpstat
rpm -Uvh https://dl.fedoraproject.org/pub/epel/7Server/x86_64/Packages/e/epel-release-7-11.noarch.rpm
这个包在写这个博文的时候是可用的,过段时间可能会失效,如果失效了请大家按照这个路径去找,release的包,不一定是7-11的,不过没关系,安装了这个包之后,后面的安装一般没有问题。
添加之前请先确认mirrors.163.com/ceph/rpm-hammer/el7/x86_64/是否存在,如果不存在,那么需要修改一下网址
vi ceph.repo
[ceph]
name=Ceph noarch packages
baseurl=http://mirrors.163.com/ceph/rpm-hammer/el7/x86_64/
enabled=1
gpgcheck=1
type=rpm-md
gpgkey=http://mirrors.163.com/ceph/keys/release.asc
yum -y update && yum -y install --release hammer ceph ceph-deploy
yum -y update && yum -y install --release hammer ceph
生成密钥对(一路回车即可)
ssh-keygen
将公钥拷贝到其余节点
ssh-copy-id root@node1
ssh-copy-id root@node2
ssh-copy-id root@node3
测试,ssh到各个节点,看是否需要输入密码
验证安装效果
命令行输入ceph按Tab键不齐,如果出现其余命令,则说明已经安装完成啦!
[root@localhost /]# ceph
ceph ceph-dencoder ceph-mon
ceph-authtool ceph-deploy ceph-objectstore-tool
ceph-brag ceph-disk ceph-osd
ceph-client-debug ceph-disk-activate ceph-post-file
ceph-clsinfo ceph-disk-prepare ceph-rbdnamer
ceph-conf ceph-disk-udev ceph-rest-api
ceph-coverage cephfs ceph-run
ceph-create-keys cephfs-journal-tool ceph-syn
ceph-crush-location cephfs-table-tool
ceph-debugpack ceph-mds
[root@localhost /]# ceph
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。