To avoid having trouble with SMB, I’m using netatalk to connect our Macs to the OpenSolaris server. It’s not that complicated, but not as easy as an “apt-get install netatalk”, so here are the steps you need to do, to install (and compile) netatalk onto your OpenSolaris server.
First, login with your regular user. We’re gonna use pfexec here.
We need to install some stuff to be able to compile the database & netatalk itself.
# pfexec pkg install SUNWgcc SUNWgmake SUNWxorg-headers SUNWGtk SUNWsfwhea
Once this is done, we need to download the database. You can download it using wget.
# wget http://download.oracle.com/berkeley-db/db-4.4.20.tar.gz
This will – depending on your internet connection – take a moment. / In case you don’t want to download the file (or can’t for any reason) on your server, you should download the file to your workstation and kick it into your $HOME directory using SCP.
Now, let’s create a source folder where we can extract our files into.
# mkdir -p $HOME/src
# pfexec crle -u -l /usr/local/lib
The second command is used to install the stuff into the right place.
Now it’s time to extract the files.
# cd $HOME/src
# gzcat $HOME/db-4.2.52.tar.gz | tar xf -
Great, let’s create a new folder…
# mkdir -p $HOME/src/db-build
# cd $HOME/src/db-build
…and configure the installation…
# ../db-4.2.52/dist/configure –prefix=/usr/local
You will notice a lot of text scrolling on your terminal. Once this is done, compile the installation.
# make
Oh dear! Even more text
At the end of this process we need to install it.
# pfexec make install
That was a quick one, right? Congratulation! Your database is now installed.
Let’s move on the the netatalk itself.
First, we need to get the stuff, download it again using wget (or on your workstation and transfer it via SCP). I’ll grab this one, but maybe at a later time, you want to get a more current version from here: http://sourceforge.net/projects/netatalk/files/netatalk/
# cd $HOME
# wget http://sourceforge.net/projects/netatalk/files/netatalk/2.0.5/netatalk-2.0.5….
Join the src folder again… and extract the netatalk files.
# cd src
# bzcat $HOME/netatalk-2.0.5.tar.bz2 | tar xf -
Be sure to enter the correct filename!
Time to configure the installation.
# cd netatalk-2.0.5
# ./configure –disable-ddp –without-pam
And again, make & pfexec make install are your friends on the way to a fully working netatalk on OpenSolaris.
# make
# pfexec make install
Well done!
The last thing we need to do is to edit some files. I would suggest to use
nano as editor. Of course you can use
vi, too
# pfexec nano /usr/local/etc/netatalk/afpd.conf
Simply scroll down to the end of the file and add the following:
- -transall -uamlist uams_dhx.so -nosavepassword
Save your file – if your editor complains, be sure that you’ve used the
pfexec command
# pfexec nano /usr/local/etc/netatalk/netatalk.conf
Look for ATALK_RUN= and be sure it’s set to no, also PAPD_RUN should be set to no
# Set which daemons to run (papd is dependent upon atalkd):
ATALKD_RUN=no
PAPD_RUN=no
Save again. The last file we need to edit is the configuration file for the shares.
# pfexec nano /usr/local/etc/netatalk/AppleVolumes.default
Again, scroll down to the very end of the page. You will see a ~ there. You need to overwrite this line with:
~ cnidscheme:cdb options:usedots,invisibledots,upriv perm:0770
The next line is very individual as it depends on your zpool and folder structure, so see it as an example and edit it as needed!
/storage “Storage” allow:@staff cnidscheme:cdb options:usedots,invisibledots,upriv perm:0770
I’ve installed my zpool as /storage in the root, and I want everyone on the network to be able to access all files on my 2.7TB share.
@staff means, that the users need to have an account on your OpenSolaris server!
To launch the netatalk server, launch the service with:
# pfexec /etc/init.d/atalk start
The very last step is to give your folder the correct user rights.
# pfexec chown -R dieta.staff /storage
Replace my username dieta with your own!
I hope you enjoyed this little tutorial and are now able to use your OpenSolaris server with your Mac clients in a for us “more natural way”
Anyway – this tutorial is based on
Marc’s Realm &
Caffeinated, so kudos to you guys and many thanks for sharing your knowledge!
Ciao
Dennis
P.S. You need to connect your Mac clients by hand to your server, as we haven’t installed the Avahi daemon (yet), so click the Finder icon on your desktop and press
CMD+K. Type
afp://<SERVER-IP> and you should be ready to use it
Constantin Gonzalez
Hi Dennis,thanks for the tutorial, this is very useful!You don’t need to install Avahi on OpenSolaris as it comes with an mDNS server already. See mdnsd(1M) and dns-sd(1M) for details. I use it to let mt-daapd advertise its iTunes sharing on the net and it works well with my Mac.For example, the command to advertise mt-daapd as an iTunes server is “dns-sd -R “Pajarito Music Server” _daap._tcp local. 3689 &”. I suppose you just need a similar command to do the same for Netatalk.Cheers, Constantin
Arne
Hey Dennis,i read some “i will get rid of any server” tweet from you, whats up with that ?
Dennis Klein
@Arne: It’s ehm… a file… storage… thing
@Constantin: Ah! Thanks for that hint. By the way: Where you able to run mt-daap native on OpenSolaris? If so – do you have a good description/how to/tutorial on that? I was about to set up a virtual Debian (again) and use this one. Thanks!
Constantin Gonzalez
Yes, mt-daapd works well on my server. I’m using the svn-1571 version which is reasonably bug free. There are some tweaks to observe when compiling that I documented a while ago: http://blogs.sun.com/constantin/entry/solaris_home_part_4_streamingSend me a mail if you can’t get it to compile and I’ll send you my binaries.There’s one little bug with my Soundbridge and this version of mt-daapd: If I select an artist, I then expect a list of albums by that artists. Instead, I’m getting a list of all albums on the server. It’s not enough of a hassle for me to get mad at it and it’s probably something I could resolve by looking at the code (and the SQL) for an afternoon or so, but since mt-daapd seems to be an abandoned project, I’m planning to look deeper into Squeezecenter as an alternative. Still, the native iTunes playlist support is nice, and I’m not sure other servers can really support it.
Chris Brown
To launch the netatalk server, launch the service with: # pfexec /etc/init.d/atalk starttypo: should be … netatalk start
Mora Holzheimer
I just discovered your blog yesterday and I have been reading it often. You have a lots of great info here and i also love the actual style of the web page as well. Keep up the great work!
Matt Connolly
For anyone looking at these instructions for a recent OpenSolaris/OpenIndiana and recent version of netatalk, the step of running “crle” is not required and should be avoided.