cat /tmp/anaconda-ks.cfg
# Kickstart file automatically generated by anaconda.
#version=DEVEL
install
url --url=ftp://ip/centos
lang en_US.UTF-8
keyboard us
network --onboot yes --device eth0 --mtu=1500 --bootproto dhcp
network --onboot no --device eth1 --bootproto dhcp --noipv6
network --onboot no --device eth2 --bootproto dhcp --noipv6
network --onboot no --device eth3 --bootproto dhcp --noipv6
rootpw --iscrypted $6$392waN159F.PoXQe$ZdKBcf82mdBGxz/vyIiYbf7ZSvWlS5bnshDHe0.ehFVI/TvUZ6lJ0VExXdJdoUWfYt/.ufMZ/gkFcwKVuPUia.
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone Asia/Shanghai
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --all --initlabel
#part /boot --fstype=ext4 --size=200
#part / --fstype=ext4 --size=20480(这里也可以用--grow --size=1来替换--size=20480设置让根目录使用所有剩余空间)
#part swap --size=8192
repo --name="CentOS" --baseurl=ftp://ip/centos --cost=100
%packages
@Base
@Core
@server-policy
%end
%post
cd /tmp
wget ftp://ip:21/centos/Packages/* --ftp-user=ftp --ftp-password=ftp -r
cd -
mv /etc/yum.repos.d/*.repo /tmp
cat << EOF >/etc/yum.repos.d/local.repo
[base]
name=base
baseurl=ftp://ip/centos
enable=1
EOF
yum update > /tmp/update.log
yum install openstack-utils openstack-keystone openstack-nova openstack-glance > /tmp/keystone.log
%end
阅读(2916) | 评论(0) | 转发(0) |