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

Openstack安装

时间:2015-05-21 19:48:07      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:openstack

一.准备工作:

  1. 系统安装

        系统安装参考这篇博文 http://oldboy.blog.51cto.com/2561410/1564620  即可(可以使用Centos 6.4)

    2.系统安装好后,设置系统参数


1.修改网卡信息

网卡1

[root@linux-node1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
网卡2

[root@linux-node1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp

2.修改系统变量



vi /etc/sysctl.conf

net.ipv4.ip_forward = 1 (修改1)

# Controls source route verification
net.ipv4.conf.default.rp_filter = 0  (修改为0)
net.ipv4.conf.all.rp_filter = 0 (增加)
sysctl -p

3.关闭防火墙和selinux

/etc/init.d/iptables stop

chkconfig iptables off


vi /etc/sysconfig/selinux

SELINUX=disabled

4.reboot

5.安装epel的yum源

yum install http://mirrors.ustc.edu.cn/fedora/epel/6Server/x86_64/epel-release-6-8.noarch.rpm


6.安装常用软件包

   yum install python-pip gcc gcc-c++ make libtool patch automake python-devel libxslt-devel MySQL-python openssl-devel libudev-devel git wget libvirt-python libvirt qemu-kvm gedit python-numdisplay device-mapper bridge-utils libffi-devel libffi lrzsz rabbitmq-server.noarch mysql-server


7.下载如下安装包到/usr/local/src下,然后解压缩.

tar xf horizon-2014.1.tar.gz
tar xf nova-2014.1.tar.gz
tar xf neutron-2014.1.tar.gz
tar xf glance-2014.1.tar.gz 

tar xf cinder-2014.1.tar.gz


8.安装依赖

cd /usr/local/src

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

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


9.设置rabbitmq

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

tip:可以用如下命令查看rabbitmq的plugin

/usr/lib/rabbitmq/bin/rabbitmq-plugins enable list

启动rabbitmq

/etc/init.d/rabbitmq-server start
netstat -anp |grep 15672 (提供给web访问的端口)

netstat -anp |grep 5672  (服务监控5672端口)

用浏览器访问rabbitmq,测试

firefox->http://192.168.56.102:15672/  (username:guest  password:guest)

开机启动

chkconfig rabbitmq-server on

10.配置mysql

cp /usr/share/mysql/my-medium.cnf /etc/my.cnf

修改my.cnf,增加如下4列


default-storage-engine = innodb
collation-server = utf8_general_ci
init-connect = ‘SET NAMES utf8‘
character-set-server = utf8

启动MySQL服务

/etc/init.d/mysqld start

修改root密码

mysqladmin -uroot password openstack

chkconfig mysqld on




TBA

Openstack安装

标签:openstack

原文地址:http://ashine.blog.51cto.com/1632639/1653544

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