Mac Mini G4 as a web server

Discussion in 'PowerPC Macs' started by Daniël Oosterhuis, Mar 27, 2016.

  1. Daniël Oosterhuis macrumors 6502a

    Daniël Oosterhuis

    Joined:
    Jan 10, 2016
    Location:
    Black Mesa Research Facility
    #1
    I have my own domain name, and I used to run a WordPress site on my Raspberry Pi. Problem is, MySQL on the original Model B of the Pi keeps having memory leaks, resulting in it crashing and me having to SSH into the Raspberry Pi and restarting it. This became a daily struggle, and at a certain point I gave up and left the site offline. Simply put, due to MySQL the Pi isn't cutting it (no pun intended). So I have been thinking of other reasonably light power using devices, and I suddenly thought "What about a Mac Mini G4?". It would be cool to repurpose an old Mac Mini G4 for that task, and it would be cool to say that my website is Apple and PowerPC powered. That said, is this feasible? My site wouldn't be very high traffic, but I would like to run the most updated versions of Apache, MySQL and PHP, and be able to have it sync with the DDNS service my registrar uses so in case of my dynamic IP changing, it's automatically changed. I have no experience with setting up a server of any kind on a PowerPC machine, and I don't know whether this is possible on OS X Leopard, or if I would have to install a PPC version of Linux in order to get the latest versions of said server software. Is this an achievable idea?
     
  2. abundantmussel macrumors member

    abundantmussel

    Joined:
    Mar 31, 2014
    Location:
    Cork, Ireland
    #2
    No idea on your question but on your pi you can change the amount ram the GPU uses to give the mysql instance and underlying Debian system more ram also try replacing mysql with mariadb that should fix you memory leak issue, don't uninstall mysql just run apt-get install mariadb-server from cmd line. It's a drop in replacement for mysql so same commands etc no database conversion etc. My company uses it for large databases running financial transactions, WordPress sites and lots of other things.
     
  3. abundantmussel macrumors member

    abundantmussel

    Joined:
    Mar 31, 2014
    Location:
    Cork, Ireland
    #3
    If you need more details on setting the pi ram settings or setting up mariadb-server just send me a message and I'll show you how.
     
  4. bobesch, Mar 28, 2016
    Last edited: Mar 28, 2016

    bobesch macrumors 6502a

    bobesch

    Joined:
    Oct 21, 2015
    Location:
    Kiel, Germany
    #4
    There's a Server-version for both Tiger and Leopard. (But I don't know if security is good enough under all aspects...)
     
  5. val1984 macrumors member

    Joined:
    Jan 26, 2015
    #5
    You'd probably be safer with a Linux distribution such as Debian which is still maintained on PowerPC. The problem I see with using a G4 MacMini is that you'll be restricted to a maximum of 1 GB of RAM which is not much more than on the Raspberry Pi, depending on your model revision.
     
  6. MysticCow macrumors 6502a

    MysticCow

    Joined:
    May 27, 2013
    #6
    Well, I don't see why you couldn't use it for a web server. All it takes is turning on web sharing for the basics. If you need more advanced stuffs, then you might need OS X Server.
     
  7. bobesch macrumors 6502a

    bobesch

    Joined:
    Oct 21, 2015
    Location:
    Kiel, Germany
    #7
    Fully agree - ScreenSharing and FileSharing are the things I commonly use too and the setup for a G4 mini with Tiger or Leopard is a no-brainer. For RemoteDesktop and Remote File-Access TeamViewer7 is quite easy to setup as well.
    I've installed Tiger-Server on a second partition of my PBG4 but the learning curve turned out to be a bit too steep for me... (Something for long winter-nights...)
     
  8. headsh0t95 macrumors regular

    Joined:
    Dec 21, 2013
    Location:
    Netherlands
    #8
    I also ran mySQL (5.4 back then) on the Pi B with 512 MB Ram as backend for an Android app and it never had any memory leaks. I don't know how large your database is - but mine was around ~10-15 MB. I ran the Pi for months (yes, for months) without rebooting it and it never crashed or ran out of memory.
    That was until I wanted to use OwnCloud, which was slow and used 100% CPU from PHP while loading pages.

    Now I use another older machine as server and OwnCloud plus app backend works fine. That server uses a 1.4 GHz Pentium M, has 1.5GB of RAM, 60GB of internal storage, 2x 1TB of USB Storage (mirrored every night) and is fanless. Must be the same age of the Mac Mini G4 (No SATA, DDR1 RAM) and is enterprise-grade level hardware. I use Debian 8, and if you can grab the PPC version it should have the same features as my server (PHP 5.6 from standard repo or 7.0 manual, MySQL 5.5 from standard repo or 5.6 manual, Apache 2.4.10 from standard repo).
     
  9. 556fmjoe macrumors 65816

    Joined:
    Apr 19, 2014
    #9
    Connecting Tiger or Leopard to the open internet is just begging for trouble. Use BSD or an up-to-date Linux distro if you're planning to do this.
     
  10. NathanJHill macrumors member

    NathanJHill

    Joined:
    Oct 29, 2014
    #10
    And really, tons of websites have moved away from Apache. NGINX is the preferred web server for many nowadays, especially as it uses less resources and can handle heavier loads with ease. Look into using tiger brew/homebrew to get more recent versions of server software compiled for your Mac, if you want to go that route.

    Know that the other big limitation is that your Mini has only 10/100 ethernet. No gigabit. For a small site, it's probably not an issue, but it may be an issue.

    Also, why not look at a cheap VPS? I have one for $15/year that would probably be a lot less hassle than your pi, and you won't have to pay the electric bill either. :)
     

Share This Page