CentOS6.5+OpenStack+kvm云平台部署
Havana(Nova-Network版)
注意:(以下的截图仅提供参考,参数不一定跟文档相同,矩形框起来的技术点可以忽略)
一.主机分配:
主机名 IP(Static) 系统 配置 角色
openstack 192.168.1.2 CentOS-6.5-x86_64-minimal 4CPU,16G RAM,300G DISK,2网卡 管理节点/计算节点
node 192.168.1.3 CentOS-6.5-x86_64-minimal 4CPU,16G RAM,300G DISK,2网卡 计算节点
二、管理节点安装(OpenStack)
1.基础配置
操作系统使用CentOS-6.5-x86_64-minimal.iso,安装过程省略,本文采用yum源安装。
(1).导入第三方安装源
悬坠钓法
[root@openstack ~]# rpm -Uvh dl.fedoraproject/pub/epel/6/x86_arch.rpm
[root@openstack ~]# rpm -poforge/rpmforge-relea/rpmforge-relea-0.5.3-1.el6.rf.x86_64.rpm
[root@openstack ~]# yum install repos.fedorapeople/repos/openstack/arch.rpm
(2).配置/etc/hosts文件
[root@openstack ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.2 openstack
192.168.1.3 node
(3).配置网络
[root@openstack ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="E4:1F:13:45:AB:C8"
ONBOOT="yes"
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE="Ethernet"
[root@openstack ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="none"
HWADDR="E4:1F:13:45:AB:CA"
ONBOOT="yes"
TYPE="Ethernet"
(4).关闭linux:
[root@openstack ~]# more /etc/linux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of the three values:
# enforcing - SELinux curity policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in u. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
[root@openstack ~]# tenforce 0
(5).修改/f参数:
[root@openstack ~]# vi /f
……………………
net.ipv4.ip_forward = 1
……………………
[root@openstack ~]#sysctl -p #使f配置生效
2.安装配置NTP服务
(1).安装NTP服务:
[root@openstack ~]# yum -y install ntp
(2).配置NTP服务:
[root@openstack ~]# vi /f
driftfile /var/lib/ntp/drift
restrict default ignore
restrict 127.0.0.1
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
rver ntp.api.bz
rver 127.127.1.0 # local clock
关于惜时的诗句fudge 127.127.1.0 stratum 10
keys /etc/ntp/keys
(3).启动NTP服务,设置开机自启动:例子造句
[root@openstack ~]# rvice ntpd start
[root@openstack ~]# chkconfig ntpd on
3.配置安装MySQL:
(1).安装MySQL服务:
[root@openstack ~]# yum -y install mysql mysql-rver MySQL-python
(2).修改MySQL配置文件:
# vi /etc/myf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
ur=mysql
# Disabling symbolic-links is recommended to prevent assorted curity risks
symbolic-links=0
bind-address = 0.0.0.0 #设置监听IP地址0.0.0.0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
(3).启动MqSQL服务,设置开机自启动:
[root@openstack ~]# rvice mysqld start
付出作文[root@openstack ~]# chkconfig mysqld on
(4).修改MySQL密码为passwd:
[root@openstack ~]# mysqladmin -uroot password 'passwd'; history -c
4.安装配置qpid服务
(1).安装qpid服务:
[root@openstack ~]# yum -y install qpid-cpp-rver memcached
(2).修改/f配置文件,将auth设置为no:
[root@openstack ~]# vi /f
……………………
auth=no
(3).启动qpid服务,设置开机启动:群起效尤
[root@openstack ~]# rvice qpidd start
[root@openstack ~]# chkconfig qpidd on
qq背景墙壁纸(4).安装OpenStack工具包:
[root@openstack ~]# yum install -y openstack-utils
5.安装配置KeyStone
5.1.初始化KeyStone:
(1).安装KeyStone服务:
怎么做钱包[root@openstack ~]# yum -y install openstack-keystone
(2).创建keystone数据库,修改配置文件中的数据库链接:
[root@openstack ~]# openstack-db --init --rvice keystone
(3).修改配置文件中的数据库链接:
[root@openstack ~]# openstack-config --t /etc/f sql connection mysql://keystone:keystone@localhost/keystone
(4).使用openssl随即生成一个令牌,将其存储在配置文件中:
[root@openstack ~]# export SERVICE_TOKEN=$(openssl rand -hex 10)
房屋租赁合同模板 //随机生成SERVICE_TOKEN值,请牢记
[root@openstack ~]# export SERVICE_ENDPOINT=127.0.0.1:35357/v2.0
[root@openstack ~]# mkdir /root/config