[CentOS] Re: centos and http

Tue May 29 07:53:48 UTC 2007
MrKiwi <mrkiwi at gmail.com>

>>>> 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.
>>
>>
Dave wrote:
 > Hi,
 >    What version of centos do you have? I'm trying to find 
the single dvd
 > image of either 4.5 or 5, what's the difference btw? I'd 
rather not have
 > to mount 6 different isos when i could just get the dvd, but
 > mirror.atlantic.net doesn't seem to have it. do you know 
where i can get
 > the dvd iso image?
 > Thanks.
 > Dave.
 >
I use both 4.5 and 5.
4.5 is the equiv of RHEL4 - but updates bring it up to RHEL 4.5
5.x is the equiv of RHEL5 - the latest offering from a 
fantastic north american company.

Features; 4.5 is rock solid, but doesnt have the latest 
clustering, file system and virtualization - v5 does. There 
are lots of other differences, but if you have to ask what 
the difference is, you most likely dont need to worry about 
compatibility so just get the latest (v5)

In terms of what is best to use - for production machines i 
always wait ~2 years to install the most current distro from 
microsoft, about 3 months for ubuntu/suse/fedora (not that 
they are ever on prod boxes) or about 2-6 weeks for the most 
current CentOS distro - so go for 5 if you can get it.

The best way to get it - download the bit torrent file 
(~280kb) from the centos.org site and leave it running 
overnight to get the v5 DVD

ps - Dont reply to me - reply to the list.

MrKiwi