Centos7 Openstack - (第一節)基本環境配置


 

Centos7 install Openstack - (第一節)基本環境配置

我的blog地址:http://www.cnblogs.com/caoguo

根據openstack官方文檔配置

官方文檔地址: http://docs.openstack.org/juno/install-guide/install/yum/content/#

0x01.網絡配置

#准備服務器
192.168.88.133  controller
192.168.88.134  network
192.168.88.135  compute1


#配置所有節點的hosts
cat >/etc/hosts <<EOF
192.168.88.133  controller
192.168.88.134  network
192.168.88.135  compute1
EOF


#測試所有hosts添加是否生效
ping -c 4 controller;ping -c 4 network;ping -c 4 compute1

#關閉防火牆和selinux
systemctl stop firewalld;setenforce 0

0x02.NTP網絡時間服務器

a)主節點配置
    [root@controller ~]# yum install -y ntp
    [root@controller ~]# vi /etc/ntp.conf
    #server NTP_SERVER iburst
    restrict 192.168.88.0 mask 255.255.255.0 nomodify notrap
    restrict -4 default kod notrap nomodify
    restrict -6 default kod notrap nomodify

    [root@controller ~]# systemctl enable ntpd.service
    [root@controller ~]# systemctl start ntpd.service

 


b)其他節點
    [root@network ~]# yum install -y ntp
    [root@network ~]# echo "server controller iburst" >/etc/ntp.conf
    [root@network ~]# systemctl enable ntpd.service
    [root@network ~]# systemctl start ntpd

    [root@compute1 ~]# yum install -y ntp
    [root@compute1 ~]# echo "server controller iburst" >/etc/ntp.conf
    [root@compute1 ~]# systemctl enable ntpd.service
    [root@compute1 ~]# systemctl start ntpd


c)確認以上操作是否成功(所有節點)
ntpq -c peers; ntpq -c assoc

 

 

 

 

0x03.OpenStack packages(所有節點)

    yum install -y yum-plugin-priorities
    yum install -y http://mirrors.opencas.cn/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
    yum install -y http://rdo.fedorapeople.org/openstack-juno/rdo-release-juno.rpm
    yum install -y openstack-selinux

 

0x04.數據庫(控制節點)

[root@controller ~]# yum install -y mariadb mariadb-server MySQL-python
[root@controller ~]# vi /etc/my.cnf
[mysqld]
bind-address = 192.168.88.133
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

[root@controller ~]# systemctl enable mariadb.service
[root@controller ~]# systemctl start mariadb.service

[root@controller ~]# mysql_secure_installation 
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

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] n
 ... skipping.

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!

 

0x05.消息服務(控制節點)

[root@controller ~]# yum install -y rabbitmq-server
[root@controller ~]# systemctl enable rabbitmq-server.service
[root@controller ~]# systemctl start rabbitmq-server.service
[root@controller ~]# rabbitmqctl change_password guest RABBIT_PASS
Changing password for user "guest" ...
...done.

[root@controller ~]# rabbitmqctl status | grep rabbit
Status of node rabbit@controller ...
 {running_applications,[{rabbit,"RabbitMQ","3.3.5"},

[root@controller ~]# echo '[{rabbit, [{loopback_users, []}]}].' >/etc/rabbitmq/rabbitmq.config
[root@controller ~]# systemctl restart rabbitmq-server.service

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM