-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathceph deploy
49 lines (38 loc) · 1.17 KB
/
ceph deploy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
https://www.jianshu.com/p/396bf436275a
# on each nodes
systemctl stop firewalld.service
systemctl disable firewalld.service
setenforce 0
sed -i 's/SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
echo -e "10.78.0.51 node1\n10.78.0.52 node2\n10.78.0.53 node3" >> /etc/hosts
for i in {1..3}; do ping -c 2 node$i ; done
# 免密登录(on node1)
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
ssh-copy-id root@node2
ssh-copy-id root@node3
# 测试免密登录(on node1)
ssh root@node2
ssh root@node3
# on each nodes
yum -y install wget
yum clean all
rm -rf /etc/yum.repos.d/*.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
sed -i '/aliyuncs/d' /etc/yum.repos.d/CentOS-Base.repo
sed -i '/aliyuncs/d' /etc/yum.repos.d/epel.repo
# 配置ceph源
cat > /etc/yum.repos.d/ceph.repo << EOF
[ceph]
name=ceph
baseurl=https://mirrors.aliyun.com/ceph/rpm-nautilus/el7/x86_64/
gpgcheck=0
[ceph-noarch]
name=cephnoarch
baseurl=https://mirrors.aliyun.com/ceph/rpm-nautilus/el7/noarch/
gpgcheck=0
EOF
yum makecache
## 安装ntp
yum install ntp -y
# 20221019 commit