LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-21-2005, 09:27 PM   #1
susje
LQ Newbie
 
Registered: Dec 2004
Posts: 17

Rep: Reputation: 0
Compile Samba by myself


Don't know if I sound silly, I downloaded samba tar.gz file from samba.org and compile the source code by myself. Things are done. There is no error message. How can I verify I have installed it successfully?

I'm using Fedora and in rpm it still reports samba-3.0.7. Is there a way to update rpm database? Or I should have not compiled the source code by myself in the first place? I sound so ...... I am.
 
Old 03-21-2005, 10:16 PM   #2
kryptonite0110
Member
 
Registered: Mar 2005
Posts: 59

Rep: Reputation: 15
uhhh.... i *THINK* you should have installed it from an rpm using rpm -U option, or somthing along the lines of that... but you should get a program like yum or apt to figure all the dependencies for you... this'll keep you from trying to reinvent the wheel, but i'm new too... so what do i know?
 
Old 03-21-2005, 10:28 PM   #3
miguel102383
LQ Newbie
 
Registered: Mar 2005
Location: San Antonio, Texas
Posts: 5

Rep: Reputation: 0
using an rpm based distro, it is always better to install software with rpms.
try this site.
then just do a "yum install samba" to install the samba server.
thats how i installed samba and i didn't have a single problem with dependencies
 
Old 03-21-2005, 10:36 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
i think in the future try to tell us exactly what commands you run so we can understand what you have done
it's gona be kind of dificult for a gnuuby to do but not impossible you just have to think a bit

what you are trying to do is overwrite the samba you have now
it would be better to uninstall it first (the rpm) before you create your own
distributions have thier own way of doing things and trying to recreate that to overwrite will be too hard.

next if you decide you need to do away with what you just did and you did make install go to the build directory you just used and do "make uninstall"
delete the build directory and untar the source again for a clean start

first thing to think about is what functionality you need samba to have.
does it need to support cups, xinetd, pam, python, Kerberos, Stunnel to encrypt swat passwords,
ldap, sql, or whatever else

then run ./configure --help
and study the output to see what is enabled by default and what needs configure switches
then make sure you have the developement packages installed or you installed from source all the packages you need samba to build against.

next is time to think about where the built components will go
is you samba config in /etc/samba or the default /usr/etc/samba where is samba cache ? in /var/cache/samba or the default /usr/var (you will have to make the cache dir by hand if you don't use the old one)
where do you want the executable /usr/sbin or the default /usr/local/sbin (might have to adjust PATH or change a boot script)

where do you want the libs to be ?
you will have to make link to the libs in a default spot
or add to /etc/ld.so.conf if they are out of conventional place

now create you configure command
and make
make install

samba does not install the nss libraries by default you will have to do yourself if you need pam or wins server or winbind
install -m755 nsswitch/whatever.so /lib
then set up swat
and the headers and .a file don't get the right permissions so chmod 644 them

Last edited by foo_bar_foo; 03-21-2005 at 10:40 PM.
 
Old 03-21-2005, 10:37 PM   #5
susje
LQ Newbie
 
Registered: Dec 2004
Posts: 17

Original Poster
Rep: Reputation: 0
We are both new, so nice to meet you kryptonite0110.

I'm using Fedora I. I have updated the file /etc/yum.conf as the Fedora Wiki page mentioned. After I did a full update on my box my samba version was 3.0.7. But I was experiencing problems when I tried to transfer files between my window box; samba connections would hang in the middle of the transaction often and I lost connections like ssh to my linux box. I tried configuring smb.conf as the website suggested but it didn't help either.

So I decided to upgrade samba from samba.org and see if the newer version will help. But now I don't even know what to do next. The installation seems successful. But I don't know how to verify and how to configure my box to run the new version instead of the old one....

does "chkconfig smb on" will already do the job? I'm afraid I'm still using the old one since I haven't "uninstall" it.....
 
Old 03-21-2005, 10:54 PM   #6
susje
LQ Newbie
 
Registered: Dec 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Sorry foo_bar_foo, I missed your message while replying to kryptonite0110...

> i think in the future try to tell us exactly what commands you run so we can understand what you have done
it's gona be kind of dificult for a gnuuby to do but not impossible you just have to think a bit

Ok I will try to more specific next time. Thanks for being patient.

> it would be better to uninstall it first (the rpm) before you create your own
distributions have thier own way of doing things and trying to recreate that to overwrite will be too hard.
> next if you decide you need to do away with what you just did and you did make install go to the build directory you just used and do "make uninstall"

So basically I should uninstall samba-3.0.7 using rpm and "undo" what I have done for samba-3.0.12 right? That I should able to handle it.

> does it need to support cups, xinetd, pam, python, Kerberos, Stunnel to encrypt swat passwords,
ldap, sql

I don't need printer support. It's not necessary to have encryption, but it would be great for learning and it won't hurt to have it right? I installed OpenSSH so I can ssh to my box. So do you mean I already have stunnel installed and I only need to configure samba to use it? Or i'm simply mixing things up because Kerberos and Stunnel come with Samba?

...

Sorry I need to go for the moment....will continue to reply after I'm back for lunch. Thanks for the help though. I love this site.
 
Old 03-22-2005, 01:25 AM   #7
susje
LQ Newbie
 
Registered: Dec 2004
Posts: 17

Original Poster
Rep: Reputation: 0
I have read the ./configure --help carefully and decide to use default directories and install pam by

./configure --with-pam --with-pam_smbpass

then I did

# make
# make install

I'm not too sure what's nsswitch even I did a quick google. Since it looks important, after compilation was successful I did:

# install -m 755 pam_winbind.so /lib
# install -m 755 libnss_wins.so /lib
# install -m 755 libnss_winbind.so /lib

I know how to set up swat since I did it before.
I don't know what do you mean by "the headers and .a file....". Where are these files?

And at this point I'm stuck. I couldn't find the "smb.conf" either in '/etc/samba/' or '/usr/local/samba/lib/'. Do I simply copy '/tmp/samba-3.0.12/examples/smb.conf.default' to the default location '/usr/local/samba/lib/'?

How do I run the daemon nmbd and smbd? I found the files in '/usr/local/samba/sbin/', but commands ./nmbd or ./smbd gave me no response.
I ran "ps -aux | grep smbd" but it returned nothing....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM
Can't compile Samba 3.0.x in Slackware 9.1 tkrin Slackware 2 12-19-2003 08:17 PM
Compile Samba u4113072 Linux - General 1 09-27-2002 07:14 AM
Compile samba with acl-support grubjo Linux - Software 7 07-29-2002 10:44 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration