基于CentOS 6.8的OpenStack手动安装(2)

显示如下:
210 Number of sources = 4
MS Name/IP address        Stratum Poll Reach LastRx Last sample
===============================================================================
^- 59.46.44.253                  2  8  377  159  -3305us[-3305us] +/-  66ms
^+ dns1.synet.edu.cn            2  8  377  165  -1231us[ -951us] +/-  31ms
^* time5.aliyun.com              2  8  377  160    -30us[ +250us] +/-  27ms
^+ time7.aliyun.com              2  8  377  162  +1348us[+1628us] +/-  35ms

2)其他节点
chronyc sources

显示如下:
1234 210 Number of sources = 1
MS Name/IP address        Stratum Poll Reach LastRx Last sample
===============================================================================
^? 10.168.0.125                  0  7    0  10y    +0ns[  +0ns] +/-    0ns

1.4 配置OpenStack包
1.4.1 启用OpenStack库
yum install -y centos-release-openstack.noarch

1.4.2 完成安装
1)更新系统
yum -y upgrade

2)安装OpenStack客户端
yum install -y Python-openstackclient

1.5 关系型数据库的安装
1.5.1 配置MariaDB的yum源(可选)
vim /etc/yum.repos.d/MariaDB.repo

输入内容如下:
[MariaDB]
name=MariaDB
baseurl=http://yum.mariadb.org/10.0/centos6-amd64/
gpgcheck=1
gpgkey=http://yum.mariadb.org/RPM-GPG-KEY-MariaDB

1.5.2 安装MariaDB
yum install -y MariaDB-client MariaDB-server MySQL-python

1.5.3 配置MariaDB
vim /etc/my.cnf.d/mariadb_openstack.cnf

加入如下内容:
[mysqld]
 
bind-address = 10.168.0.125
 
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

1.5.4 完成安装
1)启动服务并配置默认启动
/etc/init.d/mysql start
chkconfig mysql on

2)初始化数据库
mysql_secure_installation

配置向导如下:
[...]
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!
[...]
Remove anonymous users? [Y/n] y
 ... Success!
[...]
Disallow root login remotely? [Y/n] n
 ... skipping.
[...]
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
[...]
Reload privilege tables now? [Y/n] y
 ... Success!
 
Cleaning up...
[...]

1.6 非关系型数据库的安装
1.6.1 配置MongoDB的yum源
vim /etc/yum.repos.d/MongoDB.repo

输入如下内容:
[MongoDB]
name=MongoDB
baseurl=http://downloads-distro.mongodb.org/repo/RedHat/os/x86_64/
gpgcheck=0

1.6.2 安装MongoDB
yum install -y mongodb-org mongodb-org-server

1.6.3 配置MongoDB
1)配置管理地址
vim /etc/mongod.conf

修改如下参数
bind_ip=10.168.0.125

2)限制日志文件大小
vim /etc/mongod.conf

修改如下参数
smallfiles = true

1.6.4 完成安装
/etc/init.d/mongod start
chkconfig mongod on

1.7 安装消息队列服务
1.7.1 配置yum源
1)配置ERLang的yum源

vim erlang-solutions.repo

输入如下内容:
[erlang-solutions]
name=Centos $releasever - $basearch - Erlang Solutions
baseurl=https://packages.erlang-solutions.com/rpm/centos/$releasever/$basearch
gpgcheck=1
gpgkey=https://packages.erlang-solutions.com/rpm/erlang_solutions.asc
enabled=1

2)解决SOCat的源问题
wget
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

1.7.2 安装RabbitMQ
yum install -y

1.7.3 启动并配置服务开机自启动
/etc/init.d/rabbitmq-server start
chkconfig rabbitmq-server on

1.7.4 增加OpenStack用户
rabbitmqctl add_user openstack RABBIT_PASS

显示如下:
1 Creating user "openstack" ...

1.7.5 允许配置和读写访问权限
rabbitmqctl set_permissions openstack ".*" ".*" ".*"

显示如下:
Setting permissions for user "openstack" in vhost "/" ...

注:文章为项目的安装测试文档,可能会根据后面的章节修改,如果有兴趣请持续关注。

下一章节地址,详细配置请参阅:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/5c3004c7528d860ca308b5fbd9ef939b.html