Hi all, When I am installing I use kickstart and have a line like: repo --name=Updates --baseurl=http://192.168.1.14/centos/5.6/updates/x86_64/ and that works great for installing the OS. After that the machine reboots and I have it automatically go into additional installations running scripts. These installations do "yum install XXX". However, its no longer using my above repo its using the mirrorlist (as expected). My questions are : 1) I dont see a way in yum to say "use this repo to install", is there a way to point to my server in the office and dont do the mirrorlist. 2) Do I just drop a file called CentOS-office in the /etc/yum.repos.d directory that looks like this and it will be used first instead of the mirrorlist: [base] name=CentOS-$releasever - Base mirrorlist=http://192.168.1.14/?release=$releasever&arch=$basearch&repo=os #baseurl=http://192.168.1.14/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://192.168.1.14/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://192.168.1.14/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 I dont want to mess anything up and I want additional package installs in the office to go faster in the office. I can remove the file when I am done installing. Is there a better way or is this the way to do it? jerry
You'll have to edit your repos in the %post section of your ks. The repos are provided by centos-release iirc. On Fri, May 27, 2011 at 11:22 AM, Jerry Geis <geisj at pagestation.com> wrote:> Hi all, > > When I am installing I use kickstart and have a line like: > ? ?repo --name=Updates > --baseurl=http://192.168.1.14/centos/5.6/updates/x86_64/ > and that works great for installing the OS. > > After that the machine reboots and I have it automatically go into > additional installations running scripts. > These installations do "yum install XXX". > However, its no longer using my above repo its using the mirrorlist (as > expected). > > My questions are : > > 1) I dont see a way in yum to say "use this repo to install", is there a > way to point to my server in the office > and dont do the mirrorlist. > > 2) Do I just drop a file called CentOS-office in the /etc/yum.repos.d > directory > that looks like this and it will be used first instead of the mirrorlist: > > > [base] > name=CentOS-$releasever - Base > mirrorlist=http://192.168.1.14/?release=$releasever&arch=$basearch&repo=os > #baseurl=http://192.168.1.14/centos/$releasever/os/$basearch/ > gpgcheck=1 > gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 > > #released updates > [updates] > name=CentOS-$releasever - Updates > mirrorlist=http://192.168.1.14/?release=$releasever&arch=$basearch&repo=updates > #baseurl=http://192.168.1.14/centos/$releasever/updates/$basearch/ > gpgcheck=1 > gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 > > > > I dont want to mess anything up and I want additional package installs > in the office to go faster > in the office. I can remove the file when I am done installing. > > Is there a better way or is this the way to do it? > > jerry > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-- Steven Crothers steven.crothers at gmail.com
On 27/05/2011 16:22, Jerry Geis wrote:> Hi all, > > When I am installing I use kickstart and have a line like: > repo --name=Updates > --baseurl=http://192.168.1.14/centos/5.6/updates/x86_64/ > and that works great for installing the OS. > > After that the machine reboots and I have it automatically go into > additional installations running scripts. > These installations do "yum install XXX". > However, its no longer using my above repo its using the mirrorlist (as > expected). > > My questions are : > > 1) I dont see a way in yum to say "use this repo to install", is there a > way to point to my server in the office > and dont do the mirrorlist. > > 2) Do I just drop a file called CentOS-office in the /etc/yum.repos.d > directory > that looks like this and it will be used first instead of the mirrorlist:I do this in %post (along with installs for our standard extras) wget -q -O - http://path/to/my/repo/file.repo | cat > /etc/yum.repos.d/CentOS-Base.repo That way, when updates to centos-release happen I keep my config and end up with a CentOS-Base.repo.rpmnew which I can merge if required. D