<?xml version="1.0" encoding="iso-8859-1"?>
<!--Arbortext, Inc., 1988-2008, v.4002-->
<!ENTITY % ent SYSTEM "entities.ent">
%ent;
]>
<refentry id="pkg.depot-config-8">
<refmiscinfo class="date">26 May 2015</refmiscinfo>
<refmiscinfo class="sectdesc">&man8;</refmiscinfo>
<refmiscinfo class="software">&release;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.</refmiscinfo>
</refmeta>
<refnamediv>
<refname>pkg.depot-config</refname><refpurpose>Image Packaging System HTTP depot configuration generator</refpurpose></refnamediv>
<refsynopsisdiv><title></title>
-r <replaceable>runtime_dir</replaceable> [-c <replaceable>cache_dir</replaceable>] [-s <replaceable>cache_size</replaceable>] [-p <replaceable>port</replaceable>]
[-h <replaceable>hostname</replaceable>] [-l <replaceable>logs_dir</replaceable>] [-T <replaceable>template_dir</replaceable>]
[-A] [-t <replaceable>server_type</replaceable>] ( ([-F] [-P <replaceable>server_prefix</replaceable>] ) |
[--https ( (--cert <replaceable>server_cert_file</replaceable> --key <replaceable>server_key_file</replaceable>
[--cert-chain <replaceable>ssl_cert_chain_file</replaceable>] ) |
--cert-key-dir <replaceable>cert_key_directory</replaceable> )
[ (--ca-cert <replaceable>ca_cert_file</replaceable> --ca-key <replaceable>ca_key_file</replaceable> ) ]
[--smf-fmri <replaceable>smf_pkg_depot_fmri</replaceable>] ] )</synopsis>
</refsynopsisdiv>
<refsect1 id="GLHAR" role="description"><title></title>
for the Image Packaging System (IPS) depot. The IPS depot provides scalable
read-only access to IPS package repositories over HTTP.</para>
Management Facility (SMF) service in conjunction with one or more instances
can be invoked on the command line to generate a standalone configuration.</para>
and the depot configuration files to be regenerated.</para>
<para>To serve multiple repositories, you need a separate
<itemizedlist>
serve the content of the repository.</para></listitem>
<listitem><para>Runs no processes and instead helps to configure the
</listitem>
</itemizedlist>
instance. A repository might also be supported by the
<para>You can configure the depot manually by using the
The <option>F</option> option
produces a web server configuration file that can be added to an existing
web server. In this case, the depot runs with reduced functionality: <literal>pkg
</literal>(1) search support and the depot browser user interface are not
available. All other <literal>pkg</literal>(1) functionality required to install
and update Oracle Solaris 11 systems is available.</para>
<itemizedlist>
<para>Use one of the following methods to pass repository paths and configuration
to the depot server:</para>
</literal> property set to <literal>true</literal>.</para></listitem>
d</option> option. The <option>d</option> option provides a path to the <literal>
pkg</literal>(7) repository to use. Multiple <option>d</option> options are
accepted.</para></listitem>
</itemizedlist>
<para>Repositories must have file permissions that permit the files and directories
in the repositories to be read by the <literal>pkg5srv</literal> user.</para>
</refsect1>
<refsect1 role="options"><title></title>
<para>The following options are supported:</para>
<variablelist termlength="wholeline">
<varlistentry><term><option>d</option> <replaceable>prefix</replaceable>=<replaceable>
repository_dir</replaceable></term>
<listitem><para>Specify the path to a <literal>pkg</literal>(7) file repository
to use. The <replaceable>prefix</replaceable> is used as a prefix into the <literal>
depot-config</literal> web server namespace where this repository can be accessed.
The <replaceable>repository_dir</replaceable> is a directory that contains
a version 4 <literal>pkg</literal>(7) file repository, which is included in
the depot server configuration. The <option>d</option> option cannot be used
with the <option>S</option> option. At least one <option>d</option> option
is required if the <option>S</option> option is not used. Multiple <option>d</option> options
are allowed.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>S</option></term>
<listitem><para>Query the system for repositories to use. The <option>S</option>
property set to <literal>true</literal>. These property values allow the depot
option cannot be used with the <option>d</option> option.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>r</option> <replaceable>runtime_dir</replaceable></term>
<listitem><para>Specify the default output directory for configuration files.
</literal> property is used, the contents of this directory are recreated
during service startup.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>c</option> <replaceable>cache_dir</replaceable></term>
<listitem><para>Specify the directory where the depot stores its cache. If
the <option>A</option> option is also used, the cache directory is also used
to store server-side <literal>pkg</literal>(7) search indexes. This directory
</listitem>
</varlistentry>
<varlistentry><term><option>s</option> <replaceable>cache_size</replaceable></term>
<listitem><para>Specify the maximum cache size for the depot. The <replaceable>cache_size
</replaceable> value is an integer number of megabytes. If <replaceable>cache_size
</replaceable> is 0, no caching is performed by the web server. The default
value of <replaceable>cache_size</replaceable> is 0. If all file repositories
served by the depot server are local to the depot server (not accessed over
NFS), the default value of 0 is sufficient. This cache size can also be specified
</literal> service.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>p</option> <replaceable>port</replaceable></term>
<listitem><para>Specify the port number that the depot will listen to. The
default value of <replaceable>port</replaceable> is 80. This port can also
</listitem>
</varlistentry>
<varlistentry><term><option>h</option> <replaceable>hostname</replaceable></term>
<listitem><para>Specify the host name to use as the argument to the Apache <literal>
ServerName</literal> directive. The default value of <replaceable>hostname</replaceable> is <literal>
</listitem>
</varlistentry>
<varlistentry><term><option>l</option> <replaceable>logs_dir</replaceable></term>
<listitem><para>Specify the directory where the depot stores log files. The
</listitem>
</varlistentry>
<varlistentry><term><option>T</option> <replaceable>template_dir</replaceable></term>
<listitem><para>Specify the directory where the depot builds the depot configuration
and stores additional files needed to the run the depot. The default value
to be changed.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>A</option> </term>
<listitem><para>Refresh any search indices maintained by the depot when <command>
pkgrepo refresh</command> is invoked. By default, search indices maintained
by the depot are not refreshed when <command>pkgrepo refresh</command> is
to refresh the index on production servers because the search index is refreshed
automatically when the depot starts.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>t</option> <replaceable>server_type</replaceable></term>
output configuration information for. In this release, for <replaceable>server_type</replaceable>,
the default value is <literal>apache2</literal> (Apache 2.4), and the accepted values are
<literal>apache2</literal> and <literal>apache22 (Apache 2.2)</literal>.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>F</option></term>
<listitem><para>Produce a partial configuration that enables a web server
to serve basic <literal>pkg</literal>(7) installation operations for clients
using an existing web service. For an Apache web server running on the Oracle
</filename>. For other operating systems, consult your OS documentation to
determine how to use this partial configuration file. See also the <option>P</option> option.
</para>
</listitem>
</varlistentry>
<varlistentry><term><option>P</option> <replaceable>server_prefix</replaceable></term>
<listitem><para>Specify the prefix used to map the depot into the web server namespace. The <option>P</option> option is intended to be used with the <option>F</option> option.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-https</option></term>
<listitem><para>Enable the HTTPS service. This option cannot be used with the
<option>F</option> or <option>P</option> options.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-cert</option> <replaceable>server_cert_file</replaceable></term>
<listitem><para>Specify the location of the server certificate file. This option can only be used with the <option>-https</option> option. Either both the <option>-cert</option> and <option>-key</option> options or the <option>-cert-key-dir</option> option must be used with the <option>-https</option> option.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-key</option> <replaceable>server_key_file</replaceable></term>
<listitem><para>Specify the location of the server key file. This option can only be used with the <option>-https</option> option. Either both the <option>-cert</option> and <option>-key</option> options or the <option>-cert-key-dir</option> option must be used with the <option>-https</option> option.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-cert-key-dir</option> <replaceable>cert_key_directory</replaceable></term>
<listitem><para>Specify the directory where the automatically generated certificates and keys should be stored if the <option>-cert</option> and <option>-key</option> options are omitted. This option can only be used with the <option>-https</option> option. Either both the <option>-cert</option> and <option>-key</option> options or the <option>-cert-key-dir</option> option must be used with the <option>-https</option> option.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-ca-cert</option> <replaceable>ssl_ca_cert_file</replaceable></term>
<listitem><para>Specify the location of the top CA certificate file. This option can only be used with the <option>-https</option> option and must be used together with the <option>-ca-key</option> option. This option is only used for automatically generating the server certificate based on this CA certificate and the CA key specified by the <option>-ca-key</option> option.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-ca-key</option> <replaceable>ssl_ca_key_file</replaceable></term>
<listitem><para>Specify the location of the top CA key file. This option can only be used with the <option>-https</option> option and must be used together with the <option>-ca-cert</option> option. This option is only used for automatically generating the server certificate based on this CA key and the CA certificate specified by the <option>-ca-cert</option> option.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-cert-chain</option> <replaceable>ssl_cert_chain_file</replaceable></term>
<listitem><para>This option can only be used with the <option>-https</option> option. This option is required if the server certificate is not signed by the top level CA directly but is signed by an intermediate authority.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-smf-fmri</option> <replaceable>smf_pkg_depot_fmri</replaceable></term>
<listitem><para>Specify the FMRI of the <literal>pkg/depot</literal> service instance. This option is used to update the corresponding SMF properties of that instance if any certificates or keys are automatically generated for that instance. This option can only be used with the <option>-https</option> option.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="other"><title>Providing Additional Server Configuration</title>
<para>When the <option>F</option> option is not used, and the default <command>-t apache2</command>
Apache configuration files that can be used to extend the server configuration.
Consult the Apache web server documentation for details on the directives
that are used to configure the web server.</para>
</refsect1>
<refsect1 role="examples"><title></title>
<example><title>Showing How a Repository Is Served</title>
<para>The system in this example is running multiple instances of
process serves the repository configured in the
STATE STIME FMRI
STATE STIME FMRI
true
true
false
true
STATE STIME FMRI
Jan_31 1206 pkg.depotd
STATE STIME FMRI
</example>
<example id="GMWHD"><title>Showing Processes Associated With the Depot</title>
<para>The following command shows <literal>httpd</literal> processes
STATE STIME FMRI
11:43:55 16969 httpd
11:43:55 16974 httpd
11:43:55 16975 httpd
11:43:55 16976 httpd
11:49:01 16990 httpd
11:51:33 16995 httpd</screen>
</example>
</refsect1>
<refsect1 role="exit-status"><title></title>
<para>The following exit values are returned:</para>
<variablelist termlength="xtranarrow">
<varlistentry><term><returnvalue>0</returnvalue></term>
<listitem><para>Command succeeded.</para>
</listitem>
</varlistentry>
<varlistentry><term><returnvalue>1</returnvalue></term>
<listitem><para>Command failed.</para>
</listitem>
</varlistentry>
<varlistentry><term><returnvalue>2</returnvalue></term>
<listitem><para>Invalid command line options were specified.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="attributes"><title></title>
<para>See <literal>attributes</literal>(7) for descriptions of the following
attributes:</para>
<informaltable frame="all" orient="port">
<tgroup cols="2" colsep="1" rowsep="1"><colspec colname="col1" colwidth="198*"
align="left"/><colspec colname="col2" colwidth="198*" align="left"/><thead>
<row>
<entry align="center">
<para>ATTRIBUTE TYPE</para>
</entry>
<entry align="center">
<para>ATTRIBUTE VALUE</para>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="left">
<para>Availability</para>
</entry>
<entry align="left">
</entry>
</row>
<row>
<entry align="left">
<para>Interface Stability</para>
</entry>
<entry align="left">
<para>Uncommitted</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable></refsect1>
<refsect1 role="see-also"><title></title>
<para><olink targetdoc="refman" targetptr="svcprop-1"><citerefentry><refentrytitle>svcprop</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink>, <olink targetdoc="refman" targetptr="svcs-1"><citerefentry><refentrytitle>svcs</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink>, <olink targetdoc="refman" targetptr="svcadm-8"><citerefentry><refentrytitle>svcadm</refentrytitle><manvolnum>8</manvolnum></citerefentry></olink>, <olink targetdoc="refman" targetptr="svccfg-8"><citerefentry><refentrytitle>svccfg</refentrytitle><manvolnum>8</manvolnum></citerefentry></olink>, <olink targetdoc="refman" targetptr="pkg.depotd-8"><citerefentry><refentrytitle>pkg.depotd</refentrytitle><manvolnum>8</manvolnum></citerefentry></olink>, <olink targetdoc="refman" targetptr="pkg-7"><citerefentry><refentrytitle>pkg</refentrytitle><manvolnum>7</manvolnum></citerefentry></olink></para>
<para><olink targetdoc="CCOSP"><citetitle remap="book">Copying and Creating Package Repositories in Oracle Solaris 11.2</citetitle></olink></para>
</refsect1>
</refentry>