Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

31.3. Compile and optimize

Type the following commands on your terminal:
        CC="egcs" \
        ./configure \
        --prefix=/usr \
        --libdir=/etc \
        --with-lockdir=/var/lock/samba \
        --with-privatedir=/etc \
        --with-swatdir=/usr/share/swat \
        --with-pam \
        --with-mmap \
        --without-sambabook
      

Caution

The option --with-mmap can give a large performance boost on some machines, while on others it makes no difference at all, and on some it may reduce performance.

This tells Samba to set itself up for this particular hardware setup with:

  1. Include PAM password database support for better security.

  2. Include experimental MMAP support to improve Samba performance.

  3. Don't install the book help that come with Samba distribution.

Now, we must install Samba in the Linux server:
        [root@deep ] /source# make all
        [root@deep ] /source# make install
        [root@deep ] /source# install -m 755 script/mksmbpasswd.sh  /usr/bin/
        [root@deep ] /source# rm -rf /usr/share/swat/      (1)
        [root@deep ] /source# rm -f  /usr/sbin/swat
        [root@deep ] /source# rm -f  /usr/man/man8/swat.8
        [root@deep ] /source# mkdir -p /var/lock/samba
        [root@deep ] /source# mkdir -p /var/spool/samba    (2)
        [root@deep ] /source# chmod 1777 /var/spool/samba/ (3)
      

(1)
If like me, you don't like to configure Samba in HTML.
(2)
Only require if you are the intention to use printer sharing.
(3)
Only require if you are the intention to use printer sharing.

  • The install command will install the script mksmbpasswd.sh under /usr/bin/ directory. This script is needed to setup Samba users allowed to connect on our server via the smbpasswd file. See later in this documentation for how to setup and use Samba password.

  • The rm command will remove the /usr/share/swat directory and all the files under it, and it will also remove the swat binary program under /usr/sbin/. The SWAT program is a web-based configuration utility that permits you to configure the smb.conf file of Samba via a web browser interface. Of course, in order to use the SWAT utility you will need to have a web server running, such as Apache. The SWAT utility can open a security breach on your server and for this reason I recommend that you remove and not use it.

  • The mkdir command will create a /var/spool/samba/ directory on your system for all print sharing jobs you may have. Of course this directory is only necessary if you intend to use Samba print sharing over your LAN. Since we have not configured our Samba server to use print sharing, we do not need to create this directory, /var/spool/samba/ on our server, and we do not need to use the command chmod to change the sticky bit in /var/spool/samba so only the file's owner can delete a given file in this directory.

Please do cleanup later:
        [root@deep ] /# cd /var/tmp
        [root@deep ]/tmp# rm -rf samba-version/ samba-version.tar.gz
      
The rm command will remove all the source files we have used to compile and install Samba. It will also remove the Samba compressed archive from the /var/tmp directory.

 
 
  Published under the terms of the Open Publication License Design by Interspire