Advertisement
princeofisles

Install samba from source

Oct 14th, 2011
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.76 KB | None | 0 0
  1. #Install Latest Samba (Compile from Source)
  2. svn co svn://svnanon.samba.org/samba/trunk samba
  3.  
  4. #Verifying Samba PGP Signature
  5. #------------------------------
  6. wget http://us1.samba.org/samba/ftp/samba-3.0.20.tar.asc
  7. wget http://us1.samba.org/samba/ftp/samba-pubkey.asc
  8. gpg --import samba-pubkey.asc
  9.  
  10. #and verify the Samba source code integrity with:
  11. #--------------------------------------------------
  12.  
  13. gzip -d samba-3.0.20.tar.gz
  14. gpg --verify samba-3.0.20.tar.asc
  15.  
  16. #Building the Binaries
  17. #------------------------
  18. cd samba-3.0.20/source
  19. sudo ./autogen.sh
  20. sudo ./configure --help
  21. sudo ./configure [... arguments ...]
  22. make
  23. make install
  24. make installbin
  25. make revert
  26.  
  27. #Starting from inetd.conf
  28. #Note:The following will be different if you use NIS, NIS+, or LDAP to distribute services maps.
  29.  
  30. #Look at your /etc/services. What is defined at port 139/tcp? If nothing is defined, then add a line #like this:
  31.  
  32. #netbios-ssn     139/tcp
  33.  
  34. #Similarly for 137/udp, you should have an entry like:
  35.  
  36. #netbios-ns 137/udp
  37.  
  38. #Next, edit your /etc/inetd.conf and add two lines like this:
  39.  
  40. #netbios-ssn stream tcp nowait root /usr/local/samba/sbin/smbd smbd
  41. #netbios-ns dgram udp wait root /usr/local/samba/sbin/nmbd nmbd
  42.  
  43. Restart inetd, perhaps just send it a HUP, like this:
  44.  
  45. #Restart inetd
  46. killall -HUP inetd
  47.  
  48. #Alternative: Starting smbd as a Daemon
  49.  
  50. ##To start the server as a daemon, you should create a script something like this one, perhaps calling #it startsmb.
  51.  
  52. #!/bin/sh
  53. /usr/local/samba/sbin/smbd -D
  54. /usr/local/samba/sbin/winbindd -D
  55. /usr/local/samba/sbin/nmbd -D
  56.  
  57. ##Make it executable with chmod +x startsmb.
  58.  
  59. #You can then run startsmb by hand or execute it from /etc/rc.local.
  60.  
  61. #To kill it, send a kill signal to the processes nmbd and smbd.
  62.  
  63.  
  64.  
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement