Difference between revisions of "AFP"

From Amahi Wiki
Jump to: navigation, search
m
Line 4: Line 4:
 
NOTE: THIS IS NOT MEANT FOR PEOPLE WHO DONT KNOW WHAT THEY ARE DOING.
 
NOTE: THIS IS NOT MEANT FOR PEOPLE WHO DONT KNOW WHAT THEY ARE DOING.
  
== Installation of netatalk into Amahi ==
+
>== Installation of netatalk into Amahi ==
 
* Open a terminal either on the desktop or SSH
 
* Open a terminal either on the desktop or SSH
 
* Become root (sudo -s or su -)
 
* Become root (sudo -s or su -)
 
* yum -y install netatalk
 
* yum -y install netatalk
 
* edit /etc/atalk/afpd.conf
 
* edit /etc/atalk/afpd.conf
<code>- -noddp -tcp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh</code>
+
&lt;code&gt;- -noddp -tcp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh&lt;/code&gt;
*edit /etc/atalk/netatalk.conf <code>
+
*edit /etc/atalk/netatalk.conf &lt;code&gt;
ATALKD_RUN=no<br>
+
ATALKD_RUN=no&lt;br&gt;
PAPD_RUN=no<br>
+
PAPD_RUN=no&lt;br&gt;
CNID_METAD_RUN=yes<br>
+
CNID_METAD_RUN=yes&lt;br&gt;
AFPD_RUN=yes<br>
+
AFPD_RUN=yes&lt;br&gt;
TIMELORD_RUN=no<br>
+
TIMELORD_RUN=no&lt;br&gt;
A2BOOT_RUN=no</code>
+
A2BOOT_RUN=no&lt;/code&gt;
 
* Once the app is installed you can add the folders you wish to share over AFP by editing the /etc/atalk/AppleVolumes.default file:
 
* Once the app is installed you can add the folders you wish to share over AFP by editing the /etc/atalk/AppleVolumes.default file:
<code>~/ "$u" allow:UserName rwlist:UserName,@users cnidscheme:cdb</code>
+
&lt;code&gt;~/ &quot;$u&quot; allow:UserName rwlist:UserName,@users cnidscheme:cdb&lt;/code&gt;
 
Change UserName to your username, this will share your homefolder over afp
 
Change UserName to your username, this will share your homefolder over afp
 
* chkconfig atalk on
 
* chkconfig atalk on
 
* service atalk start
 
* service atalk start
 +
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://ofysuzusys.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
 +
----
 +
=[http://ofysuzusys.co.cc CLICK HERE]=
 +
----
 +
</div>
  
 
== Installation of avahi into Amahi ==
 
== Installation of avahi into Amahi ==

Revision as of 21:54, 17 November 2010

The Apple Filing Protocol (AFP) is a network protocol that offers file services for Mac OS X and original Mac OS. Avahi is an open source implementation of Bonjour or former Rendezvous wich advertises servers to MacOS X.

NOTE: THIS IS NOT MEANT FOR PEOPLE WHO DONT KNOW WHAT THEY ARE DOING.

>== Installation of netatalk into Amahi ==

  • Open a terminal either on the desktop or SSH
  • Become root (sudo -s or su -)
  • yum -y install netatalk
  • edit /etc/atalk/afpd.conf

<code>- -noddp -tcp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh</code>

  • edit /etc/atalk/netatalk.conf <code>

ATALKD_RUN=no<br> PAPD_RUN=no<br> CNID_METAD_RUN=yes<br> AFPD_RUN=yes<br> TIMELORD_RUN=no<br> A2BOOT_RUN=no</code>

  • Once the app is installed you can add the folders you wish to share over AFP by editing the /etc/atalk/AppleVolumes.default file:

<code>~/ "$u" allow:UserName rwlist:UserName,@users cnidscheme:cdb</code> Change UserName to your username, this will share your homefolder over afp

  • chkconfig atalk on
  • service atalk start

Installation of avahi into Amahi

  • Open a terminal either on the desktop or SSH
  • Become root (sudo -s or su -)
  • yum -y install avahi
  • go to /etc/avahi/services/
  • add the afpd.service file:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h Xserve</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>

%h Xserve can be changed to your server name (not the same as your samba server!) model=Xserve can be changed to get a different icon for your server to PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, AppleTV1,1, AirPort

  • Additionally you can make avahi advertise other services on your mac

rfb.service for screensharing without chickenvnc

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_rfb._tcp</type>
<port>5900</port>
</service>
</service-group>

samba.service so the bsod icon is replaced with a nice screen icon and is on the same server as vnc/screensharing

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>139</port>
</service>
</service-group>

there is also a nfs.service but havent been able to get this to work on snow leopard

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">NFS Shares on %h</name>
<service>

      <type>_nfs._tcp</type>
<port>2049</port>
<txt-record>path=/var/hda/files/music</txt-record>

</service>
<service>

       <type>_nfs._tcp</type>
<port>2049</port>
<txt-record>path=/var/hda/files/movies</txt-record>

</service>
</service-group>

Thanks to this great tutorial for ubuntu !!

  • Add mdns at the end of this line in /etc/nsswitch.conf

hosts: files dns mdns

  • Starting and stopping AFP and Avahi :

service atalk (start stop restart) service avahi-daemon (start stop restart)


TODO

Integrate AFP and avahi with the Shares tab of the WebUI just as tightly as Samba is.