1、OpenStack 基础环境搭建

1.1、最小化安装控制节点、计算节点、块存储节点等;

1.2、分别设置各节点主机名,配置各节点网络以及修改hosts;

1.3、分别验证各节点网络互通(包括管理网络和计算网络);

1.4、在所有安装Chrony,并进行配置以进行时间同步服务;

控制节点下:
/etc/chrony.conf中设置使用公共NTP服务器进行时间同步

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

 
非控制节点下:
/etc/chrony.conf中添加使用controller进行时间同步 server controller iburst

1.5、在控制节点设置允许其他节点访问(/etc/chrony.conf)

# Allow NTP client access from local network.
#allow 192.168/16
allow 10.0.0.0/24

1.6、在所有节点验证时间同步服务

# chronyc sources

1.7、配置(随系统)启动

# systemctl enable chronyd.service
# systemctl start chronyd.service

1.8、启用OpenStack库

# yum install centos-release-openstack-newton

1.9、升级软件包(升级完成之后重启主机)

# yum upgrade

#NOTICE:如果升级之后重启进入emergency mode,使用fsck进行文件系统修复

1.10、安装OpenStack客户端

# yum install python-openstackclient

1.11、默认情况下,RHEL和CentOS启用SELinux。安装 openstack-selinux软件包以自动管理OpenStack服务的安全策略

# yum install openstack-selinux

2.0、在控制节点上安装mysql数据库

# yum install mariadb mariadb-server python2-PyMySQL

2.1、创建并编辑/etc/my.cnf.d/openstack.cnf配置文件:

[mysqld] 
bind-address  =  10.0.0.11 (控制器管理IP)

default-storage-engine  =  innodb 
innodb_file_per_table 
max_connections  =  4096 
collat​​ion-server  =  utf8_general_ci 
character-set-server  =  utf8

2.2、配置(随系统)启动

# systemctl enable mariadb.service
# systemctl start mariadb.service

2.3、保护数据库服务,特别是为数据库root帐户选择合适的密码 (此步骤需要连接数据库,所以需要保证数据库服务已经启动)

# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

3.1、在控制节点上 消息队列服务安装

# yum install rabbitmq-server

3.2、配置(随系统)启动

# systemctl enable rabbitmq-server.service
# systemctl start rabbitmq-server.service

3.3、添加openstack用户

# rabbitmqctl add_user openstack RABBIT_PASS

3.4、设置配置、写入、读取的访问权限

# rabbitmqctl set_permissions openstack ".*" ".*" ".*"

 

4.1、在控制节点上进行  Memcached(分布式内存对象缓存系统)安装

# yum install memcached python-memcached

4.2、Memcached配置

/etc/sysconfig/memcached中修改控制节点IP:

OPTIONS="-l 10.0.7.150,::1"

4.3、配置(随系统)启动

# systemctl enable memcached.service
# systemctl start memcached.service

 

转载于:https://www.cnblogs.com/hardysui/p/7201052.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值