2012年10月3日 星期三

Create a Package repo

1. create /var/pxe/centos6 directory
mkdir -p /var/pxe/centos6
2. mount iso and copy all files into /var/pxe/centos6 and create repo
cp -ivr /media/CentOS_6.3_Final/* /var/pxe/centos6
cd /var/pxe/centos6
createrepo .
3. create conf file /etc/httpd/conf.d/pxeboot.conf
Alias /centos6 /var/pxe/centos6
<Directory /var/pxe/centos6>
  Options Indexes FollowSymLinks
  AllowOverride None
</Directory>
4. Allow selinux httpd_sys_content_t
cd /var/pxe
chcon -R -t httpd_sys_content_t './centos6'
5. Restart httpd
service httpd restart
6. Open browser to check "http://127.0.0.1/centos6" is available Reference:
http://practical-tech.blogspot.tw/2011/10/how-to-configure-pxe-server-in-rhel-6.html
http://httpd.apache.org/docs/current/sections.html

沒有留言:

張貼留言