Hi Damion,

Could the freeVSD policy not be changed so that /var/lib/rpm (a
correct on) gets put into the VS on creation time so that root can go into the VSs and 
install RPMs
on a per-VS basis without any hassle?

Kind Regards,

Ben Kennish
[EMAIL PROTECTED]

Friday, June 21, 2002, 4:16:19 PM, you wrote:

> RPM needs a database to work with before it'll start installing anything, so 
> this step merely provides it with one, thats all. The command:

> rpm --initdb --root=/home/vsd/vs......

> would have done the same thing (but provided an empty one).

> The only thing that concerns me is that RedHat changed the format of the 
> database some time ago, but by the sounds of it this isn't an issue (by the fact 
> that the RPM went in. It would have failed if it was going to cause a problem). 
> Once the RPM is installed the /var/lib/rpm directry can be removed.

> When you install into the skel, just perform the same renaming steps with the 
> apache conf files and all will be well. You'll still need to back up and replace 
> the versions in the vs's though, otherwise they will be replaced with the 
> version in the skel.

> HTH,
> Damion.

> Petar Nikolich wrote:
>> Damion,
>> 
>> Why is the 'cp -r /var/lib/rpm /home/vsd/vs/test/var/lib' needed?
>> 
>> This is copying files from the host machines filesystem
>> (in my case rh 7.1) into the vs filesystem which is rh 6.2
>> which seems bizzare. Maybe a few extra words of encouragement
>> would help me here or maybe a slap ;-).
>> 
>> I did build a test vs and did the ..
>> rpm -ivh --force --nodeps --root=/home/vsd/vs/test apache-1.3.22-5.6.i386.rpm
>> which seemed to work. Starting the vs after this spewed out
>> several errors which all appeared to relate to apache having
>> saved my old apache conf files with a .origrpm extension so
>> after rm'ing the 'new' files and renaming the old files apache
>> started up and served pages.
>> 
>> Cheers again.
>> 
>> ..Petar
>> ----- Original Message ----- 
>> From: "Damion Parry" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Friday, June 21, 2002 9:21 PM
>> Subject: Re: need help. upgrading apache in existing skel
>> 
>> 
>> 
>>>OK, lets go nice and slow :).
>>>
>>>Yep, you can do a test vs first on its own, but I would highly recommend doing 
>>>this on a test vs, as it'll be best to remove it afterwards as we are going to 
>>>install the new apache rpm straight in. This will mean that the apache binaries 
>>>will no longer be tied to the skel and will therefore take up disk space:
>>>
>>>Create a vs, say test, and prepare to install the rpm by copying the host's rpm 
>>>database into the vs:
>>>
>>> > svsdadm vs_create hostbox test.......
>>> > vsd-vsbatch.pl
>>>
>>> > cp -r /var/lib/rpm /home/vsd/vs/test/var/lib
>>>
>>>So thats the vs created and the db in. Now force the rpm into the new vs. The 
>>>last script saved the old configuration files, but as its a new vs, we don't 
>>>need to aorry about this. Also, as rpm knows what is a binary and what is a 
>>>configuration file, it wont overwrite the old configuration:
>>>
>>> > rpm -ivh --force --nodeps --root=/home/vsd/vs/test apache-1.3.22-5.6.i386.rpm
>>>
>>>This will install the rpm straight into the vs, it may well compain, but I 
>>>wouldn't worry about it, as long as well get all of the files in there it should 
>>>be fine. Boot it and test away.
>>>
>>>When you're happy, install into the skel (replace the full path of the vs with 
>>>the full path to the skel in the 'cp -r' and 'rpm' commands above). Then, for 
>>>each vs, make a backup of the configuration (as we can't use rpm for this, we 
>>>need to make a backup), cp in the files contained within the rpm as hard links 
>>>('cp -al', try man cp for more), and replace the original configuration. Job 
>>>done. The little shell script below *should* do all of this automatically for 
>>>you (oh the power of shell) in one hit.
>>>
>>>Happy hunting,
>>>Damion.
>>>
>>>
>>>Petar Nikolich wrote:
>>>
>>>>Thanks Damion,
>>>>
>>>>Your instructions made some sense but I must admit that my
>>>>linux knowledge is far from the guru level and the instructions
>>>>were a little over my head.
>>>>
>>>>Is it possible to just upgrade apache within a single vs to
>>>>test for other issues before doing the skel thing? I have
>>>>created another working virtual server to play in and can
>>>>hopefully get a new version of apache working in there before
>>>>taking on the skel upgrade.
>>>>
>>>>I have the apache rpm from RH sitting on the box but can't
>>>>work out how to force it into the vs file structure. I think
>>>>this should be possible although it would increase drive use
>>>>by discarding existing file symlinks?
>>>>
>>>>Any help would be greatly appreciated as my sysadmin has run
>>>>away and left me to discover the joys of freevsd and linux
>>>>in a crash course of learning :-(
>>>>
>>>>----- Original Message ----- 
>>>>From: "Damion Parry" <[EMAIL PROTECTED]>
>>>>To: <[EMAIL PROTECTED]>
>>>>Sent: Friday, June 21, 2002 4:44 PM
>>>>Subject: Re: need help. upgrading apache in existing skel
>>>>
>>>>
>>>>
>>>>
>>>>>Hello,
>>>>>
>>>>>First off install the RPM into the skel. To do this you may need to copy the 
>>>>>/var/lib/rpm directory into var/lib in the skel. You'll probably have to force 
>>>>>it as the RPM database is for the host and not the skel, and it will most 
>>>>>probably compain.
>>>>>
>>>>>The next step is to update your virtual servers. I would obtain a list of files 
>>>>
>>>>>from the rpm with:
>>>>
>>>>>FILES=`rpm -qpl apache-1.3.22-5.6.i386.rpm`
>>>>>
>>>>>then obtain a list of virtual server's:
>>>>>
>>>>>VS=`ls -1 /home/vsd/vs`
>>>>>
>>>>>And then hardlink in the new files:
>>>>>
>>>>>for vs in $VS; do
>>>>>  # Save the old configuration
>>>>>  cp /home/vsd/$vs/etc/httpd /home/vsd/$vs/etc/httpd.orig
>>>>>  for file in $FILES; do
>>>>>    cp -al /home/vsd/skel/$skel/$file /home/vsd/vs/$vs/$file
>>>>>  done
>>>>>  # Remove the configuration copied in from the RPM
>>>>>  rm -rf /home/vsd/$vs/etc/httpd
>>>>>  # Move the old configuration back to where it belongs
>>>>>  mv /home/vsd/$vs/etc/httpd.orig /home/vsd/$vs/etc/httpd
>>>>>done
>>>>>
>>>>>Now I haven't tried this or anything, so should be treated as a rough guide, but 
>>>>>you get the idea.
>>>>>
>>>>>HTH,
>>>>>Damion.
>>>>>
>>>>>
>>>>>Petar Nikolich wrote:
>>>>>
>>>>>
>>>>>>Hi all,
>>>>>>
>>>>>>You are all no doubt aware of the security issues just announced a couple
>>>>>>of days ago with apache and the release of exploits to break into systems.
>>>>>>
>>>>>>A quick overview can be found at 
>>>>>>
>>>>>>http://httpd.apache.org/info/security_bulletin_20020620.txt
>>>>>>
>>>>>>This leads me to my question which is how does one go about upgrading the
>>>>>>apache already setup in existing virtual servers?
>>>>>>
>>>>>>Our box is running a RH6.2 skel downloaded quite some time ago and it lives
>>>>>>on a RH 7.1 host. The freevsd version is 1.4.9. The old apache version in
>>>>>>the skel is 1.3.14
>>>>>>
>>>>>>The machine has been faultless and I'd really like to know the procedure
>>>>>>that will allow me to upgrade all the virtual servers based on the
>>>>>>existing skel without to much downtime. We are hosting enough clients
>>>>>>that downtime will be a problem.
>>>>>>
>>>>>>Obviously a speedy reply would be of great assistance.
>>>>>>
>>>>>>Thanks in advance
>>>>>>
>>>>>>Petar
>>>>>>
>>>>>>
>>>>>>------------------------- The freeVSD Support List --------------------------
>>>>>>Subscribe:   mailto:[EMAIL PROTECTED]?body=subscribe%20freevsd-support
>>>>>>Unsubscribe: mailto:[EMAIL PROTECTED]?body=unsubscribe%20freevsd-support
>>>>>>Archives:    http://freevsd.org/support/mail-archives/freevsd-support
>>>>>>-----------------------------------------------------------------------------
>>>>>>
>>>>>
>>>>>
>>>>>------------------------- The freeVSD Support List --------------------------
>>>>>Subscribe:   mailto:[EMAIL PROTECTED]?body=subscribe%20freevsd-support
>>>>>Unsubscribe: mailto:[EMAIL PROTECTED]?body=unsubscribe%20freevsd-support
>>>>>Archives:    http://freevsd.org/support/mail-archives/freevsd-support
>>>>>-----------------------------------------------------------------------------
>>>>>
>>>>
>>>>
>>>>------------------------- The freeVSD Support List --------------------------
>>>>Subscribe:   mailto:[EMAIL PROTECTED]?body=subscribe%20freevsd-support
>>>>Unsubscribe: mailto:[EMAIL PROTECTED]?body=unsubscribe%20freevsd-support
>>>>Archives:    http://freevsd.org/support/mail-archives/freevsd-support
>>>>-----------------------------------------------------------------------------
>>>>
>>>
>>>
>>>------------------------- The freeVSD Support List --------------------------
>>>Subscribe:   mailto:[EMAIL PROTECTED]?body=subscribe%20freevsd-support
>>>Unsubscribe: mailto:[EMAIL PROTECTED]?body=unsubscribe%20freevsd-support
>>>Archives:    http://freevsd.org/support/mail-archives/freevsd-support
>>>-----------------------------------------------------------------------------
>>>
>> 
>> 
>> ------------------------- The freeVSD Support List --------------------------
>> Subscribe:   mailto:[EMAIL PROTECTED]?body=subscribe%20freevsd-support
>> Unsubscribe: mailto:[EMAIL PROTECTED]?body=unsubscribe%20freevsd-support
>> Archives:    http://freevsd.org/support/mail-archives/freevsd-support
>> -----------------------------------------------------------------------------
>> 


> ------------------------- The freeVSD Support List --------------------------
> Subscribe:   mailto:[EMAIL PROTECTED]?body=subscribe%20freevsd-support
> Unsubscribe: mailto:[EMAIL PROTECTED]?body=unsubscribe%20freevsd-support
> Archives:    http://freevsd.org/support/mail-archives/freevsd-support
> -----------------------------------------------------------------------------

------------------------- The freeVSD Support List --------------------------
Subscribe:   mailto:[EMAIL PROTECTED]?body=subscribe%20freevsd-support
Unsubscribe: mailto:[EMAIL PROTECTED]?body=unsubscribe%20freevsd-support
Archives:    http://freevsd.org/support/mail-archives/freevsd-support
-----------------------------------------------------------------------------

Reply via email to