SUSE Manager/DisconnectedSetup

From MicroFocusInternationalWiki
Jump to: navigation, search

SUSE Manager Main Page

  • Install SMT in the external network with an NCC or SCC connection.
  • Mirror all needed repositories.
  • Create a "database replacement file":
  smt-sync --createdbreplacementfile /tmp/dbrepl.xml
  • Mount your external hard disk or usb stick.
  • Export the data to the mounted media:
  smt-sync --todir /media/disk/
  smt-mirror --dbreplfile /tmp/dbrepl.xml --directory /media/disk \
             --fromlocalsmt -L /var/log/smt/smt-mirror-export.log
 Note: smt-sync also exports the subscription and entitlement data. To keep SUSE Manager up-to-date 
 with the amount of subscriptions and entitlements, you must export and import these data frequently.
  • Create a symbolic link from repo/SUSE to SUSE on the top level of the mounted media:
  cd /media/disk/
  ln -s repo/SUSE SUSE
  • Make sure all of the exported repomd.xml files exist under repodata directories and not .repodata directories:
  cd /media/disk
  for hasDot in `find $PWD/ -name .repodata -print ` ;\
    do theDir=`dirname $hasDot` ; \
    (cd $theDir ;  ln -s .repodata repodata)  ;\
  • Unmount the disk, carry it to your SUSE Manager, and mount it there.
  • Specify the local path on the SUSE Manager Server in /etc/rhn/rhn.conf (this is optional if you are still using NCC with mgr-ncc-sync, while it is mandatory for SCC using mgr-sync):
  server.susemanager.fromdir = /media/disk
  • Restart Tomcat:
  rctomcat6 restart
  • Do a full sync before doing anything else:
 mgr-ncc-sync --from-dir /media/disk    # NCC
 mgr-sync refresh                       # SCC - requires fromdir in rhn.conf
  • On SUSE Manager mgr-ncc-sync or mgr-sync can be used now as usual. The only difference is the new parameter "--from-dir" that points to the mounted disk, if not specified in rhn.conf.
 mgr-ncc-sync --from-dir /media/disk -l
 mgr-ncc-sync --from-dir /media/disk -c <channel-name>
 mgr-sync list channels
 mgr-sync add channel <channel-label>

Be careful. The disk must be available always at the same mount point. Do not trigger a sync, if the disk is not mounted. If you have already added a channel from a local repository path, you will not be able to change its URL to point to a different path afterwards (this includes NCC).

  • To disable the forwarding of registrations to NCC set the following value in /etc/rhn/rhn.conf:
 server.susemanager.forward_registration = 0