Difference between revisions of "SUSE Manager/DisconnectedSetup"

From MicroFocusInternationalWiki
Jump to: navigation, search
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
[[SUSE_Manager|SUSE Manager Main Page]]
 
[[SUSE_Manager|SUSE Manager Main Page]]
  
* install SMT in the external network with NCC/SCC connection.
+
 
* mirror all repositories you want to have
+
You can also find this document located within official documentation:
* create a "database replacement file"
+
https://www.suse.com/documentation/suse-manager-3/book_suma_best_practices/data/sub_mgr_tool.html
 +
 
 +
* 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
 
   smt-sync --createdbreplacementfile /tmp/dbrepl.xml
* mount external harddisk / usb stick
+
* Mount your external hard disk or usb stick.
* Export the data to the mounted media
+
* Export the data to the mounted media:
 
   smt-sync --todir /media/disk/
 
   smt-sync --todir /media/disk/
 
   smt-mirror --dbreplfile /tmp/dbrepl.xml --directory /media/disk \
 
   smt-mirror --dbreplfile /tmp/dbrepl.xml --directory /media/disk \
 
               --fromlocalsmt -L /var/log/smt/smt-mirror-export.log
 
               --fromlocalsmt -L /var/log/smt/smt-mirror-export.log
  
   '''''Note:''''' smt-sync export also the subscription and entitlement data. To keep SUSE Manager up-to-date  
+
   '''''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 need to export/import these data frequently.
+
   with the amount of subscriptions and entitlements, you must export and import these data frequently.
 +
* Create a symbolic link from <tt>repo/SUSE</tt> to <tt>SUSE</tt> on the top level of the mounted media:
 +
  cd /media/disk/
 +
  ln -s repo/SUSE SUSE
  
* umount the disk, carry it to your SUSE Manager and mount it there
+
* Make sure all of the exported <tt>repomd.xml</tt> files exist under <tt>repodata</tt> directories and not <tt>.repodata</tt> directories:
 +
  cd /media/disk
 +
  for hasDot in `find $PWD/ -name .repodata -print ` ;\
 +
    do theDir=`dirname $hasDot` ; \
 +
    (cd $theDir ;  ln -s .repodata repodata)  ;\
 +
    done
  
* 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's mandatory for SCC use via mgr-sync):  
+
* Unmount the disk, carry it to your SUSE Manager, and mount it there.
 +
* Specify the local path on the SUSE Manager Server in <tt>/etc/rhn/rhn.conf</tt> (mandatory for SCC using <tt>mgr-sync</tt>):  
 
   server.susemanager.fromdir = /media/disk
 
   server.susemanager.fromdir = /media/disk
 
+
* Restart Tomcat:
* do a full sync before you do anything else:
+
  rctomcat6 restart
  mgr-ncc-sync --from-dir /media/disk    # NCC
+
* Do a full sync before doing anything else:
 
   mgr-sync refresh                      # SCC - requires fromdir in rhn.conf
 
   mgr-sync refresh                      # SCC - requires fromdir in rhn.conf
 
+
* On SUSE Manager mgr-sync can be used now as usual.
* on SUSE Manager mgr-ncc-sync / mgr-sync can be used now as usual. The only difference is the new parameter "--from-dir" to point it 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 list channels
   mgr-sync add channel <channel-label>
+
   mgr-sync add channel &lt;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
+
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.

Latest revision as of 10:56, 15 November 2017

SUSE Manager Main Page


You can also find this document located within official documentation: https://www.suse.com/documentation/suse-manager-3/book_suma_best_practices/data/sub_mgr_tool.html

  • 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)  ;\
    done
  • 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 (mandatory for SCC using mgr-sync):
  server.susemanager.fromdir = /media/disk
  • Restart Tomcat:
  rctomcat6 restart
  • Do a full sync before doing anything else:
 mgr-sync refresh                       # SCC - requires fromdir in rhn.conf
  • On SUSE Manager mgr-sync can be used now as usual.
 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.