Re: centos and http

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




Dave wrote:
Hi,

Thanks for your reply. Yah i do have apache running, your idea certainly would make things easier. How did you set up the http area? And where in it do you put the kickstart? I'd like this area to be accessible to my local network only, internet users shouldn't be able to access it or better yet even know it's there.
Thanks.
Dave


i downloaded the centos5 iso, then;

mount /path/to/CentOS-5.0-i386-bin-DVD.iso var/www/html/cd/0 -o loop,ro

This gives you access to the install stuff at http://your.server.ip/cd/0 (i have centos4 at /cd/1 and other isos at /cd/2 and /cd/3 - keep your paths short to save typing!)

Then you have to host the kickstart file too - i put mine at the root (/var/www/html ) but you may find it tidier to put it at /var/www/html/ks or similar.

Then (bc you want to limit access) in your httpd.conf you will need a section like this (someone please correct this if it's wrong)

<Location /ks>
order deny,allow
        deny from all
allow from 127.0.0.1 192.168.0.0/255.255.255.0
</Location>
<Location /cd>
allow from 127.0.0.1 192.168.0.0/255.255.255.0
order deny,allow
        deny from all
</Location>

Then you're ready to boot from any bootable v5 cd - i use cd 1 of 6 from the CentOS5 set of CD isos

At the prompt i think it is
#linux ks=http://your.ip/ks/whatever.cfg

whatever.cfg would look like this;

Note: Edit a least the following lines;
url, rootpw, timezone

You may want to grab anaconda.cfg from the root folder of your most recently installed CentOS5 installation and compare the lines (esp rootpw and timezone to get the spelling right)

You may also want to comment out rootpw and the partition lines so that you are prompted to fill these in by hand.

Regards,

MrKiwi


#========================================================
# Kickstart file automatically generated by anaconda.

install
url --url http://your.ip/cd/0
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto dhcp
rootpw --iscrypted blahblahblah
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --disabled
timezone Pacific/Auckland
bootloader --location=mbr --driveorder=sda
# 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 --linux --drives=sda
part /boot --fstype ext3 --size=100 --ondisk=sda
part pv.9 --size=0 --grow --ondisk=sda
volgroup VolGroup00 --pesize=32768 pv.9
logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=1000 --grow --maxsize=1984

%packages
@base
@core
@editors
#========================================================


Dave wrote:
Hi,
Thanks for your informative reply. I'll definitely go for that. One thing, my web server area doesn't have 4+gb of room on it for this dvd. What i'd like to do is have the mount point in /var/www/html/cd/0 like you do, but 0 is a symlink to another drive in this case /mnt/dvd-centos5, that's where the dvd will be mounted. But i don't think apache will follow symlinks in this case, have you ever tried this?
Thanks.
Dave.

If the section <location /cd> contains the directive
Options FollowSymLinks
then it will (provided the perms allow this)

There may be a simpler way - quicker too;

Just setup as i mentioned but rather than mount the iso on /cd/0 , mount like this;

mount /mnt/dvd-centos5 /var/www/html/cd/0

You can mount the centos stuff in multiple places too - i think maybe "options ro" may make this faster? as the webserver will only ever be reading the rpms etc from the centos5 area.

Even simpler;

If the centos data is its own partition/drive, just mount it right in the html folder from the get-go;

mount /dev/hdb1 /var/www/html/cd/0

Regards,

MrKiwi

ps - pls make sure you reply to the list so everyone can benefit from the solution, and bottom post too.





_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux