(1)实验环境准备

一、基础软件包安装

1.安装OpenStack仓库

tee /etc/yum.repos.d/CentOS-OpenStack-newton.repo <<-'EOF'
[centos-openstack-newton]
name=newton
baseurl=https://mirrors.cnnic.cn/centos-vault/7.2.1511/cloud/x86_64/openstack-newton/
gpgcheck=0
enabled=1
EOF

2.安装OpenStack客户端

yum install -y python-openstackclient

3.安装openstack SELinux管理包

# yum install -y openstack-selinux

二、MySQL数据库部署

1.MySQL安装

[root@linux-node1 ~]# yum install -y mariadb mariadb-server python2-PyMySQL

2.修改MySQL配置文件

[root@linux-node1 ~]# vim /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 192.168.8.11 #设置监听的IP地址
default-storage-engine = innodb  #设置默认的存储引擎
innodb_file_per_table #使用独享表空间
max_connections = 4096 #设置MySQL的最大连接数,生产请根据实际情况设置
collation-server = utf8_general_ci #服务器的默认校对规则 
character-set-server = utf8 #服务器安装时指定的默认字符集设定

3.启动MySQL Server并设置开机启动

[root@linux-node1 ~]# systemctl enable mariadb.service
[root@linux-node1 ~]# systemctl start mariadb.service

4.进行数据库安全设置

[root@linux-node1 ~]# mysql_secure_installation

5.数据库创建

[root@linux-node1 ~]# mysql -u root -p
Enter password:

MariaDB [(none)]>

Keystone数据库

create database keystone;
grant all on keystone.* to 'keystone'@'localhost' identified by 'keystone';
grant all on keystone.* to 'keystone'@'%' identified by 'keystone';

Glance数据库

create database glance;
grant all on glance.* to 'glance'@'localhost' identified by 'glance';
grant all on glance.* to 'glance'@'%' identified by 'glance';

Nova数据库

create database nova;
grant all on nova.* to 'nova'@'localhost' identified by 'nova';
grant all on nova.* to 'nova'@'%' identified by 'nova';
create database nova_api;
grant all on nova_api.* to 'nova'@'localhost' identified by 'nova';
grant all on nova_api.* to 'nova'@'%' identified by 'nova';

Neutron 数据库

create database neutron;
grant all on neutron.* to 'neutron'@'localhost' identified by 'neutron';
grant all on neutron.* to 'neutron'@'%' identified by 'neutron';

Cinder数据库

create database cinder;
grant all on cinder.* to 'cinder'@'localhost' identified by 'cinder';
grant all on cinder.* to 'cinder'@'%' identified by 'cinder';

三:消息队列RabbitMQ

1.安装RabbitMQ

[root@linux-node1 ~]# yum install -y rabbitmq-server

2.设置开启启动,并启动RabbitMQ

[root@linux-node1 ~]# systemctl enable rabbitmq-server.service
[root@linux-node1 ~]# systemctl start rabbitmq-server.service

3.添加openstack用户。

[root@linux-node1 ~]# rabbitmqctl add_user openstack openstack
Creating user "openstack" ...


4.给刚才创建的openstack用户,创建权限。

[root@linux-node1 ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/" ...

5.启用Web监控插件

[root@linux-node1 ~]# rabbitmq-plugins list
[root@linux-node1 ~]# rabbitmq-plugins enable rabbitmq_management
[root@linux-node1 ~]# lsof -i:15672 #显示打开的端口是15672

用guest登陆

转载请注明来源,谢谢:Linux备忘录 » (1)实验环境准备

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址