新网创想网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
环境:三台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
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。