centos6.5搭建OpenStack基本服务

news/2024/7/18 14:24:34 标签: linux, centos, openstack

centos65OpenStack_0">使用centos6.5搭建单节点OpenStack

条件:需要CentOS-6.5-x86_64-bin-DVD1、CentOS-6.5-x86_64-bin-DVD2、XianDian-IaaS-v1.4镜像

  1. 修改主机名
    hostname controller
vim /etc/sysconfig/network
	NETWORKING=yes
	HOSTNAME=controller
  1. 配置网络
##内部网络,我使用的是仅主机模式
[root@controller ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
	DEVICE=eth0			
	HWADDR=00:0C:29:45:97:3D
	TYPE=Ethernet
	UUID=dab56baa-0af8-4811-9662-79118507986a
	ONBOOT=yes
	NM_CONTROLLED=yes
	BOOTPROTO=static
	IPADDR=192.168.100.50
	GATEWAY=192.168.100.1
	NETMASK=255.255.255.0


##外部网络,使用NAT模式
[root@controller ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
	DEVICE=eth1
	HWADDR=00:0C:29:45:97:47
	TYPE=Ethernet
	ONBOOT=yes
	NM_CONTROLLED=yes
	BOOTPROTO=static
	IPADDR=192.168.131.50
	GATEWAY=192.168.131.2
	NETMASK=255.255.255.0
	DNS1=114.114.114.114


  1. 关闭防火墙
service iptables stop	#关闭防火墙
chkconfig iptables off	#设置开机不自启
  1. 关闭SELinux
setenforce 0	#临时关闭

sed -i '/SELINUX/{s/enforcing/permissive/}' /etc/selinux/config		#永久关闭
  1. 配置yum源

    1. mkdir /opt/centos #创建本地yum源目录
    2. 先卸载然后在挂载,执行如下图中命令(先挂载CentOS-6.5-x86_64-bin-DVD1)

    在这里插入图片描述在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

cp -rvf /mnt/* /opt/centos/		##复制有关文件到作为yum源目录下
umount /mnt						##取消挂载镜像
##重复以上操作挂载CentOS-6.5-x86_64-bin-DVD2

挂载XianDian-IaaS-v1.4
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

##挂载并复制
mount /dev/sr0 /mnt
cp -rvf /mnt/* /opt/
umount /mnt	

yum clean all;yum list ##清除缓存并list

  1. 安装iaas-xiandian
    yum install -y iaas-xiandian

  2. 修改全局配置文件

vim /etc/xiandian/openrc.sh 
##修改以下内容
#--------------------system config--------------------##
#Controller Server Manager IP. example:x.x.x.x
HOST_IP=192.168.100.50

#Controller Server hostname. example:controller
HOST_NAME=controller

#Compute Node Manager IP. example:x.x.x.x
HOST_IP_NODE=192.168.100.50

#Compute Node hostname. example:compute
HOST_NAME_NODE=controller



#--------------------MySQL config---------------------##
#Password for MySQL root user . exmaple:000000
DB_PASS=000000

#--------------------Keystone config------------------##
#Password for Keystore admin user. exmaple:000000
ADMIN_PASS=000000

#Password for Mysql keystore user. exmaple:000000
KEYSTONE_DBPASS=000000

#--------------------Glance config--------------------##
#Password for Mysql glance user. exmaple:000000
GLANCE_DBPASS=000000

#Password for Keystore glance user. exmaple:000000
GLANCE_PASS=000000

#--------------------Nova config----------------------##
#Password for Mysql nova user. exmaple:000000
NOVA_DBPASS=000000

#Password for Keystore nova user. exmaple:000000
NOVA_PASS=000000

#--------------------Neturon config-------------------##
#Password for Mysql neutron user. exmaple:000000
NEUTRON_DBPASS=000000

#Password for Keystore neutron user. exmaple:000000
NEUTRON_PASS=000000

#metadata secret for neutron. exmaple:000000
METADATA_SECRET=000000

#External Network Interface. example:eth1
INTERFACE_NAME=eth1
GLANCE_DBPASS=000000

#Password for Keystore glance user. exmaple:000000
GLANCE_PASS=000000

#--------------------Nova config----------------------##
#Password for Mysql nova user. exmaple:000000
NOVA_DBPASS=000000

#Password for Keystore nova user. exmaple:000000
NOVA_PASS=000000

#--------------------Neturon config-------------------##
#Password for Mysql neutron user. exmaple:000000
NEUTRON_DBPASS=000000

#Password for Keystore neutron user. exmaple:000000

#Password for Keystore nova user. exmaple:000000
#Password for Keystore nova user. exmaple:000000
NOVA_PASS=000000
NOVA_PASS=000000

#--------------------Neturon config-------------------##
#Password for Mysql neutron user. exmaple:000000
NEUTRON_DBPASS=000000

#Password for Keystore neutron user. exmaple:000000
NEUTRON_PASS=000000
METADATA_SECRET=000000


#First Vlan ID in VLAN RANGE for VLAN Network. exmaple:101
#minvlan=

#Last Vlan ID in VLAN RANGE for VLAN Network. example:200
#maxvlan=

#--------------------Cinder config--------------------##
#Password for Mysql cinder user. exmaple:000000
CINDER_DBPASS=000000

#Password for Keystore cinder user. exmaple:000000
CINDER_PASS=000000

#Cinder Block Disk. example:md126p3
BLOCK_DISK=sdb1

#--------------------Swift config---------------------##
#Password for Keystore swift user. exmaple:000000
SWIFT_PASS=000000

OBJECT_DISK_1=sdb2

STORAGE_LOCAL_NET_IP_1=192.168.100.50

#The numbers of all the Swift Nodes. example:3
SWIFT_ZONE=1

BLOCK_DISK=sdb1

#--------------------Swift config---------------------##
#Password for Keystore swift user. exmaple:000000
SWIFT_PASS=000000

#The NO1. NODE Object Disk for Swift. example:md126p4. The 2nd will be OBJECT_DISK_2
OBJECT_DISK_1=sdb2

#The NO1. NODE IP for Swift Storage Network. example:x.x.x.x. The 2nd will be STORAGE_LOCAL_NET_IP_2
STORAGE_LOCAL_NET_IP_1=192.168.100.50

#The numbers of all the Swift Nodes. example:3
SWIFT_ZONE=1

#The number of this Swift Node. exmaple:1
SWIFT_NODE=1

  1. 安装Qpid服务
    yum install -y qpid-cpp-server
 vim /etc/qpidd.conf
 ##修改最后一行
	auth=no
	
service qpidd start 	##启动服务
chkconfig qpidd on		##开机自启


vim /etc/hosts
##在最后一行添加
	192.168.100.50 controller                        
  1. 安装基本服务
###执行以下命令
   iaas-install-mysql.sh 
   iaas-install-keystone.sh 
   iaas-install-glance.sh 
   iaas-install-nova-controller.sh 
   iaas-install-nova-compute.sh 
   iaas-install-neutron-controller.sh 
   iaas-install-neutron-compute
   iaas-install-neutron-compute.sh 
   iaas-install-neutron-controller
   iaas-install-neutron-controller-gre.sh 
   iaas-install-neutron-compute-gre.sh 
   iaas-install-dashboard.sh 

  1. 登录192.168.100.50
    在这里插入图片描述
    在这里插入图片描述

http://www.niftyadmin.cn/n/1558520.html

相关文章

Mybatis常见面试题(转)

1、#{}和${}的区别是什么? 注:这道题是面试官面试我同事的。 答:${}是Properties文件中的变量占位符,它可以用于标签属性值和sql内部,属于静态文本替换,比如${driver}会被静态替换 为com.mysql.jdbc.Driver…

centos6.5构建OpenStack Swift对象存储

搭建OpenStack Swift对象存储 条件:在搭建好的OpenStack基本服务基础上 ##安装swift服务 iaas-install-swift-controller.sh iaas-install-swift-compute.sh##刷新系统变量,否则会报错 source /etc/keystone/admin-openrc.sh查看swift状态 swift stat…

有关OpenStack Swift 的报错问题

当使用swift stat出现以下情况时 [rootcontroller ~]# swift stat Auth version 1.0 requires ST_AUTH, ST_USER, and ST_KEY environment variables to be set or overridden with -A, -U, or -K.Auth version 2.0 requires OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, and OS_T…

Java方法System.arraycopy方法和Arrays.copyOf()

1、说明 System.arraycopy方法:如果是数组比较大,那么使用System.arraycopy会比较有优势,因为其使用的是内存复制,省去了大量的数组寻址访问等时间 public static native void arraycopy(Object src, int srcPos, …

centos7搭建Samba服务

实现Linux与Windows之间文件的共享配置网络挂载镜像配置本地yum检验本地yum源是否成功安装Samba服务开启防火墙永久放行关闭防火墙及开机自启匿名访问创建共享目录并给权限修改配置文件密码访问创建共享目录并给权限修改配置文件验证配置网络 ##配置网络命令 nmcli connection…

Hadoop示例程序WordCount详解及实例

部分参考&#xff1a;http://www.javaeye.com/topic/606962 1.图解MapReduce MapReduce整体流程图 并行读取文本中的内容&#xff0c;然后进行MapReduce操作 Map过程&#xff1a;并行读取三行&#xff0c;对读取的单词进行map操作&#xff0c;每个词都以<key,value>形式生…

Web前端学习——HTML

HTML其实还是蛮容易学习的&#xff0c;无非就是一些标签、格式的填写&#xff0c;大学的时候也做过网站设计&#xff0c;所以这里主要记录一些常用的HTML标签、属性以及书写方法等。一、常见HTML格式 主要包含文件type&#xff0c;html标签、head标签、body标签三个主题标签&am…

CentOS 7搭建基础docker(Xiandian版)

单节点搭建简单的docker配置网络配置本地yum源挂载XianDian-PaaS-v2.1镜像关闭防火墙及SELinux修改防火墙规则开启内核转发功能查询yum列表安装服务配置仓库地址并启动服务搭建docker私有仓库部署docker-server节点部署docker-client节点查看私有仓库的镜像页面访问条件&#x…