From a8279122b973150be23adb8d3d9c2200af66c4b0 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Wed, 8 Jun 2016 09:57:57 -0700 Subject: dev-manual: Updated Host Server Machine Setup for package feeds Removed the extra server instructions and just left the ones for SimpleHTTPServer. Fixes [YOCTO #1882] (From yocto-docs rev: 50a1323a44c645426fb4b77f07d4e3280931a9ac) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 175 +++++---------------- 1 file changed, 38 insertions(+), 137 deletions(-) (limited to 'documentation') 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 @@ Although other protocols are possible, a server using HTTP typically serves packages. If you want to use HTTP, then set up and configure a - web server, such as Apache 2 or lighttpd, on the machine - serving the packages. + web server such as Apache 2, lighttpd, or + SimpleHTTPServer on the machine serving the packages. - As previously mentioned, the build machine can act as the - package server. - In the following sections that describe server machine - setups, the build machine is assumed to also be the server. + To keep things simple, this section describes how to set + up a SimpleHTTPServer web server to share package feeds + from the developer's machine. + Although this server might not be the best for a production + environment, the setup is simple and straight forward. + Should you want to use a different server more suited for + production (e.g. Apache 2, Lighttpd, or Nginx), take the + appropriate steps to do so. -
- Serving Packages via Apache 2 - - - This example assumes you are using the Apache 2 - server: - - - Add the directory to your Apache - configuration, which you can find at - /etc/httpd/conf/httpd.conf. - Use commands similar to the following on the - development system. - These example commands assume a top-level - Source Directory - named poky in your home - directory. - The example also assumes an RPM package type. - If you are using a different package type, such - as IPK, use "ipk" in the pathnames: - - <VirtualHost *:80> - ... - Alias /rpm ~/poky/build/tmp/deploy/rpm - <Directory "~/poky/build/tmp/deploy/rpm"> - Options +Indexes - </Directory> - </VirtualHost> - - - - Reload the Apache configuration as described - in this step. - For all commands, be sure you have root - privileges. - - - - If your development system is using Fedora or - CentOS, use the following: - - # service httpd reload - - For Ubuntu and Debian, use the following: - - # /etc/init.d/apache2 reload - - For OpenSUSE, use the following: - - # /etc/init.d/apache2 reload - - - - If you are using Security-Enhanced Linux - (SELinux), you need to label the files as - being accessible through Apache. - Use the following command from the development - host. - This example assumes RPM package types: - - # chcon -R -h -t httpd_sys_content_t tmp/deploy/rpm - - - - -
- -
- Serving Packages Through lighttpd - - - If you are using lighttpd, all you need - to do is to provide a link from your - ${TMPDIR}/deploy/packageformat - directory to lighttpd's document-root. - You can determine the specifics of your lighttpd - installation by looking through its configuration file, - which is usually found at: - /etc/lighttpd/lighttpd.conf. - For example, if you are using IPK, lighttpd's - document-root is set to - /var/www/lighttpd, and you had - packages for a target named "BOARD", - then you might create a link from your build location - to lighttpd's document-root as follows: - - # ln -s $(PWD)/tmp/deploy/ipk /var/www/lighttpd/BOARD-dir - - - - - At this point, you need to start the lighttpd server. - The method used to start the server varies by - distribution. - However, one basic method that starts it by hand is: - - # lighttpd -f /etc/lighttpd/lighttpd.conf - - -
- -
- Serving Packages Through Python SimpleHTTPServer - - - It is possible to serve packages hosted by a build - machine through an HTTP server created with a simple - Python command. - - - - The first thing you do is to create a directory that - contains the packages to host. - Be sure you have root privileges and place the directory - inside var/www/ - (e.g. /var/www/my_repo/). - To ensure the directory contains the packages you want - to serve, you need to create a symlink from the - package feed area to the directory that hosts the - packages you want to provide: - + + Use the following steps to set up the SimpleHTTPServer + machine. + These steps assume the build machine and the server are + same machine: + + Create a Directory that + Contains the Packages to Host: + Be sure you have root privileges and place the + directory inside var/www/ + (e.g. /var/www/my_repo/). + To ensure the directory contains the packages you + want to serve, you need to create a symlink from + the package feed area to the directory that hosts + the packages you want to provide: + my_repo # ln -s ~{TMPDIR}/deploy/packageformat ./ - - You can start the server by running the following - command from the recently created directory: - - # python -m SimpleHTTPServer - - Serving HTTP on 0.0.0 port 8000 ... - - -
+ + + Start the Server: + You can start the server by running the following + commands from the recently created directory: + + $ cd {TMPDIR}/deploy/\\packageformat\\ + $ python -m SimpleHTTPServer + + + +
-- cgit v1.2.3-54-g00ecf