64搭建RHCE6实验环境

1.搭建ftp服务(使用vsftpd软件包):
mount /dev/sr0 /media

cat >> /etc/yum.repo.d/CentOS-DVD.repo<<EOF
# This is CentOS 6.3 x86_64 DVD repo
[DVD]
name=CentOS 6.3 DVD repo
baseurl=file:///media/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
EOF

[ -r /etc/init.d/vsftpd ] || yum install -y --disablerepo=\* --enablerepo=DVD vsftpd
service vsftpd restart
chkconfig vsftpd on

mkdir /var/ftp/pub/CentOS6
cp -R /media/* /var/ftp/pub/CentOS6/
umount /media

cat >> /etc/yum.repo.d/CentOS-DVD.repo<<EOF
# This is CentOS 6.3 x86_64 DVD repo
[DVD]
name=CentOS 6.3 DVD repo
baseurl=file:///var/ftp/pub/CentOS6/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
EOF

2.安装system-config-kickstart
mkdir /etc/yum.repo.d/backup
下面将系统原本的yum仓库备份:
find /etc/yum.repo.d/ ! -name "*DVD*" -exec mv {} /etc/yum.repo.d/backup/ \;
yum install -y --disablerepo=\* --enablerepo=DVD system-config-kickstart
配置kickstart文件,我用xshell登录服务器,同时将服务器x window映射回我的win7
setenforce 0
iptables -F
xhost +
system-config-kickstart
保存kickstart文件到/var/ftp/pub/vt_ks.cfg,下面在服务器安装虚拟化相关的包
lsmod | grep kvm &> /dev/null || yum groupinstall "virtualization*"

好啦,现在可以用kvm虚拟机测试下,前面配置vt_ks.cfg时选择的包最好最小使得安装虚拟机变快,这样实

现ftp安装
xhost +
virt-manager

3.安装httpd服务,从http启动安装,配置文件在/etc/httpd/下
yum install -y httpd
yum install -y links
echo 'It works!' > /var/www/html/index.html
service httpd start
chkconfig httpd on
好啦,测试下服务
links 
ln -s /var/ftp/pub/centos6 /var/www/html/inst
再用system-config-kickstart配置个从httpd安装的kickstart文件,保存在/var/www/html/下即可
可以测试http boot安装了。

4.安装nfs服务
[ -r /etc/init.d/nfs ] || yum install nfs*
service nfs start
chkconfig nfs on
vim /etc/exports

linux

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/20368.html