configuring ftp and nfs on free bsd

I have just installed freebsd on one of my computer in my apartment< Which IO intend to turn into a file and local mail server for my network.

How does one install the ftp deamon in bsd.

How does one configure nfs for shareing dfiles betwenn FreeBSD, Ubuntu (linux) and Mac OsX Leopard? Or should i just install appletalk?

Is there a way to allow all the hosts on a network to access the an export in nfs on freebsd?

If you are just looking for a server for multimedia or files for your apartment, you might look at FreeNAS, based on FreeBSD, but more suitable for those not well-versed in FreeBSD. It is a very good and small server, compatible with Windows and other systems. www.freenas.org. It will turn any old computer into a Network Attached Storage unit with minimal fuss and has a nice GUI to help you set it up properly.

However, to activate nfs on your FreeBSD system, you must edit your /etc/rc.conf file to enable nfs by adding the lines

nfs_server_enable="YES"

To enable it also as an nfs client, add

nfs_client_enable="YES"

WARNING: ANY TIME YOU EDIT THE /etc/rc.conf FILE YOU MUST ENSURE YOU ENTERED EVERYTHING EXACTLY RIGHT OR YOUR MACHINE WILL NOT BOOT THE NEXT TIME YOU TRY. IF IT DOES NOT WORK, BOOT IN TO THE SINGLE-USER MODE AND EDIT THE RC.CONF FILE TO CORRECT THE ERROR, THEN TRY AGAIN.

Now you need to go to your /etc/exports file and add the directories you want to export to your nfs client machines by adding a line for each client. Follow the examples provided in the /etc/exports file.

For ftp, enable it by editing your /etc/inetd.conf file.

You can also enter the line command:

sysinstall

and it will take you to the FreeBSD installer, where you will see several useful options for post-install changes to your system. I believe there is an option for enabling various options, like nfs and ftp (through the inetd daemon).

I think that's it, but there might be more. I like to use the openware application "PuTTy" for my ftp transfers, but nfs works well as-is between FreeBSD machines.

I recommend you read the appropriate sections in the FreeBSD handbook (www.freebsd.org), as it is very well-written and understandable even for a novice (like me). I also found the book Absolute FreeBSD to be an excellent guide and reference, particularly for setting up and securing a server. It is also great for those who just want to use FreeBSD as a desktop OS.

Disclaimer: I am not currently on my BSD machine and don't have it available, but I think the above is all you need. Should get you started, but again, I recommend you spend time with the handbook.

Hope it helps.
Tony

I posted a reply to this, but somehow it went away. I'll try it again and try to recall what I said the first time.

First, if you are just wanting a server for your apartment, for files and multimedia, etc., I would recommend you look at FreeNAS (www.freenas.org), which is a very small server OS based on FreeBSD and perfect for a home Network Attached Storage system. You can turn just about any old computer, such as the one you just replaced last year (everyone has one) into a NAS. It has a nice GUI to help you set it up properly.

But, if you just want to learn FreeBSD, then I recommend you read the appropriate sections of the FreeBSD Handbook (www.freebsd.org). It is well-written and easy to understand. Another good guide is Absolute FreeBSD. I found it to be a good guide and reference. You local bookstore should have it.

Failing that, try this:

Go to the command line and type:

ee /etc/rc.conf

then add the following lines to the file:

nfs_server_enable="YES"
nfs_statd_enable="YES"
nfs_client_enable="YES" (add this line if you want your server to also be an nfs client)

Then you must go to your /etc/exports file and add a line for each client you want to have access to your server's directories. Follow the examples provided in the file.

ee /etc/exports

I'm doing this from memory, but I believe that's all for nfs. As for ftp, you will need to edit /etc/inetd.conf to enable it.

WARNING: MAKE SURE YOU GET EVERYTHING JUST RIGHT WHEN YOU EDIT /etc/rc.conf, BECAUSE YOUR MACHINE WON'T BOOT THE NEXT TIME IF THERE ARE ERRORS.

Also, I'm assuming you already have your LAN/wireless set up and connected to the Internet.

You can also type "sysinstall" at the command line and it will take you to the FreeBSD installer, where you will find various options for post-install configurations, such as nfs and ftp. Be careful.

Again, I strongly encourage you to read the appropriate sections in the handbook before you get too far.

Hope that helps,
Tony