- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml
r414 r988 21 21 22 22 <sect1> 23 <title>Access Samba Source Code via Subversion</title>23 <title>Access Samba Source Code via GIT</title> 24 24 25 25 … … 29 29 <para> 30 30 <indexterm><primary>Subversion</primary></indexterm> 31 Samba is developed in an open environment. Developers use a 32 Subversion to <quote>checkin</quote> (also known as 33 <quote>commit</quote>) new source code. Samba's various Subversion branches can 34 be accessed via anonymous Subversion using the instructions 35 detailed in this chapter. 36 </para> 37 38 <para> 39 This chapter is a modified version of the instructions found at the 40 <ulink noescape="1" url="http://samba.org/samba/subversion.html">Samba</ulink> Web site. 31 Samba is developed in an open environment. Developers use 32 GIT to <quote>checkin</quote> (also known as 33 <quote>commit</quote>) new source code. See the 34 <ulink noescape="1" 35 url="https://wiki.samba.org/index.php/Using_Git_for_Samba_Development">Using 36 Git for Samba Development page</ulink> in the Samba wiki. 41 37 </para> 42 38 43 39 </sect2> 44 40 45 <sect2>46 <title>Subversion Access to samba.org</title>47 48 <para>49 The machine samba.org runs a publicly accessible Subversion50 repository for access to the source code of several packages,51 including Samba, rsync, distcc, ccache, and jitterbug. There are two main ways52 of accessing the Subversion server on this host.53 </para>54 55 <sect3>56 <title>Access via ViewCVS</title>57 58 59 <para>60 <indexterm><primary>SVN</primary><secondary>web</secondary></indexterm>61 You can access the source code via your favorite WWW browser. This allows you to access62 the contents of individual files in the repository and also to look at the revision63 history and commit logs of individual files. You can also ask for a diff64 listing between any two versions on the repository.65 </para>66 67 <para>68 Use the URL69 <ulink noescape="1" url="http://viewcvs.samba.org/">http://viewcvs.samba.org/</ulink>.70 </para>71 </sect3>72 73 <sect3>74 <title>Access via Subversion</title>75 76 <para>77 <indexterm><primary>Subversion</primary></indexterm>78 You can also access the source code via a normal Subversion client. This gives you much more control over what79 you can do with the repository and allows you to check out whole source trees and keep them up to date via80 normal Subversion commands. This is the preferred method of access if you are a developer and not just a81 casual browser.82 </para>83 84 <para>In order to be able to download the Samba sources off Subversion, you need85 a Subversion client. Your distribution might include one, or you can download the86 sources from <ulink noescape="1" url="http://subversion.tigris.org/">http://subversion.tigris.org/</ulink>.87 </para>88 89 <para>90 To gain access via anonymous Subversion, use the following steps.91 </para>92 93 <procedure>94 <title>Retrieving Samba using Subversion</title>95 96 <step>97 <para>98 Install a recent copy of Subversion. All you really need is a99 copy of the Subversion client binary.100 </para>101 </step>102 103 <step>104 <para>105 Run the command106 <screen>107 <userinput>svn co svn://svnanon.samba.org/samba/trunk samba</userinput>.108 </screen>109 </para>110 111 <para>112 This will create a directory called <filename>samba</filename> containing the113 latest Samba source code (usually the branch that is going to be the next major release). This114 currently corresponds to the 3.1 development tree.115 </para>116 117 <para>118 Subversion branches other then trunk can be obtained by adding branches/BRANCH_NAME to the URL you check119 out. A list of branch names can be found on the <quote>Development</quote> page of the Samba Web site. A120 common request is to obtain the latest 3.0 release code. This could be done by using the following command:121 <screen>122 <userinput>svn co svn://svnanon.samba.org/samba/branches/SAMBA_3_0 samba_3</userinput>.123 </screen>124 </para>125 </step>126 127 <step>128 <para>129 Whenever you want to merge in the latest code changes, use the following command from within the Samba130 directory:131 <screen>132 <userinput>svn update</userinput>133 </screen>134 </para>135 </step>136 </procedure>137 138 </sect3>139 </sect2>140 41 141 42 </sect1> … … 149 50 <indexterm><primary>ftp</primary></indexterm> 150 51 <parameter>pserver.samba.org</parameter> also exports unpacked copies of most parts of the Subversion tree 151 at the Samba <ulink noescape="1" url="ftp:// pserver.samba.org/pub/unpacked">pserver</ulink> location and also52 at the Samba <ulink noescape="1" url="ftp://samba.org/pub/unpacked">unpacked</ulink> location and also 152 53 via anonymous rsync at the Samba <ulink noescape="1" 153 url="rsync:// pserver.samba.org/ftp/unpacked/">rsync</ulink> server location. I recommend using rsync rather54 url="rsync://samba.org/ftp/unpacked/">rsync</ulink> server location. I recommend using rsync rather 154 55 than ftp, because rsync is capable of compressing data streams, but it is also more useful than FTP because 155 56 during a partial update it will transfer only the data that is missing plus a small overhead. See <ulink … … 159 60 <para> 160 61 The disadvantage of the unpacked trees is that they do not support automatic 161 merging of local changes as Subversiondoes. <command>rsync</command> access is most convenient62 merging of local changes as GIT does. <command>rsync</command> access is most convenient 162 63 for an initial install. 163 64 </para> … … 182 83 183 84 <para><screen> 184 &prompt;<userinput>wget http://us1.samba.org/samba/ftp/samba-3.0.20.tar.asc</userinput> 185 &prompt;<userinput>wget http://us1.samba.org/samba/ftp/samba-pubkey.asc</userinput> 85 &prompt;<userinput>wget http://samba.org/samba/ftp/samba-latest.tar.asc</userinput> 86 &prompt;<userinput>wget http://samba.org/samba/ftp/samba-latest.tar.gz</userinput> 87 &prompt;<userinput>wget http://samba.org/samba/ftp/samba-pubkey.asc</userinput> 186 88 </screen></para> 187 89 … … 196 98 and verify the Samba source code integrity with: 197 99 <screen> 198 &prompt;<userinput>gzip -d samba- 3.0.20.tar.gz</userinput>199 &prompt;<userinput>gpg --verify samba- 3.0.20.tar.asc</userinput>100 &prompt;<userinput>gzip -d samba-latest.tar.gz</userinput> 101 &prompt;<userinput>gpg --verify samba-latest.tar.asc</userinput> 200 102 </screen> 201 103 </para> … … 216 118 217 119 <para> 218 <indexterm><primary>autogen.sh</primary></indexterm>219 <indexterm><primary>configure</primary></indexterm>220 After the source tarball has been unpacked, the next step involves221 configuration to match Samba to your operating system platform.222 If your source directory does not contain the <command>configure</command> script,223 it is necessary to build it before you can continue. Building of224 the configure script requires the correct version of the autoconf225 tool kit. Where the necessary version of autoconf is present,226 the configure script can be generated by executing the following227 (please note that in Samba 3.4.x, the directory is called source3 instead228 of source):229 <screen>230 &rootprompt; cd samba-3.0.20/source231 &rootprompt; ./autogen.sh232 </screen>233 </para>234 235 236 <para>237 120 <indexterm><primary>configure</primary></indexterm> 238 121 To build the binaries, run the program <userinput>./configure 239 </userinput> in the source directory. This should automatically122 </userinput> in the top level directory of the source tree. This should automatically 240 123 configure Samba for your operating system. If you have unusual 241 124 needs, then you may wish to first run: … … 266 149 </para> 267 150 268 <para>269 Some people prefer to install binary files and man pages separately. If this is270 your wish, the binary files can be installed by executing:271 <screen>272 &rootprompt; <userinput>make installbin</userinput>273 </screen>274 The man pages can be installed using this command:275 <screen>276 &rootprompt; <userinput>make installman</userinput>277 </screen>278 </para>279 280 <para>281 Note that if you are upgrading from a previous version of Samba the old282 versions of the binaries will be renamed with an <quote>.old</quote> extension.283 You can go back to the previous version by executing:284 <screen>285 &rootprompt; <userinput>make revert</userinput>286 </screen>287 As you can see from this, building and installing Samba does not need to288 result in disaster!289 </para>290 291 292 151 <sect2> 293 152 <title>Compiling Samba with Active Directory Support</title> … … 319 178 <para> 320 179 After you run configure, make sure that the 321 <filename> include/config.h</filename> it generates contain lines like this:180 <filename>bin/default/include/config.h</filename> it generates contain lines like this: 322 181 <programlisting> 323 182 #define HAVE_KRB5 1 … … 328 187 <para> 329 188 If it does not, configure did not find your KRB5 libraries or 330 your LDAP libraries. Look in <filename> config.log</filename> to figure189 your LDAP libraries. Look in <filename>bin/config.log</filename> to figure 331 190 out why and fix it. 332 191 </para> … … 409 268 410 269 <sect2> 411 <title>Starting from inetd.conf</title> 412 413 <indexterm><primary>inetd</primary></indexterm> 414 415 <note> 416 <para>The following will be different if 417 you use NIS, NIS+, or LDAP to distribute services maps.</para> 418 </note> 419 420 <para>Look at your <filename>/etc/services</filename>. 421 What is defined at port 139/tcp? If nothing is defined, 422 then add a line like this:</para> 423 424 <para><programlisting>netbios-ssn 139/tcp</programlisting></para> 425 426 <para>Similarly for 137/udp, you should have an entry like:</para> 427 428 <para><programlisting>netbios-ns 137/udp</programlisting></para> 429 430 <para> 431 Next, edit your <filename>/etc/inetd.conf</filename> and add two lines like this: 432 <programlisting> 433 netbios-ssn stream tcp nowait root /usr/local/samba/sbin/smbd smbd 434 netbios-ns dgram udp wait root /usr/local/samba/sbin/nmbd nmbd 435 </programlisting> 436 </para> 437 438 <indexterm><primary>/etc/inetd.conf</primary></indexterm> 439 <para> 440 The exact syntax of <filename>/etc/inetd.conf</filename> 441 varies between UNIXes. Look at the other entries in inetd.conf 442 for a guide. 443 </para> 444 445 <para> 446 <indexterm><primary>xinetd</primary></indexterm> 447 Some distributions use xinetd instead of inetd. Consult the 448 xinetd manual for configuration information. 449 </para> 450 451 <note><para>Some UNIXes already have entries like netbios_ns 452 (note the underscore) in <filename>/etc/services</filename>. 453 You must edit <filename>/etc/services</filename> or 454 <filename>/etc/inetd.conf</filename> to make them consistent. 455 </para></note> 456 457 <note><para> 458 <indexterm><primary>ifconfig</primary></indexterm> 459 On many systems you may need to use the 460 <smbconfoption name="interfaces"/> option in &smb.conf; to specify 461 the IP address and netmask of your interfaces. Run 462 <application>ifconfig</application> as root if you do 463 not know what the broadcast is for your net. &nmbd; tries 464 to determine it at runtime, but fails on some UNIXes. 465 </para></note> 466 467 <warning><para> 468 Many UNIXes only accept around five parameters on the command 469 line in <filename>inetd.conf</filename>. This means you shouldn't 470 use spaces between the options and arguments, or you should use 471 a script and start the script from <command>inetd</command>. 472 </para></warning> 473 474 <para> 475 Restart <application>inetd</application>, perhaps just send it a HUP, 476 like this: 477 <indexterm><primary>killall</primary></indexterm> 478 <screen> 479 &rootprompt;<userinput>killall -HUP inetd</userinput> 480 </screen> 481 </para> 482 483 </sect2> 484 485 <sect2> 486 <title>Alternative: Starting &smbd; as a Daemon</title> 270 <title>Starting &smbd; as a Daemon</title> 487 271 488 272 <para> … … 521 305 <sect3> 522 306 <title>Starting Samba for Red Hat Linux</title> 523 524 <para>525 Red Hat Linux has not always included all Samba components in the standard installation.526 So versions of Red Hat Linux do not install the winbind utility, even though it is present527 on the installation CDROM media. Check to see if the <command>winbindd</command> is present528 on the system:529 <screen>530 &rootprompt; ls /usr/sbin/winbindd531 /usr/sbin/winbindd532 </screen>533 This means that the appropriate RPM package was installed. The following response means534 that it is not installed:535 <screen>536 /bin/ls: /usr/sbin/winbind: No such file or directory537 </screen>538 In this case, it should be installed if you intend to use <command>winbindd</command>. Search539 the CDROM installation media for the samba-winbind RPM and install it following Red Hat540 guidelines.541 </para>542 543 307 <para> 544 308 The process for starting Samba will now be outlined. Be sure to configure Samba's &smb.conf;
Note:
See TracChangeset
for help on using the changeset viewer.