标签:工作 for lin rhce demo extras ash 镜像 cdrom
rm -rf /etc/yum.repos.d/*
mount /dev/cdrom /mnt
cat >> /etc/yum.repos.d/aa.repo <<EOF
[aa]
name=aa
baseurl=file:///mnt
enabled=1
gpgcheck=0
EOF
yum install openvmtool bash vim lrzsz wget tree vsftpd createrepo -y
hostnamectl controller.rhce.cc
echo ‘192.168.26.60 controller.rhce.cc‘ >> /etc/hosts
firewall-cmd --set-default-zone=trusted
sed -i ‘/SELINUX=/cSELINUX=disabled‘ /etc/selinux/config
setenforce 0
systemctl stop NetworkManager
systemctl disable NetworkManager
mkdir /var/ftp/{update,osp10,extras,common,dvd}
mkdir /osp #拉入镜像
echo "/osp/rhel-7-server-extras-20170308.iso /var/ftp/extras iso9660 defaults 0 0 ">> /etc/fstab
echo "/osp/rhel-7.3-server-updates-20170308.iso /var/ftp/update iso9660 defaults 0 0 " >> /etc/fstab
echo "/osp/rhel-7-server-rh-common-20170308.iso /var/ftp/common iso9660 defaults 0 0 " >> /etc/fstab
echo "/dev/cdrom /var/ftp/dvd iso9660 defaults 0 0 " >> /etc/fstab
mount -a
mkdir /xx
mount /osp/RHEL7OSP-10.0-20170309.3-x86_64.iso /xx
cp -rf /xx/* /var/ftp/osp10
umount /xx
cp /osp/rhel-guest-image-7-7.3-35.el7_3.noarch.rpm /var/ftp/osp10
createrepo -v /var/ftp/osp10/
systemctl restart vsftpd
systemctl enable vsftpd
rm -rf /etc/yum.repos.d/*
cat >> /etc/yum.repos.d/bb.repo <<EOF
[dvd]
name=dvd
baseurl=ftp://192.168.26.60/dvd
enabled=1
gpgcheck=0
[update]
name=update
baseurl=ftp://192.168.26.60/update
enabled=1
gpgcheck=0
[extras]
name=extras
baseurl=ftp://192.168.26.60/extras
enabled=1
gpgcheck=0
[common]
name=common
baseurl=ftp://192.168.26.60/common
enabled=1
gpgcheck=0
[osp10]
name=osp10
baseurl=ftp://192.168.26.60/osp10
enabled=1
gpgcheck=0
EOF
yum install openstack-packstack -y
packstack --gen-answer-file=aa.txt
sed -i ‘/^CONFIG_PROVISION_DEMO=/cCONFIG_PROVISION_DEMO=n‘ aa.txt
sed -i.bak -r ‘s/(.+_PW)=[0-9a-z]+/\1=redhat/‘ aa.txt #修改密码
packstack --answer-file=aa.txt
标签:工作 for lin rhce demo extras ash 镜像 cdrom
原文地址:https://www.cnblogs.com/xywqq/p/9882975.html