summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml175
1 files changed, 38 insertions, 137 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 6e0a618277..376027f8b5 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -7639,149 +7639,50 @@
7639 Although other protocols are possible, a server using HTTP 7639 Although other protocols are possible, a server using HTTP
7640 typically serves packages. 7640 typically serves packages.
7641 If you want to use HTTP, then set up and configure a 7641 If you want to use HTTP, then set up and configure a
7642 web server, such as Apache 2 or lighttpd, on the machine 7642 web server such as Apache 2, lighttpd, or
7643 serving the packages. 7643 SimpleHTTPServer on the machine serving the packages.
7644 </para> 7644 </para>
7645 7645
7646 <para> 7646 <para>
7647 As previously mentioned, the build machine can act as the 7647 To keep things simple, this section describes how to set
7648 package server. 7648 up a SimpleHTTPServer web server to share package feeds
7649 In the following sections that describe server machine 7649 from the developer's machine.
7650 setups, the build machine is assumed to also be the server. 7650 Although this server might not be the best for a production
7651 environment, the setup is simple and straight forward.
7652 Should you want to use a different server more suited for
7653 production (e.g. Apache 2, Lighttpd, or Nginx), take the
7654 appropriate steps to do so.
7651 </para> 7655 </para>
7652 7656
7653 <section id='package-server-apache'> 7657 <para>
7654 <title>Serving Packages via Apache 2</title> 7658 Use the following steps to set up the SimpleHTTPServer
7655 7659 machine.
7656 <para> 7660 These steps assume the build machine and the server are
7657 This example assumes you are using the Apache 2 7661 same machine:
7658 server: 7662 <orderedlist>
7659 <orderedlist> 7663 <listitem><para><emphasis>Create a Directory that
7660 <listitem><para> 7664 Contains the Packages to Host:</emphasis>
7661 Add the directory to your Apache 7665 Be sure you have root privileges and place the
7662 configuration, which you can find at 7666 directory inside <filename>var/www/</filename>
7663 <filename>/etc/httpd/conf/httpd.conf</filename>. 7667 (e.g. <filename>/var/www/my_repo/</filename>).
7664 Use commands similar to the following on the 7668 To ensure the directory contains the packages you
7665 development system. 7669 want to serve, you need to create a symlink from
7666 These example commands assume a top-level 7670 the package feed area to the directory that hosts
7667 <link linkend='source-directory'>Source Directory</link> 7671 the packages you want to provide:
7668 named <filename>poky</filename> in your home 7672 <literallayout class='monospaced'>
7669 directory.
7670 The example also assumes an RPM package type.
7671 If you are using a different package type, such
7672 as IPK, use "ipk" in the pathnames:
7673 <literallayout class='monospaced'>
7674 &lt;VirtualHost *:80&gt;
7675 ...
7676 Alias /rpm ~/poky/build/tmp/deploy/rpm
7677 &lt;Directory "~/poky/build/tmp/deploy/rpm"&gt;
7678 Options +Indexes
7679 &lt;/Directory&gt;
7680 &lt;/VirtualHost&gt;
7681 </literallayout>
7682 </para></listitem>
7683 <listitem><para>
7684 Reload the Apache configuration as described
7685 in this step.
7686 For all commands, be sure you have root
7687 privileges.
7688 </para>
7689
7690 <para>
7691 If your development system is using Fedora or
7692 CentOS, use the following:
7693 <literallayout class='monospaced'>
7694 # service httpd reload
7695 </literallayout>
7696 For Ubuntu and Debian, use the following:
7697 <literallayout class='monospaced'>
7698 # /etc/init.d/apache2 reload
7699 </literallayout>
7700 For OpenSUSE, use the following:
7701 <literallayout class='monospaced'>
7702 # /etc/init.d/apache2 reload
7703 </literallayout>
7704 </para></listitem>
7705 <listitem><para>
7706 If you are using Security-Enhanced Linux
7707 (SELinux), you need to label the files as
7708 being accessible through Apache.
7709 Use the following command from the development
7710 host.
7711 This example assumes RPM package types:
7712 <literallayout class='monospaced'>
7713 # chcon -R -h -t httpd_sys_content_t tmp/deploy/rpm
7714 </literallayout>
7715 </para></listitem>
7716 </orderedlist>
7717 </para>
7718 </section>
7719
7720 <section id='package-server-lighttpd'>
7721 <title>Serving Packages Through lighttpd</title>
7722
7723 <para>
7724 If you are using lighttpd, all you need
7725 to do is to provide a link from your
7726 <filename>${TMPDIR}/deploy/<replaceable>packageformat</replaceable></filename>
7727 directory to lighttpd's document-root.
7728 You can determine the specifics of your lighttpd
7729 installation by looking through its configuration file,
7730 which is usually found at:
7731 <filename>/etc/lighttpd/lighttpd.conf</filename>.
7732 For example, if you are using IPK, lighttpd's
7733 document-root is set to
7734 <filename>/var/www/lighttpd</filename>, and you had
7735 packages for a target named "BOARD",
7736 then you might create a link from your build location
7737 to lighttpd's document-root as follows:
7738 <literallayout class='monospaced'>
7739 # ln -s $(PWD)/tmp/deploy/ipk /var/www/lighttpd/BOARD-dir
7740 </literallayout>
7741 </para>
7742
7743 <para>
7744 At this point, you need to start the lighttpd server.
7745 The method used to start the server varies by
7746 distribution.
7747 However, one basic method that starts it by hand is:
7748 <literallayout class='monospaced'>
7749 # lighttpd -f /etc/lighttpd/lighttpd.conf
7750 </literallayout>
7751 </para>
7752 </section>
7753
7754 <section id='package-server-python-simplehttpserver'>
7755 <title>Serving Packages Through Python SimpleHTTPServer</title>
7756
7757 <para>
7758 It is possible to serve packages hosted by a build
7759 machine through an HTTP server created with a simple
7760 Python command.
7761 </para>
7762
7763 <para>
7764 The first thing you do is to create a directory that
7765 contains the packages to host.
7766 Be sure you have root privileges and place the directory
7767 inside <filename>var/www/</filename>
7768 (e.g. <filename>/var/www/my_repo/</filename>).
7769 To ensure the directory contains the packages you want
7770 to serve, you need to create a symlink from the
7771 package feed area to the directory that hosts the
7772 packages you want to provide:
7773 <literallayout class='monospaced'>
7774 my_repo # ln -s ~{TMPDIR}/deploy/<replaceable>packageformat</replaceable> ./ 7673 my_repo # ln -s ~{TMPDIR}/deploy/<replaceable>packageformat</replaceable> ./
7775 </literallayout> 7674 </literallayout>
7776 You can start the server by running the following 7675 </para></listitem>
7777 command from the recently created directory: 7676 <listitem><para><emphasis>Start the Server:</emphasis>
7778 <literallayout class='monospaced'> 7677 You can start the server by running the following
7779 # python -m SimpleHTTPServer 7678 commands from the recently created directory:
7780 7679 <literallayout class='monospaced'>
7781 Serving HTTP on 0.0.0 port 8000 ... 7680 $ cd {TMPDIR}/deploy/\\packageformat\\
7782 </literallayout> 7681 $ python -m SimpleHTTPServer
7783 </para> 7682 </literallayout>
7784 </section> 7683 </para></listitem>
7684 </orderedlist>
7685 </para>
7785 </section> 7686 </section>
7786 7687
7787 <section id='runtime-package-management-target'> 7688 <section id='runtime-package-management-target'>