Difference between revisions of "Samba for AIX"

From SambaWiki
m (Bjacke moved page AIX building samba to Samba for AIX: this page should contain generic information and links for AIX samba)
(hints and links for Samba in AIX)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== How to install samba-4.1.16 on aix-6.1 ==
+
= How to get Samba running on AIX =
   
  +
You can either compile Samba yourself or install precompiled Samba packages from third party vendors.
Joost van Baal-Ilić, credativ BV, february 2015
 
   
  +
== Install Samba from source ==
Based upon instructions by Noël Köthe, credativ GmbH, sept 2014.
 
   
  +
For various reasons getting Samba built on AIX can be a bit challenging. It is recommended to compile Samba with the native xlc compiler from IBM, you will need to install also a number of other third party packages first, which also depends on the features that you want to compile into your Samba binary.
We describe how to build, configure, pack/unpack and install Samba --the Open Source SMB/CIFS file, print, and login server for Unix-- version 4.1.16 on a PowerPC running IBM's AIX 6.1.
 
   
=== Building and installing ===
+
== Install Samba binary packages ==
   
  +
Much easier than compiling Samba on AIX on your own is using pre-built binary packages from third party vendors:
* Install the IBM compiler xlc version 13.1.0. (Compiling with gcc won't work, see https://bugzilla.samba.org/show_bug.cgi?id=10828 .)
 
* Install python + dependencies; since Samba uses python for its build system. Likely these RPMs suffice:
 
   
  +
* [https://www.bullfreeware.com Bull Freeware] has a lot of RPM based AIX packages, also Samba for AIX 6
<pre>
 
bash-4.2-12.aix5.1.ppc.rpm
 
bzip2-1.0.6-1.aix5.1.ppc.rpm
 
db4-4.7.25-2.aix5.1.ppc.rpm
 
expat-2.1.0-1.aix5.1.ppc.rpm
 
fontconfig-2.10.2-1.aix5.1.ppc.rpm
 
freetype2-2.5.2-1.aix5.1.ppc.rpm
 
gdbm-1.11-1.aix5.1.ppc.rpm
 
gettext-0.17-1.aix5.1.ppc.rpm
 
glib2-2.38.2-1.aix5.1.ppc.rpm
 
gmp-5.1.3-1.aix5.1.ppc.rpm
 
info-5.2-1.aix5.1.ppc.rpm
 
libXft-2.3.1-1.aix5.1.ppc.rpm
 
libXrender-0.9.8-1.aix6.1.ppc.rpm
 
libgcc-4.8.2-1.aix7.1.ppc.rpm
 
libiconv-1.14-2.aix5.1.ppc.rpm
 
libpng-1.6.9-1.aix5.1.ppc.rpm
 
libstdc++-4.8.2-1.aix7.1.ppc.rpm
 
libstdc++-devel-4.8.2-1.aix7.1.ppc.rpm
 
pkg-config-0.28-1.aix5.1.ppc.rpm
 
python-2.7.5-1.aix6.1.ppc.rpm
 
python-devel-2.7.5-1.aix6.1.ppc.rpm
 
python-libs-2.7.5-1.aix6.1.ppc.rpm
 
readline-6.2-5.aix5.1.ppc.rpm
 
renderproto-0.11.1-1.aix5.1.ppc.rpm
 
sqlite-3.8.1-1.aix5.1.ppc.rpm
 
tcl-8.5.15-1.aix5.1.ppc.rpm
 
tk-8.5.15-1.aix5.1.ppc.rpm
 
zlib-1.2.8-1.aix5.1.ppc.rpm
 
</pre>
 
   
  +
* [https://samba.plus/de/samba-aix/ SAMBA+ for AIX] is a commercially supported Samba distribution for AIX 7 from SerNet
Install them by running:
 
 
# rpm -ivh * --nodeps
 
 
* In a directory with enough space (ideally _not_ under the install root /appl/samba), unpack the samba sources
 
 
# gunzip samba-4.1.17.tar.gz && tar -xf samba-4.1.17.tar && cd samba-4.1.17
 
 
* Build and install
 
 
# export PATH=$PATH:/opt/IBM/xlC/13.1.0/bin/
 
 
# ./configure --prefix=/appl/samba --check-c-compiler=xlc
 
[...]
 
'configure' finished successfully
 
 
# make
 
[...]
 
Compiling ...
 
Linking ...
 
'build' finished successfully
 
 
# make install
 
[...]
 
'install finished successfully'
 
 
* Fix missing symlinks to .so-files [1]:
 
 
# cd /appl/samba/lib/private/
 
# ls | grep "so\.[0-9]$" | while read f; do ln -s $f ${f%.?}; done
 
# ls | grep "so\.[0-9][0-9]$" | while read f; do ln -s $f ${f%.??}; done
 
 
See also http://bugzilla.samba.org/show_bug.cgi?id=10840 NB: this is NOT the same as Noël's script!
 
 
* Add a configuration file:
 
 
# vi /appl/samba/etc/smb.conf
 
 
This one works for tests:
 
 
<pre>
 
[global]
 
workgroup = SIM
 
netbios name = SERVERNAME
 
server string = Fileserver
 
security = user
 
;interfaces = en 192.168.1.2/24
 
;bind interfaces ony = yes
 
 
log level = 2
 
log file = /appl/samba/logs/log.%m
 
syslog = 0
 
 
[SHARE]
 
comment = production share
 
path = /LOCAL/EXISTING/PATH/OF/A/SHARE
 
read only = no
 
;create mask = 0775
 
directory mask = 775
 
;valid user =
 
;force user =
 
;force group =
 
</pre>
 
 
See also samba-4.1.16/examples/smb.conf.default .
 
 
=== Testing ===
 
 
In order to run the samba binaries, set this:
 
 
# export LIBPATH=/appl/samba/lib:/appl/samba/lib/private
 
 
Start the Samba daemon:
 
 
# /appl/samba/sbin/smbd -D
 
 
Test samba:
 
 
# /appl/samba/bin/smbclient -L localhost
 
 
Add a samba user, and give this user a samba password, for more testing:
 
 
# /appl/samba/bin/smbpasswd -a <localunixusername>
 
[...]
 
"Added user [...]
 
 
Test a user login:
 
 
# /appl/samba/bin/smbclient -U <username> //localhost/INTERFACES
 
smb: \> ls
 
[...]
 
smb: \> cd .snapshot
 
smb: \.snapshot\> ls
 
[...]
 
 
Show the connected clients
 
 
# smbstatus
 
 
== Installing on another AIX 6 system ==
 
 
Create a tar archive of /appl/samba to copy /appl/samba to the other machine.
 
(NB: tar as shipped with AIX does not support the z-flag. Manually g(un)zip the .tar if needed.)
 
After unpacking this file there, and creating /appl/samba/etc/smb.conf, one can start smbd:
 
 
# export LIBPATH=/appl/samba/lib:/appl/samba/lib/private
 
# /appl/samba/sbin/smbd -D
 
 
No need to run ./configure or make, no need to install xlc. You _do_ need Python to run Samba.
 
 
 
[1] When these symlinks are not created, trying to run smbclient will give
 
an error 'Cannot load module libtevent.so.'
 

Latest revision as of 15:28, 23 May 2019

How to get Samba running on AIX

You can either compile Samba yourself or install precompiled Samba packages from third party vendors.

Install Samba from source

For various reasons getting Samba built on AIX can be a bit challenging. It is recommended to compile Samba with the native xlc compiler from IBM, you will need to install also a number of other third party packages first, which also depends on the features that you want to compile into your Samba binary.

Install Samba binary packages

Much easier than compiling Samba on AIX on your own is using pre-built binary packages from third party vendors:

  • Bull Freeware has a lot of RPM based AIX packages, also Samba for AIX 6
  • SAMBA+ for AIX is a commercially supported Samba distribution for AIX 7 from SerNet