OpenStack基本环境配置(二)
修改软件源:
此项操作皆是在controller119操作的,新添加的cloud-queeus 和 epel两个清华大学的mirrors:
vim /etc/yum.repo.d/CentOS-Base.repo #编辑配置文件
1 # CentOS-Base.repo
2 #
3 # The mirror system uses the connecting IP address of the client and the
4 # update status of each mirror to pick mirrors that are updated to and
5 # geographically close to the client. You should use this for CentOS updates
6 # unless you are manually picking other mirrors.
7 #
8 # If the mirrorlist= does not work for you, as a fall back you can try the
9 # remarked out baseurl= line instead.
10 #
12 #
13 [base]
14 name=CentOS-$releasever - Base
15 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
16 baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
17 gpgcheck=1
18 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
19
20 #released updates
21 [updates]
22 name=CentOS-$releasever - Updates
23 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
24 baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
25 gpgcheck=1
26 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
27
28 #additional packages that may be useful
29 [extras]
30 name=CentOS-$releasever - Extras
31 #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
32 baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
33 gpgcheck=1
34 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
35
36 [cloud-Queens]
37 name=Queens
38 baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/7/cloud/x86_64/openstack-queens/
39 gpgcheck=0
40
41 [epel]
42 name=epel
43 baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64
44 gpgcheck=0
45
46 #additional packages that extend functionality of existing packages
47 [centosplus]
48 name=CentOS-$releasever - Plus
49 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
50 #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
51 gpgcheck=1
52 enabled=0
53 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
54
# yum clean all
# yum repolist
# yum update #将更新后重新出现的其它yum源
安装openstack客户端
# yum install python-openstackclient
# yum install openstack-selinux
数据库SQL database
# yum install mariadb mariadb-server python2-PyMySQL
vim /etc/my.cnf.d/openstack.cnf #编辑配置文件
[mysqld]
bind-address = 10.0.0.11
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
# systemctl enable mariadb.service
# systemctl start mariadb.service
# mysql_secure_installation #设置密码 000000
消息服务器 message queue
# yum install rabbitmq-server
# systemctl enable rabbitmq-server.service #开机自启
# systemctl start rabbitmq-server.service #开启服务
# rabbitmqctl add_user openstack 000000 #创建用户openstack 用户密码000000
Creating user "openstack" ...
# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
#分配权限等级Setting permissions for user "openstack" in vhost "/" ...
验证:
rabbitmq list_uesrs #查看用户列表
rabbitmq list_permissions #查看权限列表
rabbitmq-plugins enable rabbitmq_management #开启组件
curl 127.0.0.1:15672 #web验证