FreeBSD Servers

Discussion in 'General Mac Discussion' started by PaulSbird, Sep 6, 2004.

  1. PaulSbird macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #1
    I'm interested in setting up a FreeBSD file server for my home network and was wondering if anyone here has done anything similiar. I currently have a PC with WinXP home and a 20" iMac with a linksys router doling out IP's.
    Any suggestions are appreciated.

    Paul
     
  2. Porsche macrumors newbie

    Joined:
    Sep 7, 2003
    Location:
    Connecticut, USA
    #2
    I've done the exact same, only using Debian instead of FreeBSD. I have an old K6-2 with 256 MB RAM sitting in the computer room, doing web serving, FTP, SSH, backup...anything you can think of, it probably does it (flawlessly, I might add).

    What I would suggest is first, if you've never touched FreeBSD or any other hands-on UNIX system before, is to read at least some of this article and links. Once you've gotten a firm grasp on FreeBSD (or whatever you choose in the end), move on to more FAQs and articles, perhaps Apache's wonderful FAQ.

    Reading up on as much as you can and/or want to know about will really improve your success of the initially daunting task of setting up a server. Definitely read the "Read Me" files in any package you wish to install, as they will give you helpful usage tips. They're not simply copyright information or installation instructions like some Windows or Mac Read-Me's can be.

    Good luck, and have fun. You'll learn quite a bit. Post here again if you have any questions! :)
     
  3. PaulSbird thread starter macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #3
    Manuals of fun

    Ive been doing a lot of reading, but it's amazing how quickly it goes out the window! I am curious as to why you chose Debian. I'll post back here as I make some progress.

    Paul
     
  4. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #4
    I use it because of its easy of use once you learn to use it. I use SSH to do everything on it, from updates to editing config files. If you want something easier, with the ability to get a GUI easily, use Redhat or Mandrake. BSD is just as hard as Debian to learn and use.
     
  5. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #5
    Yep, it's a great way to get use out of otherwise obsolete PC hardware. I've still got a 1996-ish PC serving some files that way. FreeBSD is a nice choice, dependable and very easy to keep up to date. I highly recommend putting a little time a the FreeBSD Web site reading about cvsup, it makes everything painless once you have it going.

    The 4.x series is probably still the best bet for what you are doing. It doesn't have all the latest bells and whistles, but it's rock solid. 5.x is a bit less reliable -- about on par with Linux -- but possibly interesting if you decide that you want to do more than file and print serving.

    For file sharing, Samba works quite well with both OS X and Windows clients. Appletalk is also a possibility, but I've found it complicates things for very little benefit.

    You mentioned manual pages, which are always good to have, but the FreeBSD Handbook (on their Web site is the easiest way to access it) actually tells you how to get things done. That's really what you want as your primary reference.
     
  6. superbovine macrumors 68030

    superbovine

    Joined:
    Nov 7, 2003
    #6
    I am with varmit, go with easier to use distro first. The learning curve will be much better. Mandrake imho is the best for newbies. However, you can download knoppix or any other "Live" linux verison just to get your feet wet. A "live" verison of linux is a linux that boots entirely from the cd-r and you don't have install anything. For people just learning is good to play with some of the stuff first before you install so you know what you getting into.

    http://linuxiso.org/

    you can find all the major distro of linux and bsd, usually in both PPC and x86 verison.
     
  7. PaulSbird thread starter macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #7
    Thanks for the responses. The handbook has been my friend. ;-)
    I've got an old IBM Aptiva with an AMD k-6 450. Right now it only has 64Mb of ram. I've got the original 8Gb hard as root and a new 200Gb for my file storage. I've run through set up now four times. (FreeBSD 4.9) Mainly because I've hosed the disk setup between the initial fdsk and then the disk label. I'm still not real comfortable with the disk setup so I'm using the auto configure in fsck and the disks look like what I want. The next step is to get it up on the network and to see if I can mount the drive from the mac. I still haven't ruled out linux yet, but I want to give BSD a solid try. Married life and hurricanes are the main obstacles I'm dealing with now!

    Paul

    (Edited for spelling)
     
  8. PaulSbird thread starter macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #8
    Update

    Well I've got BSd up on the network and I successfully mounted the drive using from my mac!!! Any suggestions on tightening the security on this guy? At some point I'd like to set it up so I can access it from the internet, which means I'll probably have some specific questions!

    Thanks

    Paul

    Edit : Spoke too soon :( I could see it, but I couldn't write to it. I'm changing the fstab file for the mount from ufs to nfs.
    Any other suggestions are appreciated!
     
  9. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #9
    in fstab you can set it to be writeable by a user (1000 should be the first user you made, and its also the group number too).
    My fstab for my Debian PC
    /dev/hde1 /mnt/Raid vfat user,owner,uid=1000 ,umask=000,users,posix,gid=1000 0 0
     
  10. PaulSbird thread starter macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #10
    Read-Write

    Hi Varmit,

    Great Sig!

    I'm abdle to write to any folders I create under the mount point.

    My mount point on my BSD box is /mnt/stor.

    Directories I create below this sucj as /mnt/stor/music I have no problems reading and writing to.

    Now I'm trying to automount from my mac. I'll post back with some more specfics on my fstab later

    Paul
     
  11. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #11
    Just put the mounts under Startup Items. Mine still ask for a password on boot, but I'm sure there is a way to get them to mount without asking. I just don't find it that bad of a security thing, since I don't want my computer to reboot and give someone access to them.

    Mount them with the mac, then add them to Startup Items.
     

    Attached Files:

  12. PaulSbird thread starter macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #12
    Reading over my last post....

    I was almost as clear as mud.
    I setup the startup items as suggested and that seems to work well. Will the connection re-establish itself if there is a power outage? I'm concerned the BSD box will boot up after the Mac restarts and that the Mac will not mount the volume. The reason this is important, is that my wife uses the mac and she'll need access to files on the BSD box without any complications. I don't want her to even have to deal with cmd-k if possible.

    I'm now trying to set up daapd on the BSd box.


    This is the fstab file on my BSD box:
    # Device Mountpoint FStype Options Dump Pass#
    /dev/ad0s1b none swap sw 0 0
    /dev/ad0s1a / ufs rw 1 1
    /dev/ad0s1f /tmp ufs rw 2 2
    /dev/ad0s1g /usr ufs rw 2 2
    /dev/ad0s1e /var ufs rw 2 2
    /dev/acd0c /cdrom cd9660 ro,noauto 0 0
    /dev/ad2s1g /mnt/stor ufs rw 2 2
    proc /proc procfs rw 0 0
     
  13. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #13
    If you make an apple script that will run though the mounting process if she doesn't see the volumes mounted on the desktop. She double clicks it and it mounts. I know its possible because my school, PSU had an apple script to mount the users PASS drives. I have the problem too when my linux box gets rebooted and my mac doesn't, error messages and disconnect messages come up on my mac. I have yet to do anything other than do the cmd-k when it comes back up. try http://www.macosxhints.com/index.php I'm sure they have covered this.

    http://forums.macosxhints.com/archive/index.php/t-17960
    It is also suggested that you can make and alias of the drive and use it to automatically mount when double clicked.
     
  14. PaulSbird thread starter macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #14
    Sounds like a good idea with the applescript. I just ran into a problem this afternoon that required a remount of the server. For some reason it was showing (from the finder) that no more space was available. I disconnected and reconnected, and it then showed up properly. I'm now able to ssh into the BSD machine from the mac so I'm ready to put the BSD box off in a corner, then I'll start tightening it up security wise. I'm sure right now I've got some holes in the setup. thanks for the comments.

    Paul
     
  15. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #15
    For what it's worth, you shouldn't even need to write a remount Applescript; in my experience, if you make an alias of the mounted server, double-clicking the alias is all it takes to do the re-mount. You don't even have to input a password if it's in the Keychain.

    I've set up small business networks up this way, and it's always worked so far.
     
  16. PaulSbird thread starter macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #16
    Thanks for the tip, the alias will work fine. I had an instance of loggig in this morning and the volume was not mounted. Stuck an alias of it on the desktop and voila. I'm now running to problems with the make clean install of daapd on the BSD machine. Does it matter where you place your extracted files when you do a "make clean install"? I've put them in what I think is the correct directory. (/usr/ports/audio/daapd-0.2.3)


    Makosuke, are you setting up Mac only sites or mixed environments? I use to use alias setups like that back in the 8.1 days. This is the first time I've really messed with mixed environments in about 5 years so a lot of brain farting is taking place.
    Paul
     
  17. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #17
    I'm sure it was mixed invironments. Did you install all the other things that it needs to run. http://www.deleet.de/projekte/daap/daapd/ Its a linux thing, but I guess you can use the port. Here are the instructions that I guess would be some what the same. http://www.macosxhints.com/article.php?story=20030711140157143
     
  18. PaulSbird thread starter macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #18
    daapd

    Those are the instructions I'm using. The instructions start off with installing the daapd dependent files... MAD, zlib,howl, and mpeg4ip, then when I do the install of daapd i get

    makefile", line 23: Missing dependency operator
    Error expanding embedded variable.

    line 23 when i do cat -b of the makefile is

    23 HOWLRECENT := $(word $(words $(HOWLDIRS)),$(HOWLDIRS) )

    Is there something obvious that I'm overlooking or will it require a lot of fishing?

    Paul
     
  19. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #19
    I wouldn't know. I would try a different download, and retry the compile. Also check to make sure you have the correct versions of the dependency files. There is a dependencies needed for build are: MAD, daaplib, libhttpd-persistent, and gmake. And to run is: rc_subr. Double check you got those installed. Because you didn't mention some of them as dependencies above in your post. gmake might also be what you need to compile with.
     
  20. PaulSbird thread starter macrumors newbie

    Joined:
    Jul 5, 2004
    Location:
    The Sunny Side of the Street
    #20
    I've still had no luck getting the daapd running and I got to do yet another install this evening cause like a fool i clicked on the system update option. It was a good exercise though, as I feel comfortable with re-installing without losing data on my secondary disk. Also, I was glad I posted my fstab file here 'cause I had to recreate it.
    I think something screwey is up with the system. I've haven't been able to install XFree86 successfully from disk or via the internet.

    Does anyone know how I would go about documenting the current OS config?

    Paul
     
  21. hillbilly1980 macrumors newbie

    Joined:
    Jun 24, 2003
    #21
    Your on freebsd some of the tools are bsd version not linux, this package needs GNU make to compile, on freebsd this is the gmake command. I had the exact same errorr with 0.2.4b and fixed it by the following.

    cd daapd-0.2.4b
    gmake
     
  22. pmartin macrumors regular

    Joined:
    Apr 23, 2005

Share This Page