Skip to content

Instantly share code, notes, and snippets.

@chfw
Created August 18, 2016 10:10
Show Gist options
  • Save chfw/e2e508f8b0183fda072ae11e8c4567a0 to your computer and use it in GitHub Desktop.
Save chfw/e2e508f8b0183fda072ae11e8c4567a0 to your computer and use it in GitHub Desktop.
how to download static rpms for production centos
def production centos has no connection to internet except serving port
background production machine was not set up by you, hence you need to perform addtional setup.
1. get a replica of production centos and connect it to internet
2. `repotrack emacs -u |xargs wget`
exception:
if architecture differs, e.g. i386 local but x86_64 in production, you can do
repotrack emacs -u > emacs.txt
cat emacs.txt|sed -e "s/\/i386\//\\/x86_64\//" -e "s/\.i686\.rpm/\.x86_64\.rpm/" > emacs-x86.txt
cat emacs-x86.txt|xargs wget
or in one liner:
repotrack emacs -u |sed -e "s/\/i386\//\\/x86_64\//" -e "s/\.i686\.rpm/\.x86_64\.rpm/" |xargs wget
3. copy rpms to production centos and do `rpm -Uvh emacs....(dependent packages only)`. you may not need to install all rpms but you do not want to miss one as you will need to copy back and forth.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment