环境:
系统版本:CentOS-7.0
控制节点:192.168.100.120
计算节点:192.168.100.121
1.同步时间
[root@openstack ~]# hostnamectl set-hostname openstack [root@openstack ~]# su - [root@openstack ~]# ntpdate pool.ntp.org
2.添加mitaka源
[root@openstack ~]# wget http://repos.fedorapeople.org/repos/openstack/openstack-mitaka/rdo-release-mitaka-3.noarch.rpm [root@openstack ~]# yum install -y centos-release-openstack-mitaka [root@openstack ~]# yum install -y rdo-release-mitaka-3.noarch.rpm [root@openstack ~]# yum upgrade -y
2.添加hosts解析
[root@openstack ~]# echo -e "192.168.100.120\t$(uname -n)" >> /etc/hosts [root@openstack ~]# tail -n 1 /etc/hosts 192.168.254.140 openstack [root@openstack ~]# ping -c 2 openstack PING openstack (192.168.100.120) 56(84) bytes of data. 64 bytes from openstack (192.168.100.120): icmp_seq=1 ttl=64 time=0.035 ms 64 bytes from openstack (192.168.100.120): icmp_seq=2 ttl=64 time=0.052 ms --- openstack ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.035/0.043/0.052/0.010 ms
3.安装openstack client
[root@openstack~]# yum install python-openstackclient openstack-selinux
4.安装MariaDB
[root@openstack ~]# yum -y install mariadb-devel mariadb mariadb-server python2-PyMySQL [root@openstack ~]# cp /usr/share/mariadb/my-medium.cnf /etc/my.cnf [root@openstack ~]# vim /etc/my.cnf [client] default-character-set=utf8 [mysqld] default-storage-engine = innodb innodb_file_per_table collation-server = utf8_general_ci character-set-server = utf8 [root@openstack ~]# systemctl enable mariadb.service [root@openstack ~]# systemctl start mariadb.service [root@openstack ~]# systemctl status mariadb.service
6.安装rabbitmq
[root@openstack ~]# yum -y install http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.5/rabbitmq-server-3.5.5-3.noarch.rpm [root@openstack ~]# cp /usr/share/doc/rabbitmq-server-3.5.5/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config [root@openstack ~]# vim /etc/rabbitmq/rabbitmq.config 17: {tcp_listeners, [5672]}, 22: {tcp_listeners, [{"0.0.0.0", 5672}]} [root@openstack ~]# systemctl enable rabbitmq-server.service [root@openstack ~]# systemctl start rabbitmq-server.service [root@openstack ~]# systemctl status rabbitmq-server.service [root@openstack ~]# netstat -antup|egrep ‘15672|25672‘|grep LISTEN tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 17111/beam tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 17111/beam [root@openstack ~]# rabbitmq-plugins enable rabbitmq_management The following plugins have been enabled: mochiweb webmachine rabbitmq_web_dispatch amqp_client rabbitmq_management_agent rabbitmq_management Applying plugin configuration to rabbit@openstack... started 6 plugins. [root@openstack ~]# rabbitmqctl add_user openstack 11111111 Creating user "openstack" ... [root@openstack ~]# rabbitmqctl set_user_tags openstack administrator Setting tags for user "openstack" to [administrator] ... [root@openstack ~]# rabbitmqctl set_permissions -p / openstack ".*" ".*" ".*" Setting permissions for user "openstack" in vhost "/" ...
7.安装memcached
[root@openstack ~]# yum -y install memcached python-memcached [root@openstack ~]# systemctl enable memcached.service [root@openstack ~]# systemctl start memcached.service [root@openstack ~]# systemctl status memcached.service [root@openstack ~]# netstat -antup|grep ‘11211‘|grep LISTEN tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN 4106/memcached tcp6 0 0 :::11211 :::* LISTEN 4106/memcached
本文出自 “命运.” 博客,请务必保留此出处http://hypocritical.blog.51cto.com/3388028/1788322
OpenStack 学习笔记(二):OpenStack 基础环境搭建
原文地址:http://hypocritical.blog.51cto.com/3388028/1788322