From 293421f3c64a2adff7dc15f7ad3adb6120c9fd16 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 24 Sep 2003 15:05:22 +0000 Subject: syncing up docs, examples, & packaging from 3.0 (This used to be commit dd1348c566b4700ea01bd89639e2d3330c878167) --- docs/docbook/projdoc/Compiling.xml | 263 ++++++++++++++++++++----------------- 1 file changed, 143 insertions(+), 120 deletions(-) (limited to 'docs/docbook/projdoc/Compiling.xml') diff --git a/docs/docbook/projdoc/Compiling.xml b/docs/docbook/projdoc/Compiling.xml index ccb2f46f3f..da28e43859 100644 --- a/docs/docbook/projdoc/Compiling.xml +++ b/docs/docbook/projdoc/Compiling.xml @@ -1,32 +1,33 @@ &author.jelmer; + &author.jht; &author.tridge; 22 May 2001 18 March 2003 -How to compile Samba +How to Compile Samba -You can obtain the samba source from the -samba website. To obtain a development version, -you can download samba from CVS or using rsync. +You can obtain the Samba source from the +Samba Website. To obtain a development version, +you can download Samba from CVS or using rsync. -Access Samba source code via CVS +Access Samba Source Code via CVS -CVS Introduction -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 +CVS +Samba is developed in an open environment. Developers use +Concurrent Versioning System (CVS) 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. @@ -44,71 +45,70 @@ This chapter is a modified version of the instructions found at The machine samba.org runs a publicly accessible CVS repository for access to the source code of several packages, -including samba, rsync, distcc, ccache and jitterbug. There are two main ways -of accessing the CVS server on this host. +including Samba, rsync, distcc, ccache, and jitterbug. There are two main ways +of accessing the CVS server on this host: Access via CVSweb -CVSweb -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 +CVSweb +You can access the source code via your favorite 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. -Use the URL : http://samba.org/cgi-bin/cvsweb +Use the URL: +http://samba.org/cgi-bin/CVSweb -Access via cvs +Access via CVS You can also access the source code via a -normal cvs client. This gives you much more control over what you can +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 +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. -To download the latest cvs source code, point your +To download the latest CVS source code, point your browser at the URL : http://www.cyclic.com/. -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 the Cyclic website. +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 +that provide a graphical interface to the sometimes mundane CVS commands. +Links to theses clients are also available from the Cyclic Web site. -To gain access via anonymous cvs use the following steps. +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 +Samba source code. For the other source code repositories +on this system just substitute the correct package name. - Retrieving samba using CVS + Retrieving Samba using CVS - Install a recent copy of cvs. All you really need is a - copy of the cvs client binary. + Install a recent copy of CVS. All you really need is a + copy of the CVS client binary. - Run the command + Run the command: @@ -119,7 +119,7 @@ on this system just substitute the correct package name - When it asks you for a password type cvs. + When it asks you for a password, type cvs. @@ -129,32 +129,32 @@ on this system just substitute the correct package name - cvs -d :pserver:cvs@samba.org:/cvsroot co samba + cvs -d :pserver:CVS@samba.org:/cvsroot co samba. - This will create a directory called samba containing the - latest samba source code (i.e. the HEAD tagged cvs branch). This + 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. CVS branches other then HEAD can be obtained by using the - 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 latest 3.0 release code. This could be done by + 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 latest 3.0 release code. This could be done by using the following command: - cvs -d :pserver:cvs@samba.org:/cvsroot co -r SAMBA_3_0 samba + cvs -d :pserver:cvs@samba.org:/cvsroot co -r SAMBA_3_0 samba. - Whenever you want to merge in the latest code changes use - the following command from within the samba directory: + Whenever you want to merge in the latest code changes, use + the following command from within the Samba directory: @@ -169,33 +169,34 @@ on this system just substitute the correct package name - Accessing the samba sources via rsync and ftp + Accessing the Samba Sources via rsync and ftp - rsync - ftp - pserver.samba.org also exports unpacked copies of most parts of the CVS + rsync + ftp + pserver.samba.org also exports unpacked copies of most parts of the CVS tree at ftp://pserver.samba.org/pub/unpacked and also via anonymous rsync at rsync://pserver.samba.org/ftp/unpacked/. I recommend using rsync rather than ftp. - See the rsync homepage for more info on rsync. + See the rsync homepage for more info on rsync. 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. + merging of local changes like CVS does. rsync access is most convenient + for an initial install. -Verifying Samba's PGP signature +Verifying Samba's PGP Signature -In these days of insecurity, it's strongly recommended that you verify the PGP -signature for any source file before installing it. Even if you're not -downloading from a mirror site, verifying PGP signatures should be a -standard reflex. +GPG +It is strongly recommended that you verify the PGP signature for any source file before +installing it. Even if you're not downloading from a mirror site, verifying PGP signatures +should be a standard reflex. Many people today use the GNU GPG toolset in place of PGP. +GPG can substitute for PGP. @@ -210,7 +211,7 @@ With that said, go ahead and download the following files: -GPG +PGP 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: @@ -220,7 +221,7 @@ PGP key itself. Import the public PGP key with: -And verify the Samba source code integrity with: +and verify the Samba source code integrity with: @@ -229,43 +230,44 @@ And verify the Samba source code integrity with: -If you receive a message like, "Good signature from Samba Distribution -Verification Key..." +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: - - - gpg: BAD signature from "Samba Distribution Verification Key" - - + + gpg: BAD signature from Samba Distribution Verification Key + Building the Binaries -configure - To do this, first run the program ./configure +configure + To build the binaries, first run the program ./configure in the source directory. This should automatically configure Samba for your operating system. If you have unusual - needs then you may wish to run + needs, then you may wish to run &rootprompt;./configure --help - first to see what special options you can enable. - Then executing +first to see what special options you can enable. Now execute ./configure with any arguments it might need: -make +&rootprompt;./configure [... arguments ...] -&rootprompt;make + Executing + - will create the binaries. Once it's successfully - compiled you can use + +make + &rootprompt;make + + will create the binaries. Once it is successfully + compiled you can use &rootprompt;make install @@ -280,9 +282,9 @@ example of what you would not want to see would be: &rootprompt;make installman - Note that if you are upgrading for a previous version + Note that if you are upgrading from 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 + the binaries will be renamed with an .old extension. You can go back to the previous version with &rootprompt;make revert @@ -291,26 +293,25 @@ example of what you would not want to see would be: if you find this version a disaster! - Compiling samba with Active Directory support + Compiling Samba with Active Directory Support - In order to compile samba with ADS support, you need to have installed + In order to compile Samba with ADS support, you need to have installed on your system: - the MIT kerberos development libraries - (either install from the sources or use a package). The - Heimdal libraries will not work. + The MIT or Heimdal kerberos development libraries + (either install from the sources or use a package). - the OpenLDAP development libraries. + The OpenLDAP development libraries. - If your kerberos libraries are in a non-standard location then + If your kerberos libraries are in a non-standard location, then remember to add the configure option . - After you run configure make sure that - include/config.h it generates contains lines like + After you run configure, make sure that + include/config.h it generates contain lines like this: @@ -318,38 +319,56 @@ example of what you would not want to see would be: #define HAVE_LDAP 1 - If it doesn't then configure did not find your krb5 libraries or - your ldap libraries. Look in config.log to figure + If it does not, configure did not find your KRB5 libraries or + your LDAP libraries. Look in config.log to figure out why and fix it. - Installing the required packages for Debian + Installing the Required Packages for Debian - On Debian you need to install the following packages: + On Debian, you need to install the following packages: - libkrb5-dev - krb5-user + libkrb5-dev + krb5-user - Installing the required packages for RedHat + Installing the Required Packages for Red Hat Linux - On RedHat this means you should have at least: + On Red Hat Linux, this means you should have at least: - krb5-workstation (for kinit) - krb5-libs (for linking with) - krb5-devel (because you are compiling from source) + krb5-workstation (for kinit) + krb5-libs (for linking with) + krb5-devel (because you are compiling from source) in addition to the standard development environment. - Note that these are not standard on a RedHat install, and you may need - to get them off CD2. + If these files are not installed on your system, you should check the installation + CDs to find which has them and install the files using your tool of choice. If in doubt + about what tool to use, refer to the Red Hat Linux documentation. + + + + + SuSE Linux Package Requirements + + SuSE Linux installs Heimdal packages that may be required to allow you to build + binary packages. You should verify that the development libraries have been installed on + your system. + + + SuSE Linux Samba RPMs support Kerberos. Please refer to the documentation for + your SuSE Linux system for information regading SuSE Linux specific configuration. + Additionally, SuSE are very active in the maintenance of Samba packages that provide + the maximum capabilities that are available. You should consider using SuSE provided + packages where they are available. + @@ -360,9 +379,10 @@ example of what you would not want to see would be: Starting the &smbd; and &nmbd; - inetd - You must choose to start &smbd; and &nmbd; either + + inetd + You must choose to start &smbd; and &nmbd; either as daemons or from inetd. Don't try to do both! Either you can put them in inetd.conf and have them started on demand @@ -371,8 +391,8 @@ example of what you would not want to see would be: daemons either from the command line or in /etc/rc.local. 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. + the bit about what user you need to have to start + Samba. In many cases, you must be root. The main advantage of starting &smbd; and &nmbd; using the recommended daemon method @@ -390,17 +410,17 @@ example of what you would not want to see would be: Look at your /etc/services. - What is defined at port 139/tcp. If nothing is defined + What is defined at port 139/tcp? If nothing is defined, then add a line like this: netbios-ssn 139/tcp - similarly for 137/udp you should have an entry like: + Similarly for 137/udp, you should have an entry like: netbios-ns 137/udp - Next edit your /etc/inetd.conf - and add two lines something like this: + Next, edit your /etc/inetd.conf + and add two lines like this: netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd @@ -408,33 +428,35 @@ example of what you would not want to see would be: The exact syntax of /etc/inetd.conf - varies between unixes. Look at the other entries in inetd.conf + varies between UNIXes. Look at the other entries in inetd.conf for a guide. + xinetd - Some distributions use xinetd instead of inetd. Consult the + Some distributions use xinetd instead of inetd. Consult the xinetd manual for configuration information. - Some unixes already have entries like netbios_ns + Some UNIXes already have entries like netbios_ns (note the underscore) in /etc/services. - You must either edit /etc/services or + You must edit /etc/services or /etc/inetd.conf to make them consistent. + ifconfig - On many systems you may need to use the + On many systems you may need to use the interfaces option in &smb.conf; 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 + as root if you do not know what the broadcast is for your net. &nmbd; tries to determine it at run - time, but fails on some unixes. + time, but fails on some UNIXes. - Many unixes only accept around 5 + Many UNIXes only accept around five parameters on the command line in inetd.conf. This means you shouldn't use spaces between the options and - arguments, or you should use a script, and start the script + arguments, or you should use a script and start the script from inetd. Restart inetd, perhaps just send @@ -447,11 +469,12 @@ example of what you would not want to see would be: - Alternative: starting it as a daemon + Alternative: Starting &smbd; as a Daemon - daemon - To start the server as a daemon you should create + + daemon + To start the server as a daemon, you should create a script something like this one, perhaps calling it startsmb. @@ -461,17 +484,17 @@ example of what you would not want to see would be: /usr/local/samba/bin/nmbd -D - then make it executable with chmod + Make it executable with chmod +x startsmb You can then run startsmb by - hand or execute it from /etc/rc.local + hand or execute it from /etc/rc.local. - To kill it send a kill signal to the processes + To kill it, send a kill signal to the processes &nmbd; and &smbd;. - If you use the SVR4 style init system then + If you use the SVR4 style init system, you may like to look at the examples/svr4-startup script to make Samba fit into that system. -- cgit