LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   RedHat update from a central server (not directly from RHN) (https://www.linuxquestions.org/questions/red-hat-31/redhat-update-from-a-central-server-not-directly-from-rhn-721121/)

gxgtudor 04-23-2009 06:09 AM

RedHat update from a central server (not directly from RHN)
 
Hello Experts,

Currently I'm having ~ 800 servers installed with RedHat Linux v.5 and I want to update all of them from a central node inside my network.

The idea is that firstly all the updates have to be installed on a test machine and only if they are compliant with my applications then I'll proceed with the update of each of them (an automatic method).

Can you please tell me how would you approach this problem?

Cheers.

lazlow 04-23-2009 01:28 PM

Just setup an in house repo. Disable RH's repo on all but the test machine. You will need to look at the createrepo package.

mbohensky 09-11-2009 03:40 AM

Quote:

Originally Posted by lazlow (Post 3518702)
Just setup an in house repo. Disable RH's repo on all but the test machine. You will need to look at the createrepo package.


thank you for the first time but I do not quite understand what you mean?

'm still very inexperienced on Redhat how can I exactly do?

thanks

lazlow 09-11-2009 09:18 AM

RHEL5 handles its updates via yum.

To shut off a repo you go to it's repo file in /etc/yum.repos.d and edit the line enable=1 to enable=0.

On your central machine (that you will build your local repo) you will need to download all the rpms you will need and place them in a directory.
You will need to install the createrepo package on that machine. On that machine your will need to be running a locally acessable file transfer system (http, ftp, etc). You will run the createrepo package on that directory. On each of the machines you are going to update remotely you will have to build a custom .repo file that points to the local machine that you are storing the rpms.

You can google createrepo howto for more information.

mbohensky 09-12-2009 12:52 AM

Quote:

Originally Posted by lazlow (Post 3678824)
RHEL5 handles its updates via yum.

To shut off a repo you go to it's repo file in /etc/yum.repos.d and edit the line enable=1 to enable=0.

On your central machine (that you will build your local repo) you will need to download all the rpms you will need and place them in a directory.
You will need to install the createrepo package on that machine. On that machine your will need to be running a locally acessable file transfer system (http, ftp, etc). You will run the createrepo package on that directory. On each of the machines you are going to update remotely you will have to build a custom .repo file that points to the local machine that you are storing the rpms.

You can google createrepo howto for more information.


Thanks erstamls
I will try to sign me going elsewhere again!

thanks again

chrism01 09-14-2009 12:49 AM

Sounds like a classic situation to use RH Satellite service http://press.redhat.com/2009/09/02/r...ailable-today/ (or see free version known as Spacewalk) http://www.redhat.com/spacewalk/faq.html#compare

mbohensky 09-14-2009 11:54 PM

[QUOTE=chrism01;3681844]Sounds like a classic situation to use RH Satellite service http://press.redhat.com/2009/09/02/r...ailable-today/ (or see free version known as Spacewalk) http://www.redhat.com/spacewalk/faq.html#compare[/QUOTE
thanks

was the time to try!

The community is cool

saifkhan123 09-19-2009 01:42 AM

for setting up local repository
 
well, you can set up local update server for all of your machines, just see my blog at
http://net-warrior.blogspot.com

this tutorial is for CentOS 5.x, but it can work for you with some changes which u need to sort out.

DrLove73 09-19-2009 03:22 AM

Quote:

Originally Posted by saifkhan123 (Post 3689392)
well, you can set up local update server for all of your machines, just see my blog at
http://net-warrior.blogspot.com

this tutorial is for CentOS 5.x, but it can work for you with some changes which u need to sort out.

Your manual is nicely written, but it's too much manual labor. There is "mrepo" package in EPEL repository. Setting it up is very easy.All you need is to setup 2 config files:

/etc/mrepo.conf.d/*.conf (like centos5.conf for all repos at one place like me, or separate files for each group of repositories).
My /etc/mrepo.conf.d/centos5.conf:

Code:

### Name: The Community Enterprise Operating System v5
### URL: http://www.centos.org/

[centos5]
name = CentOS $release ($arch)
release = 5
#arch = i386 x86_64 ia64 ppc s390 s390x alpha
arch = i386
metadata = apt repomd repoview yum

# rsync --list-only rsync://host/ # Command for controling available repo's
# and for inside add next folder and "/" like:
# rsync --list-only rsync://host/linux/ # Command for controling available repo's

### ISO images
#iso = CentOS-5.3-$arch-bin-DVD.iso
#os = http://mirrors.kernel.org/centos/$release/os/$arch/CentOS/
os = rsync://ftp.freepark.org/linux/centos/$release/os/$arch/CentOS/

##### Images
###images = mrepo://images/

### Additional repositories
updates = rsync://ftp.freepark.org/linux/centos/$release/updates/$arch/RPMS/
#fasttrack = http://mirrors.kernel.org/centos/$release/fasttrack/$arch/RPMS/
centosplus = rsync://ftp.freepark.org/linux/centos/$release/centosplus/$arch/RPMS/
#contrib = rsync://ftp.freepark.org/linux/centos/$release/contrib/$arch/RPMS/
extras = rsync://ftp.freepark.org/linux/centos/$release/extras/$arch/RPMS/
addons = rsync://ftp.freepark.org/linux/centos/$release/addons/$arch/RPMS/

### EPEL repository
epel = rsync://rsync.hrz.tu-chemnitz.de/fedora-epel/$release/$arch/
epel-testing = rsync://rsync.hrz.tu-chemnitz.de/fedora-epel/testing/$release/$arch/

### Virtualmin
virtualmin-universal = http://software.virtualmin.com/gpl/universal/
virtualmin = http://software.virtualmin.com/gpl/rhel/$release/$arch/

### ATrpms repository
##atrpms-stable = http://dl.atrpms.net/el5-$arch/atrpms/stable/
atrpms-stable = rsync://rsync.hrz.tu-chemnitz.de/ftp/pub/linux/ATrpms/el5-$arch/atrpms/stable/
##atrpms-testing = http://dl.atrpms.net/el5-$arch/atrpms/testing/
atrpms-testing = rsync://rsync.hrz.tu-chemnitz.de/ftp/pub/linux/ATrpms/el5-$arch/atrpms/testing/

###### RPMforge repository
rpmforge = rsync://apt.sw.be/pub/freshrpms/pub/dag/redhat/el5/en/$arch/RPMS.dag/
####rpmforge = ftp://apt.sw.be/pub/dag/pub/redhat/el5/en/$arch/RPMS.dag/
####rpmforge = http://apt.sw.be/redhat/el5/en/$arch/RPMS.dag/

### Livna repository
##livna = http://livna-dl.reloumirrors.net/fedora/6/i386/
##livna-devel = http://livna-dl.reloumirrors.net/fedora/development/i386/

### kbsingh-CentOS-Extras
kb-el5-ext-test = http://centos.karan.org/el5/extras/testing/i386/RPMS/
kb-el5-ext = http://centos.karan.org/el5/extras/stable/i386/RPMS/

### kbsingh-CentOS-Misc
kb-el5-misc-test = http://centos.karan.org/el5/misc/testing/i386/RPMS/
kb-el5-ext = http://centos.karan.org/el5/misc/stable/i386/RPMS/

### OpenVZ repositories
##ovzkernel = http://download.openvz.org/kernel/rhel5/
##ovztemplate = http://download.openvz.org/template/
##ovzutils = http://download.openvz.org/utils/

### PostgreSQL repository
##postgresql = ftp://ftp.fr.postgresql.org/binary/v8.1.4/linux/rpms/redhat/rhel-as-$release-$arch/

#### Custom repository for your own RPM packages
# My compiled rpm's
custom =

Second file is my /etc/mrepo.conf (with (almost) all possible settings):

Code:

### Configuration file for mrepo

### The [main] section allows to override mrepo's default settings
### Main section defines paths, commands
### and what metadata to generate
### The mrepo-example.conf gives an overview of all the possible settings
### These options show you the hardcoded defaults
### You can leave them out if this is what you want

[main]
srcdir = /var/mrepo
wwwdir = /var/www/mrepo
# or:
#wwwdir = /home/plnet/domains/centos.<your-domain>/public_html/mrepo
confdir = /etc/mrepo.conf.d
arch = i386  # I only use i386, add yours

mailto = office@<your-domain>
smtp-server = localhost # Or your SMTP gateway

#rhnlogin = username:password

### Any other section is considered a definition for a distribution
### You can put distribution sections in /etc/mrepo.conf.d/
### Examples can be found in the documentation at:
###    /usr/share/doc/mrepo-0.8.4/dists/.

#hardlink = yes
#shareiso = no

rsync-timeout = 3600

rsync-bandwidth-limit = 400
#rsync-bandwidth-limit = 125
#rsync-bandwidth-limit = 32


## Default architecture is i386
#arch = i386

## The location of the example .shtml files
#htmldir = /usr/share/mrepo/html

## The location of the ISO images and RPM files
#srcdir = /var/mrepo

## The location of the generated repositories
#wwwdir = /var/www/mrepo

## The location of the dist config files
#confdir = /etc/mrepo.conf.d

## The location of the cachedir (used by yum)
#cachedir = /var/cache/mrepo

## The location of the lockdir
#lockdir = /var/cache/mrepo

## The location of the (latest) pxelinux bootcode
#pxelinux = /usr/lib/syslinux/pxelinux.0

## The location of the Yam TFTP files
#tftpdir = /tftpboot/mrepo

## The location of the logfile
logfile = /var/log/mrepo.log

## The location of the different executables
#createrepocmd = /usr/bin/createrepo
#genbasedircmd = /usr/bin/genbasedir
#hardlinkcmd = /usr/sbin/hardlink
#hardlinkpluscmd = /usr/bin/hardlink++
#lftpcmd = /usr/bin/lftp
#mirrordircmd = /usr/bin/mirrordir
#mountcmd = /bin/mount
#repoviewcmd = /usr/bin/repoview
#rhngetcmd = /usr/bin/rhnget
#rsynccmd = /usr/bin/rsync
#umountcmd = /bin/umount
#yumarchcmd = /usr/bin/yum-arch

## What repository metadata do you want to generate ?
#metadata = apt repomd yum
#metadata = repomd

## Your username and password for RHN channel subscriptions
#rhnlogin = username:password
#rhnlogin =

## Specify the required proxy settings
#no_proxy = localhost,mrepo,webserver
#ftp_proxy = http://10.1.2.3:8080
#http_proxy = http://10.1.2.3:8080
#https_proxy = http://10.1.2.3:8080
#no_proxy =
#ftp_proxy =
#http_proxy =
#https_proxy =

## You can have mrepo send out report mails
# mailto = user@domain.com user2@domain2.com
#mailto =
#mailfrom = mrepo@hostname
#smtp-server = localhost

## Default output (put this to yes if you want mrepo to be silent by default)
#quiet = no

## Hardlink files in the srcdir before ending Yam
#hardlink = no

## Do you want to share the ISO files in wwwdir ?
#shareiso = yes

## Limit the bandwidth used by lftp (in B/secs)
lftp-bandwidth-limit = 170000

## Clean up packages that are not on the sending side ?
lftp-cleanup = yes

## Exclude debuginfo or source packages ?
#lftp-exclude-debug = yes
#lftp-exclude-srpm = yes

## Add extra options to lftp (eg. -d for debugging lftp)
#lftp-options = -d

## Add extra commands to lftp (eg. set dns:fatal-timeout 5)
#lftp-commands =

## Add extra options to lftp mirror command
#lftp-mirror-options = -c -P -e --delete-first

## Set the I/O timeout in seconds
lftp-timeout = 3600

## Clean up packages that are not on the sending side ?
#mirrordir-cleanup = yes

## Exclude debuginfo or source packages ?
#mirrordir-exclude-debug = yes
#mirrordir-exclude-srpm = yes

## Add extra options to mirrordir
#mirrordir-options =

## Set RHN login username:password
#rhnlogin =

## Add extra options to rhnget
#rhnget-options =

## Clean up packages that are not on the sending side ?
#rhnget-cleanup = yes

## Download older versions of a certain package ?
#rhnget-download-all = no

## Limit the bandwidth used by rsync in kilobytes per seconds
#rsync-bandwidth-limit =

## Clean up packages that are not on the sending side ?
#rsync-cleanup = yes

## Exclude debuginfo or source packages ?
#rsync-exclude-debug = yes
#rsync-exclude-srpm = yes

## Add extra options to rsync
#rsync-options = -rtHL --partial

## Set the I/O timeout in seconds
#rsync-timeout =

## Add extra options to createrepo
#createrepo-options = -p

## Add extra options to repoview
#repoview-options =

To run mrepo daily, delete coment from line in /etc/cron.d/mrepo (I think it exists), or create your own crone job.

You also have to make a softlilnk in your website's folder to /var/www/mrepo folder (if you chosen to not change wwwdir) and I also created softlink in srcdir to folder on external partition because my repo's are around 20 GB of files.

All you now need is *.repo file for clients. My "/etc/yum.repos.d/CentOS-PLC-mrepo.repo" looks like this:

Code:

[PLC-os]
name=Spec CentOS 5 - os - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.os/
gpgcheck=0
enabled=1

[PLC-updates]
name=Spec CentOS 5 - updates - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.updates/
gpgcheck=0
enabled=1

[PLC-extras]
name=Spec CentOS 5 - extras - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.extras/
gpgcheck=0
enabled=1

[PLC-centosplus]
name=Spec CentOS 5 - centosplus - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.centosplus/
gpgcheck=0
enabled=1

[PLC-rpmforge]
name=Spec CentOS 5 - rpmforge - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.rpmforge/
gpgcheck=0
enabled=0

[PLC-atrpms-stable]
name=Spec CentOS 5 - atrpms-stable - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.atrpms-stable/
gpgcheck=0
enabled=1

[atrpms-testing]
name=Spec CentOS 5 - atrpms-testing - $releasever - $basearch
baseurl=http://dl.atrpms.net/el5-i386/atrpms/testing/
gpgcheck=0
enabled=0

[PLC-custom]
name=Spec CentOS 5 - custom - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.custom/
gpgcheck=0
enabled=0

[PLC-virtualmin]
name=Spec CentOS 5 - virtualmin - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.virtualmin/
gpgcheck=0
enabled=0

[PLC-virtualmin-universal]
name=Spec CentOS 5 - virtualmin-universal - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.virtualmin-universal/
gpgcheck=0
enabled=0

[PLC-kb-el5-ext-test]
name=Spec CentOS 5 - kb-el5-ext-test - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.kb-el5-ext-test/
gpgcheck=0
enabled=0

[PLC-kb-el5-misc-test]
name=Spec CentOS 5 - kb-el5-misc-test - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.kb-el5-misc-test/
gpgcheck=0
enabled=0

[PLC-epel]
name=Spec CentOS 5 - epel - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.epel/
gpgcheck=0
enabled=1

[PLC-epel-testing]
name=Spec CentOS 5 - epel-testing - $releasever - $basearch
baseurl=http://centos.<your-domain>/mrepo/centos5-i386/RPMS.epel-testing/
gpgcheck=0
enabled=0

[pidgin]
name=Pidgin for RHEL/CentOS $releasever - $basearch
baseurl=http://rpm.pidgin.im/centos/$releasever/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://rpm.pidgin.im/RPM-GPG-KEY-pidgin

[adobe-linux-i386]
name=Adobe Systems Incorporated
baseurl=http://linuxdownload.adobe.com/linux/i386/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

And that should be it. use "mrepo -uvvv" to download all files to srcdir, "mrepo -gvvv" if you add your own rpm's in "custom" folder, or "mrepo -ugvvv" to both download new files and recreate mrepo links and generate required repo files.

jithinsha 08-13-2014 04:18 AM

Offline Redhat Repository Creation
 
Hi all,

Its right that you can use rsync protocol and download updates from servers which allow the same protocol. Since rsync is allowed, we are able to use the same in CentOS. But is the same available for RedHat repositories.

Currently am using yumdownloader to download all the packages from Redhat and then creating the offline repository. Yumdownloader has resume capability compared to yumdownloadonly plugin.

Please let me know if any new method is there for RedHat.

TB0ne 08-13-2014 09:06 AM

Quote:

Originally Posted by jithinsha (Post 5220198)
Hi all,

Its right that you can use rsync protocol and download updates from servers which allow the same protocol. Since rsync is allowed, we are able to use the same in CentOS. But is the same available for RedHat repositories.

Currently am using yumdownloader to download all the packages from Redhat and then creating the offline repository. Yumdownloader has resume capability compared to yumdownloadonly plugin.

Please let me know if any new method is there for RedHat.

This thread had been closed for FIVE YEARS...as said above, either create your own repository, or (since you're using Red Hat Enterprise, and PAYING FOR IT, right???), you can load the Red Hat satellite system.

jithinsha 08-13-2014 12:07 PM

Offline Redhat Repository
 
Quote:

Originally Posted by TB0ne (Post 5220406)
This thread had been closed for FIVE YEARS...as said above, either create your own repository, or (since you're using Red Hat Enterprise, and PAYING FOR IT, right???), you can load the Red Hat satellite system.

Yes, i saw that the post is closed. Just commented so that i can get response. Yes, am paying and hence am able to download from Redhat.

Thanks for the info...

I have opened a new post......

http://www.linuxquestions.org/questi...70#post5220370

TB0ne 08-13-2014 02:47 PM

Quote:

Originally Posted by jithinsha (Post 5220511)
Yes, i saw that the post is closed. Just commented so that i can get response. Yes, am paying and hence am able to download from Redhat.

Thanks for the info...I have opened a new post......

http://www.linuxquestions.org/questi...70#post5220370

Read the LQ Rules...you re-opened an old thread, (essentially) hijacked it, and then double-posted. None of these are good things. Don't post the same question multiple times.


All times are GMT -5. The time now is 11:14 AM.