怎样使用yum安装OpenStack
headsen chen 2017-10-09 19:17:15
个人原创博客,转载请注明作者,出处,否则追究法律责任
[shanghai_chen@linux-node1 ~]$ su - root
Password: Last login: Mon Oct 9 10:44:07 CST 2017 on pts/0[root@linux-node1 ~]# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.29.134 netmask 255.255.255.0 broadcast 192.168.29.255 inet6 fe80::20c:29ff:fe21:abb6 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:21:ab:b6 txqueuelen 1000 (Ethernet) RX packets 1 bytes 342 (342.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 37 bytes 5150 (5.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0ens37: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.13.148 netmask 255.255.255.0 broadcast 192.168.13.255 inet6 fe80::2d8c:6eed:8156:ee8c prefixlen 64 scopeid 0x20<link> ether 00:0c:29:21:ab:c0 txqueuelen 1000 (Ethernet) RX packets 383 bytes 23548 (22.9 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 41 bytes 5840 (5.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1 (Local Loopback) RX packets 12 bytes 1404 (1.3 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 12 bytes 1404 (1.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:d4:41:65 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0[root@linux-node1 ~]# ping baidu.com
PING baidu.com (123.125.114.144) 56(84) bytes of data.64 bytes from 123.125.114.144 (123.125.114.144): icmp_seq=1 ttl=128 time=34.6 ms64 bytes from 123.125.114.144 (123.125.114.144): icmp_seq=2 ttl=128 time=35.0 ms64 bytes from 123.125.114.144 (123.125.114.144): icmp_seq=3 ttl=128 time=35.0 ms^C--- baidu.com ping statistics ---3 packets transmitted, 3 received, 0% packet loss, time 2004msrtt min/avg/max/mdev = 34.657/34.896/35.024/0.169 ms [root@linux-node1 ~]# yum repolist...repo id repo name statusbase/7/x86_64 CentOS-7 - Base 9,591epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 11,981extras/7/x86_64 CentOS-7 - Extras 227updates/7/x86_64 CentOS-7 - Updates 731repolist: 22,530安装了epel的扩展库后,直接安装OpenStack会失败,也就是扩展库根本就没有OpenStack的安装包。
[root@linux-node1 ~]# yum install -y python-OpenStackclient
...No package python-OpenStackclient available.Error: Nothing to do[root@linux-node1 ~]# yum install -y OpenStack-keystone
...No package OpenStack-keystone available.升级yum源后仍然没用
[root@linux-node1 ~]# yum upgrade
...Complete! [root@linux-node1 ~]# yum install openstack-nova-apNo package openstack-nova-ap available.
Error: Nothing to do------------------------------------------------------------------------------------------------------------------------
安装下面的软件后就可以了
[root@linux-node1 ~]# yum install centos-release-openstack-newton
...
Installed: centos-release-openstack-newton.noarch 0:1-2.el7Dependency Installed:
centos-release-ceph-jewel.noarch 0:1.0-1.el7.centos centos-release-qemu-ev.noarch 0:1.0-2.el7 centos-release-storage-common.noarch 0:1-2.el7.centos centos-release-virt-common.noarch 0:1-1.el7.centosComplete!
[root@linux-node1 ~]# yum install https://repos.fedorapeople.org/repos/openstack/openstack-newton/rdo-release-newton-5.noarch.rpm
...Installed: rdo-release.noarch 0:newton-5Complete!
[root@linux-node1 ~]# yum upgrade
...Complete!下面就可以安装OpenStack的软件
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
[root@linux-node1 ~]# yum install python-openstackclient
...
Dependencies Resolved...Complete!
[root@linux-node1 ~]# yum install openstack-selinux...Dependencies Resolved...Installed: openstack-selinux.noarch 0:0.8.7-1.el7 Complete! [root@linux-node1 ~]# yum install openstack-keystone httpd mod_wsgi...Complete![root@linux-node1 ~]# yum install openstack-glance[root@linux-node1 ~]# yum repolist
...repo id repo name statusbase/7/x86_64 CentOS-7 - Base 9,591centos-ceph-jewel/7/x86_64 CentOS-7 - Ceph Jewel 51centos-openstack-newton/x86_64 CentOS-7 - OpenStack newton 1,448centos-qemu-ev/7/x86_64 CentOS-7 - QEMU EV 31*epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 11,981extras/7/x86_64 CentOS-7 - Extras 227openstack-newton/x86_64 OpenStack Newton Repository 1,448rdo-qemu-ev/x86_64 RDO CentOS-7 - QEMU EV 31updates/7/x86_64 CentOS-7 - Updates 731repolist: 25,539[root@linux-node1 ~]#