1、CentOS64安装OpenStack IcehouseCentOS6.4安装OpenStack Icehouse主机分配:主机名 IP(Static) 系统 配置 角色openstack 192.168.20.200 CentOS-6.4-x86_64-minimal 4CPU,16G,300G,2网卡 管理节点/计算节点node01 192.168.20.201 CentOS-6.4-x86_64-minimal 4CPU,16G,300G,2网卡 计算节点初始化配置:(1).配置/etc/hosts文件rootopenstack # vi /etc/hosts127.0.0.1 loca
2、lhost localhost.localdomain localhost4 localhost4.localdomain4:1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.10.21 openstack192.168.10.22 node01(2).配置网络rootopenstack # vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0TYPE=EthernetONBOOT=yesBOOTPROTO=staticIPADDR=1
3、92.168.20.200NETMASK=255.255.255.0GATEWAY=192.168.20.2rootopenstack # vi /etc/sysconfig/network-scripts/ifcfg-eth1DEVICE=eth1TYPE=EthernetONBOOT=yesBOOTPROTO=none(3).关闭selinux:rootopenstack # vi /etc/selinux/config# This file controls the state of SELinux on the system.# SELINUX= can take one of the
4、se three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - SELinux is fully disabled.SELINUX=disabled# SELINUXTYPE= type of policy in use. Possible values are:# targeted - Only targeted network daemons are protected.# st
5、rict - Full SELinux protection.SELINUXTYPE=targetedrootopenstack # setenforce 0(4).修改/etc/sysctl.conf参数:rootopenstack #vi /etc/sysctl.confnet.ipv4.ip_forward=1net.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0rootopenstack #sysctl -p #使sysctl.conf配置生效(5).关闭多余的服务(可选):#!/bin/bashSERVICE_SU
6、M=auditd blk-availability iscsi iscsid lvm2-monitor mdmonitor multipathd netconsole postfix rdisc restorecond saslauthdecho $SERVICE_SUM | xargs -n1 | while read SERVICEdo chkconfig $SERVICE offservice $SERVICEstopdone(6).导入第三方安装源:rootopenstack #yum -y install http:/repos.fedorapeople.org/repos/open
7、stack/openstack-icehouse/rdo-release-icehouse-2.noarch.rpmrootopenstack #yum -y install http:/dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm(7).更新kernel:rootopenstack #yum -y install kernel-2.6.32-358.123.2.openstack*(8).安装OpenStack工具包:rootopenstack#yum-y install openstack-utilso
8、penstack-selinux(9).重启:rootopenstack # reboot2.安装配置NTP服务(1).安装NTP服务:rootopenstack # yum -y install ntp(2).配置NTP服务:rootopenstack # vi /etc/ntp.confdriftfile /var/lib/ntp/driftrestrict default ignorerestrict 127.0.0.1restrict192.168.10.0mask 255.255.255.0 nomodify notrapserver ntp.api.bzserver 127.127
9、.1.0 # local clockfudge 127.127.1.0 stratum 10keys /etc/ntp/keys(3).启动NTP服务,设置开机自启动:rootopenstack # service ntpd startrootopenstack # chkconfig ntpd on3.配置安装MySQL:(1).安装MySQL服务:rootopenstack # yum -y installmysql mysql-server MySQL-python (yum install MySQL-python in node)(2).修改MySQL配置文件:mysqlddatad
10、ir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockuser=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0bind-address = 0.0.0.0 #设置监听IP地址0.0.0.0default-storage-engine = innodbcollation-server = utf8_general_ciinit-connect = SET NAMES utf8character-set-se
11、rver = utf8mysqld_safelog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid(3).启动MqSQL服务,设置开机自启动:rootopenstack # service mysqld startrootopenstack # chkconfig mysqld on(4).修改MySQL密码为passwd:rootopenstack #mysqladmin -uroot password passwd; history -c4.安装配置qpid服务(1).安装qpid服务:rootopenstack #
12、yum-yinstall qpid-cpp-server memcached(2).修改/etc/qpidd.conf配置文件,将auth设置为no:rootopenstack #vi/etc/qpidd.confauth=no(3).启动qpid服务,设置开机启动:rootopenstack # service qpidd startrootopenstack # chkconfig qpidd on5.安装配置KeyStone(1).安装KeyStone服务:rootopenstack #yum -y install openstack-keystone python-keystonecl
13、ient(2).创建keystone数据库,修改配置文件中的数据库链接:rootopenstack #openstack-db -init -service keystone -rootpw passwd(3).修改配置文件中的数据库链接:rootopenstack #openstack-config -set /etc/keystone/keystone.conf sql connection mysql:/keystone:keystonelocalhost/keystone(4).使用openssl随即生成一个令牌,将其存储在配置文件中:rootopenstack # export SE
14、RVICE_TOKEN=$(openssl rand -hex 10) /随机生成SERVICE_TOKEN值,请牢记rootopenstack # export SERVICE_ENDPOINT=http:/127.0.0.1:35357/v2.0rootopenstack # mkdir /root/configrootopenstack # echo $SERVICE_TOKEN /root/config/ks_admin_token.txtrootopenstack # cat /root/config/ks_admin_token.txt12dd70ede7c9d9d3ed3crootopenstack # openstack-config -set /etc
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1