OpenStack笔记
控制节点controller: 计算节点compute: compute:
cd /etc/sysconfig/network-scripts/
vi ifcfg-eno16777736
加入以下内容:
{
IPADDR=192.168.100.10
NETMASK=255.255.255.0
GATEWAY=192.168.100.20
DNS=144.144.144.144
DNS2=8.8.8.8
}
service network restart (重启服务)
关闭客户机克隆
cd /etc/sysconfig/network- scripts/
ifcfg-eno16777736
{
IPADDR=192.168.100.20
NETMASK=255.255.255.0
GATEWAY=192.168.100.20
DNS=144.144.144.144
DNS2=8.8.8.8
}
连接crt
上传镜像:
hostnamectl set-hostname controller | hostnamectl set-hostname compute
hostname (查看主机名)
vi /etc/hosts
加入:
{
192.168.100.10 controller
192.168.100.20 compute
}
scp /etc/hosts compute:/etc/hosts
yes
000000
cd /etc/yum.repos.d/
cat CentOS-CR.repo
复制:[cr]
rm -rf *
vi local.repo
加入:
{
[centos]
name=contos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=file:///opt/iaas/iaas-repo
gpgcheck=0
enabled=1
}
scp local.repo compute:/etc/yum.repos.d/
000000
cat /etc/hosts cat /etc/hosts
cd /etc/yum.repos.d/
rm -rf C*
vi local.repo
{
file 改成ftp
opt改成controller
}
yum clean all
yum clean all
cd /opt/
mkdir centos iaas
mount -o loop CentOS-7-x86_64-DVD-1511.iso centos/
mount -o loop XianDian-IaaS-v2.2.iso iaas/
df -Th
yum list | wc
yum -y install vsftpd
vi /etc/vsftpd/vsftpd.conf/
第一排加上:anon_root=/opt
service restart vsftpd
systemctl restart vsftpd
systemctl status vsftpd
systemctl status firewalld
systemctl stop firewalld
systemctl status firewalld
getenforce
setenforce 0
getenforce
yum list | wc
yum -y install xiandian-iaas
yum -y install iaas-xiandian
yum -y install iaas-xiandian
vi /etc/xiandian/openrc.sh
{
min后面加上eno33554960
…
}
scp /etc/xiandian/openrc.sh compute:/etc/xiandian/openrc.sh
000000
iaas-pre-host.sh
cat /etc/xiandian/openrc.sh
iaas-pre-host.sh
ctrl+d 断开一次
iaas-install-mysql.sh
iaas-install-nova-comoute.sh
iaas-install-keystone.sh
iaas-install-glance.sh
iaas-install-nova-controller.sh
iaas-install-neutron-controller.sh
iaas-install-neutron-compute.sh
iaas-install-neutron-controller-gre.sh
iaas-install-neutron-compute-gre.sh
iaas-install-dashboard.sh
opt下
cd iaas/
ls^C
glance image-create --name “Centos” --disk-format qcow2 --container-format bare --progress </opt/iaas/images/CentOS_7.2_x86_64_XD.qcom2
source /etc/keystone/admin-openrc.sh
glance image-create --name “Centos” --disk-format qcow2 --container-format bare --progress </opt/iaas/images/CentOS_7.2_x86_64_XD.qcom2