http:///https:///api.php?action=feedcontributions&user=Joostvb&feedformat=atomSambaWiki - User contributions [en]2024-03-28T20:59:46ZUser contributionsMediaWiki 1.39.5https://wiki.samba.org/index.php?title=Samba_for_AIX&diff=10009Samba for AIX2015-03-05T13:32:51Z<p>Joostvb: add some notes on creating tar archive of binary</p>
<hr />
<div>== How to install samba-4.1.16 on aix-6.1 ==<br />
<br />
Joost van Baal-Ilić, credativ BV, february 2015<br />
<br />
Based upon instructions by Noël Köthe, credativ GmbH, sept 2014.<br />
<br />
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.<br />
<br />
=== Building and installing ===<br />
<br />
* 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 .)<br />
* Install python + dependencies; since Samba uses python for its build system. Likely these RPMs suffice:<br />
<br />
<pre><br />
bash-4.2-12.aix5.1.ppc.rpm<br />
bzip2-1.0.6-1.aix5.1.ppc.rpm<br />
db4-4.7.25-2.aix5.1.ppc.rpm<br />
expat-2.1.0-1.aix5.1.ppc.rpm<br />
fontconfig-2.10.2-1.aix5.1.ppc.rpm<br />
freetype2-2.5.2-1.aix5.1.ppc.rpm<br />
gdbm-1.11-1.aix5.1.ppc.rpm<br />
gettext-0.17-1.aix5.1.ppc.rpm<br />
glib2-2.38.2-1.aix5.1.ppc.rpm<br />
gmp-5.1.3-1.aix5.1.ppc.rpm<br />
info-5.2-1.aix5.1.ppc.rpm<br />
libXft-2.3.1-1.aix5.1.ppc.rpm<br />
libXrender-0.9.8-1.aix6.1.ppc.rpm<br />
libgcc-4.8.2-1.aix7.1.ppc.rpm<br />
libiconv-1.14-2.aix5.1.ppc.rpm<br />
libpng-1.6.9-1.aix5.1.ppc.rpm<br />
libstdc++-4.8.2-1.aix7.1.ppc.rpm<br />
libstdc++-devel-4.8.2-1.aix7.1.ppc.rpm<br />
pkg-config-0.28-1.aix5.1.ppc.rpm<br />
python-2.7.5-1.aix6.1.ppc.rpm<br />
python-devel-2.7.5-1.aix6.1.ppc.rpm<br />
python-libs-2.7.5-1.aix6.1.ppc.rpm<br />
readline-6.2-5.aix5.1.ppc.rpm<br />
renderproto-0.11.1-1.aix5.1.ppc.rpm<br />
sqlite-3.8.1-1.aix5.1.ppc.rpm<br />
tcl-8.5.15-1.aix5.1.ppc.rpm<br />
tk-8.5.15-1.aix5.1.ppc.rpm<br />
zlib-1.2.8-1.aix5.1.ppc.rpm<br />
</pre><br />
<br />
Install them by running:<br />
<br />
# rpm -ivh * --nodeps<br />
<br />
* In a directory with enough space (ideally _not_ under the install root /appl/samba), unpack the samba sources<br />
<br />
# gunzip samba-4.1.16.tar.gz && tar -xf samba-4.1.16.tar && cd samba-4.1.16<br />
<br />
* Build and install<br />
<br />
# export PATH=$PATH:/opt/IBM/xlC/13.1.0/bin/<br />
<br />
# ./configure --prefix=/appl/samba --check-c-compiler=xlc<br />
[...]<br />
'configure' finished successfully<br />
<br />
# make<br />
[...]<br />
Compiling ...<br />
Linking ...<br />
'build' finished successfully<br />
<br />
# make install<br />
[...]<br />
'install finished successfully'<br />
<br />
* Fix missing symlinks to .so-files [1]:<br />
<br />
# cd /appl/samba/lib/private/<br />
# ls | grep "so\.[0-9]$" | while read f; do ln -s $f ${f%.?}; done<br />
# ls | grep "so\.[0-9][0-9]$" | while read f; do ln -s $f ${f%.??}; done<br />
<br />
See also http://bugzilla.samba.org/show_bug.cgi?id=1084 NB: this is NOT the same as Noël's script!<br />
<br />
* Add a configuration file:<br />
<br />
# vi /appl/samba/etc/smb.conf<br />
<br />
This one works for tests:<br />
<br />
<pre><br />
[global]<br />
workgroup = SIM<br />
netbios name = SERVERNAME<br />
server string = Fileserver<br />
security = user<br />
;interfaces = en 192.168.1.2/24<br />
;bind interfaces ony = yes<br />
<br />
log level = 2<br />
log file = /appl/samba/logs/log.%m<br />
syslog = 0<br />
<br />
[SHARE]<br />
comment = production share<br />
path = /LOCAL/EXISTING/PATH/OF/A/SHARE<br />
read only = no<br />
;create mask = 0775<br />
directory mask = 775<br />
;valid user =<br />
;force user =<br />
;force group =<br />
</pre> <br />
<br />
See also samba-4.1.16/examples/smb.conf.default .<br />
<br />
=== Testing ===<br />
<br />
In order to run the samba binaries, set this:<br />
<br />
# export LIBPATH=/appl/samba/lib:/appl/samba/lib/private<br />
<br />
Test samba:<br />
<br />
# /appl/samba/bin/smbclient -L localhost<br />
<br />
Add a samba user, and give this user a samba password, for more testing:<br />
<br />
# /appl/samba/bin/smbpasswd -a <localunixusername><br />
[...]<br />
"Added user [...]<br />
<br />
Start the Samba daemon:<br />
<br />
# /appl/samba/sbin/smbd -D<br />
<br />
Test a user login:<br />
<br />
# /appl/samba/bin/smbclient -U <username> //localhost/INTERFACES<br />
smb: \> ls<br />
[...]<br />
smb: \> cd .snapshot<br />
smb: \.snapshot\> ls<br />
[...]<br />
<br />
<br />
== Installing on another AIX 6 system ==<br />
<br />
Create a tar archive of /appl/samba to copy /appl/samba to the other machine.<br />
(NB: tar as shipped with AIX does not support the z-flag. Manually g(un)zip the .tar if needed.)<br />
After unpacking this file there, and creating /appl/samba/etc/smb.conf, one can start smbd:<br />
<br />
# export LIBPATH=/appl/samba/lib:/appl/samba/lib/private<br />
# /appl/samba/sbin/smbd -D<br />
<br />
No need to run ./configure or make, no need to install xlc. You _do_ need Python to run Samba.<br />
<br />
<br />
[1] When these symlinks are not created, trying to run smbclient will give<br />
an error 'Cannot load module libtevent.so.'</div>Joostvb