码迷,mamicode.com
首页 > 其他好文 > 详细

openstack实战

时间:2015-05-18 21:12:03      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:openstack centos6.5


一、基础环境


1.控制节点

 CentOS6.5 base server + development tools

 内存:2G

 硬盘:20G及以上

 网卡:2块

 计算节点

 

2.配置网络可以上外网(实验ip以10.77.60.227为例)

 #vi /etc/sysconfig/network-scripts/ifcfg-eth0

 #hostname controller   //设置主机名

 #vi /etc/sysconfig/network

  hostname = controller   //修改hostname为controller

 #vi /etc/hosts

  10.77.60.227 controller  //配置地址解析

 #vi /etc/sysctl.conf

  net.ipv4.ip_forward = 1  //修改0位1  开启ip转发

  net.ipv4.conf.default.rp_filter = 0  //修改1位0  开启反向路径过滤

  net.ipv4.conf.all.rp_filter = 0   //增加此行  开启反向路径过滤

 #sysctl -p  //使设置生效


3.关闭iptables和selinux

 #service iptables stop  //关闭防火墙

 #chkconfig iptables off  //开机不启动

 #vi /etc/sysconfig/selinux

  selinux=disabled   //修改selinux为disabled关闭selinux

 #shutdown -r now  //重启系统

 

4.安装epel

 #wget http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

 #rpm -ivh epel-release-6-8.noarch.rpm

5.安装依赖包

 #yum -y install python-pip python-devel gcc gcc-c++ make libtool patch automake libxslt-devel MySQL-python openssl-devel libudev-devel git libvirt-python libvirt qemu-kvm gedit python-numdisplay device-mapper bridge-utils libffi-devel libffi lrzsz


6.下载openstack组件

 #wget https://launchpadlibrarian.net/205200136/keystone-2015.1.0.tar.gz


 #wget https://launchpadlibrarian.net/205200832/nova-2015.1.0.tar.gz


 #wget https://launchpadlibrarian.net/205209595/glance-2015.1.0.tar.gz


 #wget https://launchpadlibrarian.net/205201746/horizon-2015.1.0.tar.gz


 #wget https://launchpadlibrarian.net/205208455/neutron-2015.1.0.tar.gz


 #wget https://launchpadlibrarian.net/205209525/cinder-2015.1.0.tar.gz


7.解压如下软件包

 #tar zxf nova-2015.1.0.tar.gz

 #tar zxf horizon-2015.1.0.tar.gz

 #tar zxf neutron-2015.1.0.tar.gz

 #tar zxf glance-2015.1.0.tar.gz

 #tar zxf cinder-2015.1.0.tar.gz


8.合并依赖包

 #cat */requirements.txt | sort -n | uniq >> openstack.txt

 #pip install -r openstack.txt -i http://pypi.v2ex.com/simple   //安装


9.安装mysql和rabbitmq

 #yum -y install mysql-server rabbitmq-server

 #/usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management  

   //打开rabbitmq组件管理  监听端口15672  5672 

 #/etc/init.d/rabbitmq-server restart  //重启rabbitmq服务

 #/etc/init.d/mysqld restart  //启动mysql

 #mysqladmin -uroot password openstack  //设置mysql的密码

 #cp /usr/share/mysql/my-medium.cnf /etc/my.cnf  //拷贝mysql的配置模板

 #vi /etc/my.cnf

  [mysqld]

   ...

  default-storage-engine = innodb

  collation-server = utf8_general_ci

  init_connect = ‘SET NAMES utf8‘

  character-set-server = utf8   //加入以上4行,保存退出

 #/etc/init.d/mysqld restart  //重启mysql


10.设置开机启动mysql和rabbitmq

 #chkconfig mysqld on

 #chkconfig rabbitmq-server on


二、实战安装

1.

 #lsof -i:3306   //查看mysql端口是否监听

 #lsof -i:5672   //查看rabbitmq端口是否监听

 #tar zxf keystone-2015.1.0.tar.gz  //解压

 #pip install -r requirements.txt -i http://pypi.v2ex.com/simple  //安装keystone依赖

 #python setup.py install

 #

 #

 #

 #

 #

 #

 #

 #

 #

 #

 #












本文出自 “点滴记录与你分享” 博客,请务必保留此出处http://xkai20.blog.51cto.com/854040/1652255

openstack实战

标签:openstack centos6.5

原文地址:http://xkai20.blog.51cto.com/854040/1652255

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!