diff options
Diffstat (limited to 'docs/htmldocs/compiling.html')
-rw-r--r-- | docs/htmldocs/compiling.html | 1067 |
1 files changed, 141 insertions, 926 deletions
diff --git a/docs/htmldocs/compiling.html b/docs/htmldocs/compiling.html index 9c91e70ce1..c62fcf13f2 100644 --- a/docs/htmldocs/compiling.html +++ b/docs/htmldocs/compiling.html @@ -1,971 +1,186 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<HTML -><HEAD -><TITLE ->How to compile SAMBA</TITLE -><META -NAME="GENERATOR" -CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK -REL="HOME" -TITLE="SAMBA Project Documentation" -HREF="samba-howto-collection.html"><LINK -REL="UP" -TITLE="Appendixes" -HREF="appendixes.html"><LINK -REL="PREVIOUS" -TITLE="Appendixes" -HREF="appendixes.html"><LINK -REL="NEXT" -TITLE="Migration from NT4 PDC to Samba-3 PDC" -HREF="nt4migration.html"></HEAD -><BODY -CLASS="CHAPTER" -BGCOLOR="#FFFFFF" -TEXT="#000000" -LINK="#0000FF" -VLINK="#840084" -ALINK="#0000FF" -><DIV -CLASS="NAVHEADER" -><TABLE -SUMMARY="Header navigation table" -WIDTH="100%" -BORDER="0" -CELLPADDING="0" -CELLSPACING="0" -><TR -><TH -COLSPAN="3" -ALIGN="center" ->SAMBA Project Documentation</TH -></TR -><TR -><TD -WIDTH="10%" -ALIGN="left" -VALIGN="bottom" -><A -HREF="appendixes.html" -ACCESSKEY="P" ->Prev</A -></TD -><TD -WIDTH="80%" -ALIGN="center" -VALIGN="bottom" -></TD -><TD -WIDTH="10%" -ALIGN="right" -VALIGN="bottom" -><A -HREF="nt4migration.html" -ACCESSKEY="N" ->Next</A -></TD -></TR -></TABLE -><HR -ALIGN="LEFT" -WIDTH="100%"></DIV -><DIV -CLASS="CHAPTER" -><H1 -><A -NAME="COMPILING" -></A ->Chapter 27. How to compile SAMBA</H1 -><DIV -CLASS="TOC" -><DL -><DT -><B ->Table of Contents</B -></DT -><DT ->27.1. <A -HREF="compiling.html#AEN4204" ->Access Samba source code via CVS</A -></DT -><DD -><DL -><DT ->27.1.1. <A -HREF="compiling.html#AEN4206" ->Introduction</A -></DT -><DT ->27.1.2. <A -HREF="compiling.html#AEN4211" ->CVS Access to samba.org</A -></DT -><DD -><DL -><DT ->27.1.2.1. <A -HREF="compiling.html#AEN4214" ->Access via CVSweb</A -></DT -><DT ->27.1.2.2. <A -HREF="compiling.html#AEN4219" ->Access via cvs</A -></DT -></DL -></DD -></DL -></DD -><DT ->27.2. <A -HREF="compiling.html#AEN4247" ->Accessing the samba sources via rsync and ftp</A -></DT -><DT ->27.3. <A -HREF="compiling.html#AEN4253" ->Verifying Samba's PGP signature</A -></DT -><DT ->27.4. <A -HREF="compiling.html#AEN4265" ->Building the Binaries</A -></DT -><DT ->27.5. <A -HREF="compiling.html#AEN4322" ->Starting the smbd and nmbd</A -></DT -><DD -><DL -><DT ->27.5.1. <A -HREF="compiling.html#AEN4332" ->Starting from inetd.conf</A -></DT -><DT ->27.5.2. <A -HREF="compiling.html#AEN4366" ->Alternative: starting it as a daemon</A -></DT -></DL -></DD -></DL -></DIV -><P ->You can obtain the samba source from the <A -HREF="http://samba.org/" -TARGET="_top" ->samba website</A ->. To obtain a development version, -you can download samba from CVS or using rsync.</P -><DIV -CLASS="SECT1" -><H1 -CLASS="SECT1" -><A -NAME="AEN4204" ->27.1. Access Samba source code via CVS</A -></H1 -><DIV -CLASS="SECT2" -><H2 -CLASS="SECT2" -><A -NAME="AEN4206" ->27.1.1. Introduction</A -></H2 -><P ->Samba is developed in an open environment. Developers use CVS -(Concurrent Versioning System) to "checkin" (also known as -"commit") new source code. Samba's various CVS branches can +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 30. How to compile SAMBA</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="Appendixes.html" title="Part V. Appendixes"><link rel="previous" href="Appendixes.html" title="Part V. Appendixes"><link rel="next" href="NT4Migration.html" title="Chapter 31. Migration from NT4 PDC to Samba-3 PDC"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. How to compile SAMBA</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Appendixes.html">Prev</a> </td><th width="60%" align="center">Part V. Appendixes</th><td width="20%" align="right"> <a accesskey="n" href="NT4Migration.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><h2 class="title"><a name="compiling"></a>Chapter 30. How to compile SAMBA</h2></div><div><div class="author"><h3 class="author"></h3><div class="affiliation"><span class="orgname">Samba Team<br></span></div></div></div><div><div class="author"><h3 class="author">Jelmer R. Vernooij</h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><tt><<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>></tt></p></div></div></div></div><div><p class="pubdate"> (22 May 2001) </p></div><div><p class="pubdate"> 18 March 2003 </p></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="compiling.html#id2904479">Access Samba source code via CVS</a></dt><dd><dl><dt><a href="compiling.html#id2904486">Introduction</a></dt><dt><a href="compiling.html#id2904519">CVS Access to samba.org</a></dt></dl></dd><dt><a href="compiling.html#id2905273">Accessing the samba sources via rsync and ftp</a></dt><dt><a href="compiling.html#id2905314">Verifying Samba's PGP signature</a></dt><dt><a href="compiling.html#id2905397">Building the Binaries</a></dt><dd><dl><dt><a href="compiling.html#id2905534">Compiling samba with Active Directory support</a></dt></dl></dd><dt><a href="compiling.html#id2905682">Starting the smbd and nmbd</a></dt><dd><dl><dt><a href="compiling.html#id2905749">Starting from inetd.conf</a></dt><dt><a href="compiling.html#id2905941">Alternative: starting it as a daemon</a></dt></dl></dd></dl></div><p> +You can obtain the samba source from the <a href="http://samba.org/" target="_top">samba website</a>. To obtain a development version, +you can download samba from CVS or using rsync. +</p><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2904479"></a>Access Samba source code via CVS</h2></div></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2904486"></a>Introduction</h3></div></div><p> +Samba is developed in an open environment. Developers use CVS +(Concurrent Versioning System) to "checkin" (also known as +"commit") new source code. Samba's various CVS branches can be accessed via anonymous CVS using the instructions -detailed in this chapter.</P -><P ->This chapter is a modified version of the instructions found at -<A -HREF="http://samba.org/samba/cvs.html" -TARGET="_top" ->http://samba.org/samba/cvs.html</A -></P -></DIV -><DIV -CLASS="SECT2" -><H2 -CLASS="SECT2" -><A -NAME="AEN4211" ->27.1.2. CVS Access to samba.org</A -></H2 -><P ->The machine samba.org runs a publicly accessible CVS +detailed in this chapter. +</p><p> +This chapter is a modified version of the instructions found at +<a href="http://samba.org/samba/cvs.html" target="_top">http://samba.org/samba/cvs.html</a> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2904519"></a>CVS Access to samba.org</h3></div></div><p> +The machine samba.org runs a publicly accessible CVS repository for access to the source code of several packages, including samba, rsync and jitterbug. There are two main ways of -accessing the CVS server on this host.</P -><DIV -CLASS="SECT3" -><H3 -CLASS="SECT3" -><A -NAME="AEN4214" ->27.1.2.1. Access via CVSweb</A -></H3 -><P ->You can access the source code via your +accessing the CVS server on this host. +</p><div class="sect3" lang="en"><div class="titlepage"><div><h4 class="title"><a name="id2904535"></a>Access via CVSweb</h4></div></div><p> +You can access the source code via your favourite WWW browser. This allows you to access the contents of individual files in the repository and also to look at the revision history and commit logs of individual files. You can also ask for a diff -listing between any two versions on the repository.</P -><P ->Use the URL : <A -HREF="http://samba.org/cgi-bin/cvsweb" -TARGET="_top" ->http://samba.org/cgi-bin/cvsweb</A -></P -></DIV -><DIV -CLASS="SECT3" -><H3 -CLASS="SECT3" -><A -NAME="AEN4219" ->27.1.2.2. Access via cvs</A -></H3 -><P ->You can also access the source code via a -normal cvs client. This gives you much more control over you can +listing between any two versions on the repository. +</p><p> +Use the URL : <a href="http://samba.org/cgi-bin/cvsweb" target="_top">http://samba.org/cgi-bin/cvsweb</a> +</p></div><div class="sect3" lang="en"><div class="titlepage"><div><h4 class="title"><a name="id2905096"></a>Access via cvs</h4></div></div><p> +You can also access the source code via a +normal cvs client. This gives you much more control over what you can do with the repository and allows you to checkout whole source trees and keep them up to date via normal cvs commands. This is the preferred method of access if you are a developer and not -just a casual browser.</P -><P ->To download the latest cvs source code, point your -browser at the URL : <A -HREF="http://www.cyclic.com/" -TARGET="_top" ->http://www.cyclic.com/</A ->. +just a casual browser. +</p><p> +To download the latest cvs source code, point your +browser at the URL : <a href="http://www.cyclic.com/" target="_top">http://www.cyclic.com/</a>. and click on the 'How to get cvs' link. CVS is free software under the GNU GPL (as is Samba). Note that there are several graphical CVS clients which provide a graphical interface to the sometimes mundane CVS commands. -Links to theses clients are also available from http://www.cyclic.com.</P -><P ->To gain access via anonymous cvs use the following steps. +Links to theses clients are also available from http://www.cyclic.com. +</p><p> +To gain access via anonymous cvs use the following steps. For this example it is assumed that you want a copy of the samba source code. For the other source code repositories -on this system just substitute the correct package name</P -><P -></P -><OL -TYPE="1" -><LI -><P -> Install a recent copy of cvs. All you really need is a +on this system just substitute the correct package name +</p><div class="orderedlist"><ol type="1"><li><p> + Install a recent copy of cvs. All you really need is a copy of the cvs client binary. - </P -></LI -><LI -><P -> Run the command - </P -><P -> <KBD -CLASS="USERINPUT" ->cvs -d :pserver:cvs@samba.org:/cvsroot login</KBD -> - </P -><P -> When it asks you for a password type <KBD -CLASS="USERINPUT" ->cvs</KBD ->. - </P -></LI -><LI -><P -> Run the command - </P -><P -> <KBD -CLASS="USERINPUT" ->cvs -d :pserver:cvs@samba.org:/cvsroot co samba</KBD -> - </P -><P -> This will create a directory called samba containing the + </p></li><li><p> + Run the command + </p><p> + <b><tt>cvs -d :pserver:cvs@samba.org:/cvsroot login</tt></b> + </p><p> + When it asks you for a password type <b><tt>cvs</tt></b>. + </p></li><li><p> + Run the command + </p><p> + <b><tt>cvs -d :pserver:cvs@samba.org:/cvsroot co samba</tt></b> + </p><p> + This will create a directory called samba containing the latest samba source code (i.e. the HEAD tagged cvs branch). This currently corresponds to the 3.0 development tree. - </P -><P -> CVS branches other HEAD can be obtained by using the <VAR -CLASS="PARAMETER" ->-r</VAR -> + </p><p> + CVS branches other then HEAD can be obtained by using the <i><tt>-r</tt></i> and defining a tag name. A list of branch tag names can be found on the - "Development" page of the samba web site. A common request is to obtain the + "Development" page of the samba web site. A common request is to obtain the latest 2.2 release code. This could be done by using the following userinput. - </P -><P -> <KBD -CLASS="USERINPUT" ->cvs -d :pserver:cvs@samba.org:/cvsroot co -r SAMBA_2_2 samba</KBD -> - </P -></LI -><LI -><P -> Whenever you want to merge in the latest code changes use + </p><p> + <b><tt>cvs -d :pserver:cvs@samba.org:/cvsroot co -r SAMBA_2_2 samba</tt></b> + </p></li><li><p> + Whenever you want to merge in the latest code changes use the following command from within the samba directory: - </P -><P -> <KBD -CLASS="USERINPUT" ->cvs update -d -P</KBD -> - </P -></LI -></OL -></DIV -></DIV -></DIV -><DIV -CLASS="SECT1" -><H1 -CLASS="SECT1" -><A -NAME="AEN4247" ->27.2. Accessing the samba sources via rsync and ftp</A -></H1 -><P -> pserver.samba.org also exports unpacked copies of most parts of the CVS tree at <A -HREF="ftp://pserver.samba.org/pub/unpacked" -TARGET="_top" ->ftp://pserver.samba.org/pub/unpacked</A -> and also via anonymous rsync at rsync://pserver.samba.org/ftp/unpacked/. I recommend using rsync rather than ftp. - See <A -HREF="http://rsync.samba.org/" -TARGET="_top" ->the rsync homepage</A -> for more info on rsync. - </P -><P -> The disadvantage of the unpacked trees + </p><p> + <b><tt>cvs update -d -P</tt></b> + </p></li></ol></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2905273"></a>Accessing the samba sources via rsync and ftp</h2></div></div><p> + pserver.samba.org also exports unpacked copies of most parts of the CVS tree at <a href="ftp://pserver.samba.org/pub/unpacked" target="_top">ftp://pserver.samba.org/pub/unpacked</a> and also via anonymous rsync at rsync://pserver.samba.org/ftp/unpacked/. I recommend using rsync rather than ftp. + See <a href="http://rsync.samba.org/" target="_top">the rsync homepage</a> for more info on rsync. + </p><p> + The disadvantage of the unpacked trees is that they do not support automatic merging of local changes like CVS does. rsync access is most convenient for an initial install. - </P -></DIV -><DIV -CLASS="SECT1" -><H1 -CLASS="SECT1" -><A -NAME="AEN4253" ->27.3. Verifying Samba's PGP signature</A -></H1 -><P ->In these days of insecurity, it's strongly recommended that you verify the PGP signature for any + </p></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2905314"></a>Verifying Samba's PGP signature</h2></div></div><p> +In these days of insecurity, it's strongly recommended that you verify the PGP signature for any source file before installing it. According to Jerry Carter of the Samba Team, only about 22% of all Samba downloads have had a corresponding PGP signature download (a very low percentage, which should be considered a bad thing). Even if you're not downloading from a mirror site, verifying PGP -signatures should be a standard reflex.</P -><P ->With that said, go ahead and download the following files:</P -><P -><PRE -CLASS="PROGRAMLISTING" -> $ wget http://us1.samba.org/samba/ftp/samba-2.2.8a.tar.asc - $ wget http://us1.samba.org/samba/ftp/samba-pubkey.asc</PRE -></P -><P ->The first file is the PGP signature for the Samba source file; the other is the Samba public -PGP key itself. Import the public PGP key with:</P -><PRE -CLASS="PROGRAMLISTING" -> $ gpg --import samba-pubkey.asc</PRE -><P ->And verify the Samba source code integrity with:</P -><PRE -CLASS="PROGRAMLISTING" -> $ gzip -d samba-2.2.8a.tar.gz - $ gpg --verify samba-2.2.8a.tar.asc</PRE -><P ->If you receive a message like, "Good signature from Samba Distribution Verification Key..." +signatures should be a standard reflex. +</p><p> +With that said, go ahead and download the following files: +</p><pre class="programlisting"> + $ wget http://us1.samba.org/samba/ftp/samba-2.2.8a.tar.asc + $ wget http://us1.samba.org/samba/ftp/samba-pubkey.asc +</pre><p> +The first file is the PGP signature for the Samba source file; the other is the Samba public +PGP key itself. Import the public PGP key with: +</p><pre class="programlisting"> + $ gpg --import samba-pubkey.asc +</pre><p> +And verify the Samba source code integrity with: +</p><pre class="programlisting"> + $ gzip -d samba-2.2.8a.tar.gz + $ gpg --verify samba-2.2.8a.tar.asc +</pre><p> +If you receive a message like, "Good signature from Samba Distribution Verification Key..." then all is well. The warnings about trust relationships can be ignored. An example of what -you would not want to see would be:</P -><PRE -CLASS="PROGRAMLISTING" -> gpg: BAD signature from "Samba Distribution Verification Key"</PRE -></DIV -><DIV -CLASS="SECT1" -><H1 -CLASS="SECT1" -><A -NAME="AEN4265" ->27.4. Building the Binaries</A -></H1 -><P ->To do this, first run the program <KBD -CLASS="USERINPUT" ->./configure - </KBD -> in the source directory. This should automatically +you would not want to see would be: +</p><pre class="programlisting"> + gpg: BAD signature from "Samba Distribution Verification Key" +</pre></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2905397"></a>Building the Binaries</h2></div></div><p>To do this, first run the program <b><tt>./configure + </tt></b> in the source directory. This should automatically configure Samba for your operating system. If you have unusual - needs then you may wish to run</P -><P -><SAMP -CLASS="PROMPT" ->root# </SAMP -><KBD -CLASS="USERINPUT" ->./configure --help - </KBD -></P -><P ->first to see what special options you can enable. - Then executing</P -><P -><SAMP -CLASS="PROMPT" ->root# </SAMP -><KBD -CLASS="USERINPUT" ->make</KBD -></P -><P ->will create the binaries. Once it's successfully - compiled you can use </P -><P -><SAMP -CLASS="PROMPT" ->root# </SAMP -><KBD -CLASS="USERINPUT" ->make install</KBD -></P -><P ->to install the binaries and manual pages. You can - separately install the binaries and/or man pages using</P -><P -><SAMP -CLASS="PROMPT" ->root# </SAMP -><KBD -CLASS="USERINPUT" ->make installbin - </KBD -></P -><P ->and</P -><P -><SAMP -CLASS="PROMPT" ->root# </SAMP -><KBD -CLASS="USERINPUT" ->make installman - </KBD -></P -><P ->Note that if you are upgrading for a previous version + needs then you may wish to run</p><p><tt>root# </tt><b><tt>./configure --help + </tt></b></p><p>first to see what special options you can enable. + Then executing</p><p><tt>root# </tt><b><tt>make</tt></b></p><p>will create the binaries. Once it's successfully + compiled you can use </p><p><tt>root# </tt><b><tt>make install</tt></b></p><p>to install the binaries and manual pages. You can + separately install the binaries and/or man pages using</p><p><tt>root# </tt><b><tt>make installbin + </tt></b></p><p>and</p><p><tt>root# </tt><b><tt>make installman + </tt></b></p><p>Note that if you are upgrading for a previous version of Samba you might like to know that the old versions of - the binaries will be renamed with a ".old" extension. You - can go back to the previous version with</P -><P -><SAMP -CLASS="PROMPT" ->root# </SAMP -><KBD -CLASS="USERINPUT" ->make revert - </KBD -></P -><P ->if you find this version a disaster!</P -><DIV -CLASS="SECT2" -><H2 -CLASS="SECT2" -><A -NAME="AEN4293" ->27.4.1. Compiling samba with Active Directory support</A -></H2 -><P ->In order to compile samba with ADS support, you need to have installed - on your system: - <P -></P -><TABLE -BORDER="0" -><TBODY -><TR -><TD ->the MIT kerberos development libraries (either install from the sources or use a package). The heimdal libraries will not work.</TD -></TR -><TR -><TD ->the OpenLDAP development libraries.</TD -></TR -></TBODY -></TABLE -><P -></P -></P -><P ->If your kerberos libraries are in a non-standard location then - remember to add the configure option --with-krb5=DIR.</P -><P ->After you run configure make sure that <TT -CLASS="FILENAME" ->include/config.h</TT -> it generates contains lines like this:</P -><P -><PRE -CLASS="PROGRAMLISTING" ->#define HAVE_KRB5 1 + the binaries will be renamed with a ".old" extension. You + can go back to the previous version with</p><p><tt>root# </tt><b><tt>make revert + </tt></b></p><p>if you find this version a disaster!</p><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2905534"></a>Compiling samba with Active Directory support</h3></div></div><p>In order to compile samba with ADS support, you need to have installed + on your system:</p><div class="itemizedlist"><ul type="disc"><li><p>the MIT kerberos development libraries + (either install from the sources or use a package). The + heimdal libraries will not work.</p></li><li><p>the OpenLDAP development libraries.</p></li></ul></div><p>If your kerberos libraries are in a non-standard location then + remember to add the configure option --with-krb5=DIR.</p><p>After you run configure make sure that <tt>include/config.h</tt> it generates contains lines like this:</p><pre class="programlisting"> +#define HAVE_KRB5 1 #define HAVE_LDAP 1 - </PRE -></P -><P ->If it doesn't then configure did not find your krb5 libraries or +</pre><p>If it doesn't then configure did not find your krb5 libraries or your ldap libraries. Look in config.log to figure out why and fix - it.</P -><DIV -CLASS="SECT3" -><H3 -CLASS="SECT3" -><A -NAME="AEN4305" ->27.4.1.1. Installing the required packages for Debian</A -></H3 -><P ->On Debian you need to install the following packages:</P -><P -> <P -></P -><TABLE -BORDER="0" -><TBODY -><TR -><TD ->libkrb5-dev</TD -></TR -><TR -><TD ->krb5-user</TD -></TR -></TBODY -></TABLE -><P -></P -> - </P -></DIV -><DIV -CLASS="SECT3" -><H3 -CLASS="SECT3" -><A -NAME="AEN4312" ->27.4.1.2. Installing the required packages for RedHat</A -></H3 -><P ->On RedHat this means you should have at least: </P -><P -> <P -></P -><TABLE -BORDER="0" -><TBODY -><TR -><TD ->krb5-workstation (for kinit)</TD -></TR -><TR -><TD ->krb5-libs (for linking with)</TD -></TR -><TR -><TD ->krb5-devel (because you are compiling from source)</TD -></TR -></TBODY -></TABLE -><P -></P -> - </P -><P ->in addition to the standard development environment.</P -><P ->Note that these are not standard on a RedHat install, and you may need - to get them off CD2.</P -></DIV -></DIV -></DIV -><DIV -CLASS="SECT1" -><H1 -CLASS="SECT1" -><A -NAME="AEN4322" ->27.5. Starting the smbd and nmbd</A -></H1 -><P ->You must choose to start smbd and nmbd either - as daemons or from <SPAN -CLASS="APPLICATION" ->inetd</SPAN ->Don't try - to do both! Either you can put them in <TT -CLASS="FILENAME" -> inetd.conf</TT -> and have them started on demand - by <SPAN -CLASS="APPLICATION" ->inetd</SPAN ->, or you can start them as - daemons either from the command line or in <TT -CLASS="FILENAME" -> /etc/rc.local</TT ->. See the man pages for details + it.</p><div class="sect3" lang="en"><div class="titlepage"><div><h4 class="title"><a name="id2905601"></a>Installing the required packages for Debian</h4></div></div><p>On Debian you need to install the following packages:</p><p> + </p><div class="itemizedlist"><ul type="disc"><li>libkrb5-dev</li><li>krb5-user</li></ul></div><p> + </p></div><div class="sect3" lang="en"><div class="titlepage"><div><h4 class="title"><a name="id2905632"></a>Installing the required packages for RedHat</h4></div></div><p>On RedHat this means you should have at least: </p><p> + </p><div class="itemizedlist"><ul type="disc"><li>krb5-workstation (for kinit)</li><li>krb5-libs (for linking with)</li><li>krb5-devel (because you are compiling from source)</li></ul></div><p> + </p><p>in addition to the standard development environment.</p><p>Note that these are not standard on a RedHat install, and you may need + to get them off CD2.</p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2905682"></a>Starting the smbd and nmbd</h2></div></div><p>You must choose to start smbd and nmbd either + as daemons or from inetdDon't try + to do both! Either you can put them in <tt> + inetd.conf</tt> and have them started on demand + by inetd, or you can start them as + daemons either from the command line or in <tt> + /etc/rc.local</tt>. See the man pages for details on the command line options. Take particular care to read the bit about what user you need to be in order to start - Samba. In many cases you must be root.</P -><P ->The main advantage of starting <SPAN -CLASS="APPLICATION" ->smbd</SPAN -> - and <SPAN -CLASS="APPLICATION" ->nmbd</SPAN -> using the recommended daemon method + Samba. In many cases you must be root.</p><p>The main advantage of starting smbd + and nmbd using the recommended daemon method is that they will respond slightly more quickly to an initial connection - request.</P -><DIV -CLASS="SECT2" -><H2 -CLASS="SECT2" -><A -NAME="AEN4332" ->27.5.1. Starting from inetd.conf</A -></H2 -><P ->NOTE; The following will be different if - you use NIS, NIS+ or LDAP to distribute services maps.</P -><P ->Look at your <TT -CLASS="FILENAME" ->/etc/services</TT ->. + request.</p><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2905749"></a>Starting from inetd.conf</h3></div></div><p>NOTE; The following will be different if + you use NIS, NIS+ or LDAP to distribute services maps.</p><p>Look at your <tt>/etc/services</tt>. What is defined at port 139/tcp. If nothing is defined - then add a line like this:</P -><P -><KBD -CLASS="USERINPUT" ->netbios-ssn 139/tcp</KBD -></P -><P ->similarly for 137/udp you should have an entry like:</P -><P -><KBD -CLASS="USERINPUT" ->netbios-ns 137/udp</KBD -></P -><P ->Next edit your <TT -CLASS="FILENAME" ->/etc/inetd.conf</TT -> - and add two lines something like this:</P -><P -><PRE -CLASS="PROGRAMLISTING" -> netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd + then add a line like this:</p><p><b><tt>netbios-ssn 139/tcp</tt></b></p><p>similarly for 137/udp you should have an entry like:</p><p><b><tt>netbios-ns 137/udp</tt></b></p><p>Next edit your <tt>/etc/inetd.conf</tt> + and add two lines something like this:</p><pre class="programlisting"> + netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd netbios-ns dgram udp wait root /usr/local/samba/bin/nmbd nmbd - </PRE -></P -><P ->The exact syntax of <TT -CLASS="FILENAME" ->/etc/inetd.conf</TT -> + </pre><p>The exact syntax of <tt>/etc/inetd.conf</tt> varies between unixes. Look at the other entries in inetd.conf - for a guide.</P -><DIV -CLASS="NOTE" -><P -></P -><TABLE -CLASS="NOTE" -WIDTH="100%" -BORDER="0" -><TR -><TD -WIDTH="25" -ALIGN="CENTER" -VALIGN="TOP" -><IMG -SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif" -HSPACE="5" -ALT="Note"></TD -><TD -ALIGN="LEFT" -VALIGN="TOP" -><P ->Some unixes already have entries like netbios_ns - (note the underscore) in <TT -CLASS="FILENAME" ->/etc/services</TT ->. - You must either edit <TT -CLASS="FILENAME" ->/etc/services</TT -> or - <TT -CLASS="FILENAME" ->/etc/inetd.conf</TT -> to make them consistent.</P -></TD -></TR -></TABLE -></DIV -><DIV -CLASS="NOTE" -><P -></P -><TABLE -CLASS="NOTE" -WIDTH="100%" -BORDER="0" -><TR -><TD -WIDTH="25" -ALIGN="CENTER" -VALIGN="TOP" -><IMG -SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif" -HSPACE="5" -ALT="Note"></TD -><TD -ALIGN="LEFT" -VALIGN="TOP" -><P ->On many systems you may need to use the - <B -CLASS="COMMAND" ->interfaces</B -> option in <TT -CLASS="FILENAME" ->smb.conf</TT -> to specify the IP address - and netmask of your interfaces. Run <SPAN -CLASS="APPLICATION" ->ifconfig</SPAN -> + for a guide.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Some unixes already have entries like netbios_ns + (note the underscore) in <tt>/etc/services</tt>. + You must either edit <tt>/etc/services</tt> or + <tt>/etc/inetd.conf</tt> to make them consistent.</p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>On many systems you may need to use the + <b>interfaces</b> option in <tt>smb.conf</tt> to specify the IP address + and netmask of your interfaces. Run ifconfig as root if you don't know what the broadcast is for your - net. <SPAN -CLASS="APPLICATION" ->nmbd</SPAN -> tries to determine it at run + net. nmbd tries to determine it at run time, but fails on some unixes. - </P -></TD -></TR -></TABLE -></DIV -><DIV -CLASS="WARNING" -><P -></P -><TABLE -CLASS="WARNING" -WIDTH="100%" -BORDER="0" -><TR -><TD -WIDTH="25" -ALIGN="CENTER" -VALIGN="TOP" -><IMG -SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/warning.gif" -HSPACE="5" -ALT="Warning"></TD -><TD -ALIGN="LEFT" -VALIGN="TOP" -><P ->Many unixes only accept around 5 - parameters on the command line in <TT -CLASS="FILENAME" ->inetd.conf</TT ->. + </p></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>Many unixes only accept around 5 + parameters on the command line in <tt>inetd.conf</tt>. This means you shouldn't use spaces between the options and arguments, or you should use a script, and start the script - from <B -CLASS="COMMAND" ->inetd</B ->.</P -></TD -></TR -></TABLE -></DIV -><P ->Restart <B -CLASS="COMMAND" ->inetd</B ->, perhaps just send - it a HUP. If you have installed an earlier version of <SPAN -CLASS="APPLICATION" -> nmbd</SPAN -> then you may need to kill nmbd as well.</P -></DIV -><DIV -CLASS="SECT2" -><H2 -CLASS="SECT2" -><A -NAME="AEN4366" ->27.5.2. Alternative: starting it as a daemon</A -></H2 -><P ->To start the server as a daemon you should create + from <b>inetd</b>.</p></div><p>Restart <b>inetd</b>, perhaps just send + it a HUP. If you have installed an earlier version of + nmbd then you may need to kill nmbd as well.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2905941"></a>Alternative: starting it as a daemon</h3></div></div><p>To start the server as a daemon you should create a script something like this one, perhaps calling - it <TT -CLASS="FILENAME" ->startsmb</TT ->.</P -><P -><PRE -CLASS="PROGRAMLISTING" -> #!/bin/sh + it <tt>startsmb</tt>.</p><pre class="programlisting"> + #!/bin/sh /usr/local/samba/bin/smbd -D /usr/local/samba/bin/nmbd -D - </PRE -></P -><P ->then make it executable with <B -CLASS="COMMAND" ->chmod - +x startsmb</B -></P -><P ->You can then run <B -CLASS="COMMAND" ->startsmb</B -> by - hand or execute it from <TT -CLASS="FILENAME" ->/etc/rc.local</TT -> - </P -><P ->To kill it send a kill signal to the processes - <B -CLASS="COMMAND" ->nmbd</B -> and <B -CLASS="COMMAND" ->smbd</B ->.</P -><DIV -CLASS="NOTE" -><P -></P -><TABLE -CLASS="NOTE" -WIDTH="100%" -BORDER="0" -><TR -><TD -WIDTH="25" -ALIGN="CENTER" -VALIGN="TOP" -><IMG -SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif" -HSPACE="5" -ALT="Note"></TD -><TD -ALIGN="LEFT" -VALIGN="TOP" -><P ->If you use the SVR4 style init system then - you may like to look at the <TT -CLASS="FILENAME" ->examples/svr4-startup</TT -> - script to make Samba fit into that system.</P -></TD -></TR -></TABLE -></DIV -></DIV -></DIV -></DIV -><DIV -CLASS="NAVFOOTER" -><HR -ALIGN="LEFT" -WIDTH="100%"><TABLE -SUMMARY="Footer navigation table" -WIDTH="100%" -BORDER="0" -CELLPADDING="0" -CELLSPACING="0" -><TR -><TD -WIDTH="33%" -ALIGN="left" -VALIGN="top" -><A -HREF="appendixes.html" -ACCESSKEY="P" ->Prev</A -></TD -><TD -WIDTH="34%" -ALIGN="center" -VALIGN="top" -><A -HREF="samba-howto-collection.html" -ACCESSKEY="H" ->Home</A -></TD -><TD -WIDTH="33%" -ALIGN="right" -VALIGN="top" -><A -HREF="nt4migration.html" -ACCESSKEY="N" ->Next</A -></TD -></TR -><TR -><TD -WIDTH="33%" -ALIGN="left" -VALIGN="top" ->Appendixes</TD -><TD -WIDTH="34%" -ALIGN="center" -VALIGN="top" -><A -HREF="appendixes.html" -ACCESSKEY="U" ->Up</A -></TD -><TD -WIDTH="33%" -ALIGN="right" -VALIGN="top" ->Migration from NT4 PDC to Samba-3 PDC</TD -></TR -></TABLE -></DIV -></BODY -></HTML ->
\ No newline at end of file + </pre><p>then make it executable with <b>chmod + +x startsmb</b></p><p>You can then run <b>startsmb</b> by + hand or execute it from <tt>/etc/rc.local</tt> + </p><p>To kill it send a kill signal to the processes + <b>nmbd</b> and <b>smbd</b>.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>If you use the SVR4 style init system then + you may like to look at the <tt>examples/svr4-startup</tt> + script to make Samba fit into that system.</p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Appendixes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Appendixes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="NT4Migration.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part V. Appendixes </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 31. Migration from NT4 PDC to Samba-3 PDC</td></tr></table></div></body></html> |