1. 程式人生 > >照著官網來安裝openstack pike之environment設置

照著官網來安裝openstack pike之environment設置

secure 修改配置 cti es2017 http mysqld and shang miss

安裝openstack前的準備環境:

  兩個centos7系統的環境:192.168.101.10 node1,192.168.101.11 node2

控制節點node1,計算節點node2

1、統一hosts文件:

[root@node1 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.101.10    node1
192.168.101.11    node2

[root@node2 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.101.10   node1
192.168.101.11   node2

2、時間同步(控制節點操作)

yum install chrony

修改vim /etc/chrony.conf

allow 192.168.101.0/16    開啟

最後開啟服務:

systemctl enable chronyd.service
systemctl start chronyd.service

以下是計算節點或者其他節點操作:

yum install chrony

修改vim /etc/chrony.conf

allow 192.168.101.0/16    開啟

註釋掉:

#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
server 192.168.101.10 iburst           (新增控制節點)

最後開啟服務:

systemctl enable chronyd.service
systemctl start chronyd.service

有必要的化請設置時區:timedatectl set-timezone Asia/Shanghai

官網設置:

https://docs.openstack.org/install-guide/environment-ntp-controller.html https://docs.openstack.org/install-guide/environment-ntp-other.html 校驗結果: 技術分享

技術分享

3、在所有節點(這裏只有控制節點和計算節點,如果有其他節點也需要操作)操作如下:

yum install centos-release-openstack-pike
yum upgrade

  If the upgrade process includes a new kernel, reboot your host to activate it.

由於更新了kernel,於是需要進行重啟,以新內核啟動,開啟後,繼續執行:

yum install python-openstackclient yum install openstack-selinux 4、安裝數據庫(在控制節點上) https://docs.openstack.org/install-guide/environment-sql-database-rdo.html
# yum install mariadb mariadb-server python2-PyMySQL
# vim /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 192.168.101.10

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

5、安裝消息隊列服務rabbitmq(控制節點上操作)

# yum install rabbitmq-server
# systemctl enable rabbitmq-server.service
# systemctl start rabbitmq-server.service
Add the openstack user:
# rabbitmqctl add_user openstack openstack(賬號和密碼)
Permit configuration, write, and read access for the openstack user:
# rabbitmqctl set_permissions openstack ".*" ".*" ".*"

技術分享

rabbitmq服務監聽在5672、25672端口

列出rabbitmq的插件:
# rabbitmq-plugins list

啟動某一個插件:

# rabbitmq-plugins enable rabbitmq_management

重啟rabbitmq服務:

systemctl restart rabbitmq-server.service

上面這個開啟的插件是一個web管理平臺,監聽在15672端口:

tcp        0      0 0.0.0.0:15672           0.0.0.0:*               LISTEN      12581/beam.smp 

訪問這個web管理平臺:

http://192.168.101.10:15672 默認賬號密碼:guest:guest 設置使用openstack賬號登錄: 技術分享

技術分享

設置完成,退出登錄,使用openstack:openstack登錄,即可成功 6、安裝memcached服務(控制節點):uses Memcached to cache tokens
# yum install memcached python-memcached

修改配置文件:/etc/sysconfig/memcached

OPTIONS="-l 127.0.0.1,::1,192.168.101.10"

開啟memcached服務:

# systemctl enable memcached.service
# systemctl start memcached.service
tcp        0      0 192.168.101.10:11211    0.0.0.0:*               LISTEN      12982/memcached     
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      12982/memcached

至此openstack基本前提環境安裝完成

照著官網來安裝openstack pike之environment設置