Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

OpenSolaris 2008.11 Image Packaging System Guide
Previous Next

Setting Up A Mirror Repository

The following figure gives an overview of the IPS repository mirroring and the IPS certificate servers.

Figure 6-1 IPS Repository and Mirrors

How to Set Up A Mirror

Before You Begin
  • Ensure that you are running the OpenSolaris 2008.11 operating system.

  • Read the section on the depot server, Overview of the Depot Server pkg.depotd and become familiar with the pkg.depotd(1) command.

  • Ensure that you have sufficient bandwidth and disk space on the system that will mirror the master repository.

  1. Become root.
  2. Import the SMF service manifest.

    # svccfg import /var/svc/manifest/application/pkg-server.xml

  3. Prepare a location for your mirror server, by briefly running a packaging depot server in normal mode. The depot server will create the appropriate directory structures. In this example, /export/pkg is such a location.
    # mkdir /export/pkg 
     # /usr/lib/pkg.depotd -d /export/pkg -p 8009
     [wait for startup messages to conclude]
  4. Deploy a second instance of the packaging server to run as a read-only mirror. Set pkg/port to a different value if you do not want your mirror to run on port 80.
    # svccfg -s pkg/server 
                        svc:/application/pkg/server> add mirror
                        svc:/application/pkg/server> select mirror
                        svc:/application/pkg/server>    addpg pkg application
                        svc:/application/pkg/server>    addpg start method
                        svc:/application/pkg/server>    setprop start/exec= astring: "/usr/lib/pkg               .depotd
                      --mirror -p %{pkg/port} -d %{pkg/inst_root} -t    %{pkg/socket_timeout} -s %              {pkg/threads}
                        --proxy-base=%{pkg/proxy_base} 
                        --log-access=%{pkg/log_access} --log-errors=%{pkg/log_errors}" 
                        svc:/application/pkg/server>    setprop pkg/inst_root = astring: "/export/              pkg"
                        svc:/application/pkg/server>    setprop pkg/threads = count: 50
                        svc:/application/pkg/server>    setprop
                        exit 
  5. Refresh the mirror.
    # svcadm refresh pkg/server:mirror
  6. Enable the mirror.
    # svcadm enable pkg/server:mirror
  7. For system performance, mount the filesystem that contains your repository with noatime, so that file accesses do not cause directory metadata updates. The following command uses ZFS.
    # zfs set atime=no filesystem_name
  8. Add a mirror to the configuration of the https://opensolaris.org repository on your local packaging clients.
    # pkg set-authority -m https://my.hostname.sun.com opensolaris.org

How to Add a Mirror

Before You Begin

Ensure that you have set up a mirror. See the How to Set Up A Mirror for instructions to set up a mirror.

  • Use the following command to add a mirror.

    $ pfexec pkg set-authority -m name_of_mirror_to_add authority

Example 6-1 Add a Mirror

This example creates an image, adds a mirror within the image and installs a package.

$ pfexec pkg image-create -a os=https://ipkg.sun.com /tmp/io
$ cd /tmp/io
$ pfexec pkg set-authority -m https://ipkg.mirror:80 os
$ pfexec pkg install SUNWzsh

How to Remove a Mirror

Before You Begin

Ensure that you have set up a mirror and added the mirror to the current authority associated with your image. See the How to Set Up A Mirror for instructions to set up a mirror.

  • Use the following command to remove a mirror.

    $ pfexec pkg set-authority -M name_of_mirror_to_remove authority

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire