Difficult samba3.6 source code installation in OEL6

Source: Internet
Author: User

 

Installing the samba3.6 source code package under OEL6 took nearly two days to complete the installation. I am very depressed. When I wrote this blog, samba3.6 install problem was very small on the internet. Only this URL is available.

Http://blog.csdn.net/xyp84/article/details/6830984 said the installation of some steps and problems, but my environment does not meet the situation of this brother, finally in Foreign Forums to see a piece of information to solve.

 

Let's talk about my installation process:

 

1. Download and decompress samba3.6

 

[Root @ heliy/home/fukeyun/Desktop/download/temp] # ls ../samba-3.6.0.tar.gz

../Samba-3.6.0.tar.gz

 

[Root @ heliy/home/fukeyun/Desktop/download/temp] # ls

 

 

 

Samba-3.6.0

 

 

 

2. Installation

 

# Cd./samba-3.6.0

 

[Root @ heliy/home/fukeyun/Desktop/download/temp/samba-3.6.0] # find.-name 'configure'

./Lib/tdb/configure

./Lib/replace/configure

./Lib/talloc/configure

./Lib/tevent/configure

./Source4/lib/ldb/configure

./Sourc4/ configure

 

[Root @ heliy/home/fukeyun/Desktop/download/temp/samba-3.6.0] # cd./soure3

 

[Root @ heliy/home/fukeyun/Desktop/download/temp/samba-3.6.0/soure3] #./autogen. sh

 

[Root @ heliy/home/fukeyun/Desktop/download/temp/samba-3.6.0/soure3] #./autogen. sh

./Autogen. sh: running script/mkversion. sh

./Script/mkversion. sh: 'include/version. H' created for Samba ("3.6.0 ")

./Autogen. sh: running autoheader-Im4-I ../m4-I ../lib/replace

./Autogen. sh: running autoconf-Im4-I ../m4-I ../lib/replace

Now run./configure (or./configure. developer) and then make.

 

Prompt after installation./configure

#./Configure # install it in/usr/local/samba by default. to install it in another path, add -- prefix =/path .. Or -- help to view details.

# Make

# Make install

It takes several minutes.

 

3. Configuration

Start the cp configuration file before starting the service. Otherwise, the following error occurs:

[Root @ heliy/usr/local/samba] # cat./var/log. smbd

[2011/10/26 04:56:37, 0] smbd/server. c: 1045 (main)

Smbd version 3.6.0 started.

Copyright Andrew Tridgell and the Samba Team 1992-2011

[2011/10/26 04:56:37, 0] smbd/server. c: 1060 (main)

Error opening config file

 

Copy the smb. conf file

[Root @ heliy/home/fukeyun/Desktop/download/temp/samba-3.6.0/soure3] # cp .. /examples/smb. conf. default/usr/local/samba/lib/smb. conf

# Vi/usr/local/samba/lib/smb. conf

 

For more information, see the attachment.

 

Start the service

 

Nmbd-D can be started, but smbd cannot.

 

View logs:

 

# Cat./var/log. smbd

The error is as follows:

 

Smbd version 3.6.0 started.

Copyright Andrew Tridgell and the Samba Team 1992-2011

/Usr/local/samba/sbin/smbd: symbol lookup error:/usr/local/samba/sbin/smbd: undefined symbol: wbcSidsToUnixIds

[2011/10/26 05:31:27, 0] smbd/server. c: 1045 (main)

 

 

I am depressed about this mistake in the last two days. The Foreign Forum has the following information:

 

========================================================== =

 

Guido Leenders 18:05:57 UTC

 

I had the same problem when compiling Samba 3.6.0 from source.

In the log. smbd it said: undefined symbol wbcSidsToUnixIds for smbd.

 

Configure options:

 

./Configure -- prefix =/usr -- exec-prefix =/usr -- with-ldap -- with-libtalloc = no

-- Enable-external-libtalloc = no -- with-libtdb = no -- enable-external-libtdb = no

-- With-libnetapi -- with-libsmbclient -- with-libsmb1_modes -- with-libaddns

-- With-ads -- with-dnsupdate -- with-pam -- with-acl-support -- with-aio-support

-- With-winbind -- with-lockdir =/var/lib/samba -- with-configdir =/etc/samba

-- With-logfilebase =/var/log/samba

 

The installation did install libwbclient:

Installing module pam_smbpass as // usr/lib/security/pam_smbpass.so

Installing module pam_winbind as // usr/lib/security/pam_winbind.so

/Usr/bin/install-c bin/libwbclient. so.0 // usr/lib

If test-r bin/libwbclient. so.0; then \

Ln-f-s 'basename bin/libwbclient. so.0 '\

// Usr/lib/'basename bin/libwbclient. so ';\

Fi

: Bin/libwbclient. a // usr/lib

/Usr/bin/install-c-m 0644

/Usr/local/src/samba-3.6.0/soure3/../nsswitch/libwbclient/wbclient. h

// Usr/include

 

 

Resolution for me was simply:

 

Ldconfig

 

And restart smbd.

 

Rgds,

Www.2cto.com

Guido Leenders

==========================================================

 

Obviously, it is a libwbclient. so library file problem.

 

[Root @ heliy/home/fukeyun/Desktop/download/temp/samba-3.6.0/soure3] #/usr/bin/install-c. /bin/libwbclient. so.0/usr/lib

Restart the service

 

Smbd-D and nmbd-D

 

[Root @ heliy/usr/local/samba] # ps-ef | grep 'mbd'

Root 31681 1 0 05:49? 00:00:00./sbin/smbd-D

Root 31682 31681 0? 00:00:00./sbin/smbd-D

Root 31720 1 0 05:51? 00:00:00./sbin/nmbd-D

Root 32149 2828 0 00:00:00 pts/0 grep mbd

 

If samba is set up, it is a big mistake. Because some rpm packages of samba are installed when gnome-desktop is installed by default, the command in the global environment is not a source code package, such as smbpasswd.

 

When you use the which smbpasswd command, testparm is obviously not the command in/usr/local/samba/bin.

 

Smb. the conf file is/etc/samba/smb. conf, so now I understand that there are only two correct ways to install samba: 1. Use the RPM package of the system disk or download the RPM installation. You do not need to uninstall the installed samba rpm package. 2. You 'd better uninstall the samba rpm package before using the source code package. I will introduce the following methods:

 

Delete rpm package

 

[Root @ heliy/usr/local/samba] # rpm-aq | grep-I 'samba'

Samba-common-3.5.4-68.el6.i686

Samba-winbind-clients-3.5.4-68.el6.i686

Samba-client-3.5.4-68.el6.i686

[Root @ heliy/usr/local/samba] # rpm-e samba-client-3.5.4-68.el6.i686

[Root @ heliy/usr/local/samba] # rpm-e samba-common-3.5.4-68.el6.i686

 

Install samba as previously written ,. /configure make install, therefore, you need to delete the previous installation make uninstall and then delete some directories [root @ heliy/usr/local/samba] # rm-fR/etc/samba/

[Root @ heliy/usr/local/samba] # rm-fR/usr/local/samba/

[Root @ heliy/usr/local/samba] # rm-fR/var/log/samba/

[Root @ heliy/usr/local/samba] # rm-fR/var/lib/samba /)

 

Cp smb. conf and configuration, above

 

Set Global Environment Variables

 

[Root @ heliy/usr/local/samba] # vi/etc/profile. d/heliy. sh

 

Export PATH = $ PATH:/usr/local/samba/bin/

 

[Root @ heliy/usr/local/samba] # source/etc/profile. d/heliy. sh

Root @ heliy/usr/local/samba] # env | grep 'path'

PATH =/usr/lib/qt-3.3/bin:/usr/local/bin:...:/usr/local/samba/bin/

 

Here is a small achievement: I opened two terminals and I used source/etc/profile. d/heliy. sh, the terminal can obtain the path after the global variable is changed, and the other cannot. For example, if you enter smb and press the TAB key, the first terminal can display many commands, and the second terminal won't, you must disable the new feature.

 

Set User

 

# Smbpasswd-a fukeyun

 

# Smbpasswd-e fukeyun

 

Start the smbd-D nmbd-D Service and the error message before this blog will not appear.

 

Finally, log on as follows:

 

[Root @ heliy/home/fukeyun] # smbclient-L // localhost/myshare-U fukeyun

Enter fukeyun's password:

Domain = [WORKGROUP] OS = [Unix] Server = [Samba 3.6.0]

 

Sharename Type Comment

--------------------

Error returning browse list: NT_STATUS_CONNECTION_INVALID

Domain = [WORKGROUP] OS = [Unix] Server = [Samba 3.6.0]

 

Server Comment

----------------

HELIY Samba Server

 

Workgroup Master

----------------

WORKGROUP HELIY

[Root @ heliy/home/fukeyun] #

 

I will continue to add technical information about samba in this blog.

 

This article is from the blog "Ke Yun home-Xin Meng wuying ".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.