openstack安装笔记 环境(零)

在mac上用vmwarerhel6.5搭建openstack测试环境

vmware设置网络仅供我的mac专用,vm不能连外网模式

/etc/sysctl.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 1
cat /etc/security/limits.conf
*               soft     nproc           65535 
*               hard    nproc           65535
*               soft    nofile            65535
*               hard    nofile           65535
*               soft     core            ulimit 
*               hard    core            ulimit
/etc/selinux/config
SELINUX=disabled

modprobe  -r bridge
rm /etc/udev/rules.d/70-persistent-net.rules 

vim /etc/sysconfig/iptables
-I INPUT -p tcp --dport 80 -j ACCEPT
-I INPUT -p tcp --dport 3306 -j ACCEPT
-I INPUT -p tcp --dport 5000 -j ACCEPT
-I INPUT -p tcp --dport 5672 -j ACCEPT
-I INPUT -p tcp --dport 8080 -j ACCEPT
-I INPUT -p tcp --dport 8773 -j ACCEPT
-I INPUT -p tcp --dport 8774 -j ACCEPT
-I INPUT -p tcp --dport 8775 -j ACCEPT
-I INPUT -p tcp --dport 8776 -j ACCEPT
-I INPUT -p tcp --dport 8777 -j ACCEPT
-I INPUT -p tcp --dport 9292 -j ACCEPT
-I INPUT -p tcp --dport 9696 -j ACCEPT
-I INPUT -p tcp --dport 15672 -j ACCEPT
-I INPUT -p tcp --dport 55672 -j ACCEPT
-I INPUT -p tcp --dport 35357 -j ACCEPT
-I INPUT -p tcp --dport 12211 -j ACCEPT

/etc/init.d/iptablesrestart

vim /etc/hosts  127后面加个 
127.0.0.1   controller
cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=controller

设置ip

vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=172.16.21.233
NETMASK=255.255.255.0

yum配置,把其中ip整体改成本机到

cp icehouse.repo rabbitmq.repo rhel65.repo epel-depends.repo /etc/yum.repos.d/
sed -i "s/192.168.254.126/172.16.21.233/g" `grep "192.168.254.126" -rl .`

yum本地的一堆东西,最多的在iso里面,配置yum源,http为了让其他vm也适用

全都解压到/var/www/html,iso也ln到这里
mount -o loop /mnt/hgfs/xiao7/Desktop/rhel-server-6.5-x86_64-dvd.iso /mnt/rhel65/
ln -s /mnt/rhel65/ /var/www/html/rhel65

tar zxvf redhat-openstack-icehouse.tar
tar zxvf epel-depends.tar
tar zxvf redhat-openstack-repo.tar.gz

iptables -F
service httpd start
chkconfig httpd on
vim /etc/sysconfig/iptables
/etc/init.d/iptables restart

---------------

各种yum配置:

[root@controller yum.repos.d]# ls
epel-depends.repo  icehouse.repo  rabbitmq.repo  rhel65.repo  rhel-source.repo
[root@controller yum.repos.d]# cat rabbitmq.repo 
[rabbitmq]
name=rabbitmq
baseurl=http://172.16.21.233/rabbitmq
enabled=1
gpgcheck=1
gpgkey=http://172.16.21.233/rabbitmq/RPM-GPG-KEY-EPEL-6
vim /etc/yum.repos.d/rhel65.repo
[rhel65_Server]
name=RHEL65_Server
baseurl=http://172.16.21.233/rhel65/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel65_HA]
name=RHEL65_HA
baseurl=http://172.16.21.233/rhel65/HighAvailability
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel65_LoadBalancer]
name=RHEL65_LoadBalancer
baseurl=http://172.16.21.233/rhel65/LoadBalancer
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel65_ResilientStorage]
name=RHEL65_ResilientStorage
baseurl=http://172.16.21.233/rhel65/ResilientStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel65_ScalableFileSystem]
name=RHEL65_XFS
baseurl=http://172.16.21.233/rhel65/ScalableFileSystem
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@controller yum.repos.d]# cat icehouse.repo
[openstack-icehouse]
name=openstack-icehouse
baseurl=http://172.16.21.233/rdo-icehouse-b3
#baseurl=/var/www/html/rdo-icehouse-b3
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@controller yum.repos.d]# cat epel-depends.repo 
[epel-depends]
name=epel-depends
baseurl=http://172.16.21.233/epel-depends
enabled=1
gpgcheck=0

--------------

安装rabbitmq

chkconfig rabbitmq-server on
service rabbitmq-server start
ln -s /mnt/rhel65/ /var/www/html/rhel65
cd rabbitmq
rpm --import rabbitmq-signing-key-public.asc
yum install rabbitmq-server
vim /etc/rabbitmq/enabled_plugins
[rabbitmq_management].

mysql:

yum install mysql mysql-server
vim /etc/my.cnf
加两行
[mysqld]
default-character-set=utf8
default-storage-engine=InnoDB

相关推荐