本次搭建使用双节点方式进行搭建,使用service node作为服务节点,使用computer node作为被服务节点。
[root@service ~]# ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:13:50:ad brd ff:ff:ff:ff:ff:ff
inet 192.168.100.10/24 brd 192.168.100.255 scope global noprefixroute ens33
valid_lft forever preferred_lft forever
inet6 fd15:4ba5:5a2b:1008:8fd:3a4f:3ab3:83fb/64 scope global noprefixroute dynamic
valid_lft 86390sec preferred_lft 14390sec
inet6 fe80::19d4:d1ea:e62d:44f8/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: ens34: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:13:50:b7 brd ff:ff:ff:ff:ff:ff
inet 192.168.200.10/24 brd 192.168.200.255 scope global noprefixroute ens34
valid_lft forever preferred_lft forever
inet6 fd15:4ba5:5a2b:1008:58af:c962:9746:f1be/64 scope global noprefixroute dynamic
valid_lft 86390sec preferred_lft 14390sec
inet6 fe80::38fb:d8e1:1251:52b2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
[root@compute ~]# ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:09:67:01 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.20/24 brd 192.168.100.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fd15:4ba5:5a2b:1008:20c:29ff:fe09:6701/64 scope global mngtmpaddr dynamic
valid_lft 86374sec preferred_lft 14374sec
inet6 fe80::20c:29ff:fe09:6701/64 scope link
valid_lft forever preferred_lft forever
3: ens34: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:09:67:0b brd ff:ff:ff:ff:ff:ff
inet 192.168.200.20/24 brd 192.168.200.255 scope global ens34
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe09:670b/64 scope link
valid_lft forever preferred_lft forever
【挂载CentOS-7-x86_64-DVD-1810.iso】
[root@service ~]# mount -o loop /dev/sr0 /mnt/cdrom
[root@service ~]# mkdir /opt/centos
[root@service ~]# cp -rvf /mnt/* /opt/centos/
[root@service ~]# umount /mnt/
在/etc/yum.repos.d创建centos.repo源文件(原有文件建议删除)
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1:
类比下去可以制作很多
# yum clean all
# yum repolist
例如:
[root@service~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id repo name status
centos centos 4,021
iaas iaas 1,688
repolist: 5,709
[root@service ~]# yum install vsftpd –y
[root@service ~]# vi /etc/vsftpd/vsftpd.conf
添加anon_root=/opt/
保存退出
[root@service ~]# systemctl start vsftpd
[root@service ~]# systemctl enable vsftpd
此时只介绍将防护墙关闭,为了方便
systemctl stop firewalld
systemctl disable firewalld
在/etc/yum.repos.d创建centos.repo源文件
[centos]
name=centos
baseurl=ftp://192.168.100.10/centos
gpgcheck=0
enabled=1
# yum clean all
# yum list
[root@compute ~]# yum repolist
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
centos | 3.6 kB 00:00
iaas | 2.9 kB 00:00
(1/3): centos/group_gz | 166 kB 00:00
(2/3): centos/primary_db | 3.1 MB 00:00
(3/3): iaas/primary_db | 2.3 MB 00:00
源标识 源名称 状态
centos centos 4,021
iaas iaas 1,688
repolist: 5,709
这几天搭建云计算平台,超级累(I am so hard)。
脑壳发炸的感觉,
有喜欢云计算的朋友喜欢一起创造奇迹,可以一起啊!!!
哪位大佬愿意抛砖引玉,在下感慨万分。
Paper Dragon也是一个无业游民,如果哪个大牛愿意给我一个生活的饭碗,在下永世难忘。