Help me turn my mac mini into a home web and file server
-
I'm interested in turning my rarely-used powerpc mac mini into a web/file server. Where are the good guides and resources for doing this? I have a 1.5 GHz Power PC G4 mac mini, with 10.4.10, 512 MB RAM, which I would like to turn into a web and file server, mostly just for me and maybe a few other users. It connects to the Internet at Large via a wireless network, and I want to be able to access it remotely and not have to worry about having the full set of peripherals attached to it. I mainly want to use it for a web development environment that I have control over and access to. I like putzing around with things and have reasonable patience with mysterious bugs, although not infinite patience. I would be building applications using at least MySQL and PHP, maybe looking into Python and other things if I am sufficiently convinced of their awesomeness. Having it running an FTP server would make it useful for when I don't have ssh access. So, how do I get this set up, how do I connect to it from within and outside the network (ssh? vnc? etc?), and how do I make it awesome? Are there excessively clear tutorials and documentation that will help me to do this? Packages that make it clear enough for my computer-phobic mother to be able to set up? I tried in the past to install apache/php/mysql, but ran into issues with the php packages out there for macs (maybe even the mac mini in particular). I have gotten these things to work on a variety of Windows machines, but I know it's not the same.
-
Answer:
I'm doing exactly what you are. Here's how: 1. Format and reinstall your mini from scratch. You don't want cruft hanging around from when it was a desktop, and various upgrades (10.3-10.4 and 10.4->10.5) have done things that break server-type things. Reinstall from blank. (I wish I'd done this bit). If you can afford it, I'd suggest leopard: it comes with the latest versions of everything you'll want, including Apache 2 and a working install of Rails. 2. If you have dynamic IP, get a dyndns address or similar. That allows you to find the damn thing from home. I prefer dyndns, as it has a Mac client app that silently updates the address whenever your IP changes. 3. If your router has a DMZ and you're happy enough with Mac security, put the mini into it, so that what is seen from outside the internet is your mini without irritating firewall intervention. THEN: 4. Turn on the firewall! (System Preferences -> Sharing -> Firewall). Then only open the ports required for services you want to use. 5. Turn on the services you want to use. OS X already comes with Apache, turn on "Personal Web Sharing" to use it. It comes with an FTP server, an SSH server, etc. It even has a VNC-able remote desktop thingy in Leopard. 6. To get .php and .cgi working for php and perl, rummage about in the config files for Apache. There's a thousand and one tutorials out there, and it's really pretty simple. 7. Oh yes: Energy Saver settings: Set the Mac up to never sleep and to wake for admin access. This is important. It's also a good idea to turn "Put the hard disks to sleep when possible" on, as despite the lag it incurs if you hit the server after it's been idle a while, it'll massively increase the lifespan of the laptop-grade drive in the mini. 8. Don't worry about the headless stuff: mine boots and runs fine with no keyboard, mouse or screen attached. It does moan a bit on bootup though, so you'll need to use VNC or Remote Access to get in and click past the moans. 9. Remote Access: It is vital if you're going to run under 10.4, but the screen sharing feature in 10.5 does the basic bits fine.
that girl at Ask.Metafilter.Com Visit the source
Other answers
The easiest way (though not the cheapest) would be to upgrade to OSX Server; the server edition has a built-in web server with a GUI administration tool. This is the setup I've used (also with a PowerPC Mac Mini) for a couple of years, and it has worked great. I use Remote Desktop when I need graphical access to the machine, otherwise just ftp and ssh for deploying website updates. If you have another Mac (besides the one you want to use for a web server), then you can also download Apple's Server Admin tools, which will allow you to monitor the server from that computer (over you home wired/wireless network). As long as you have a static IP address, there's no reason you can't use the "regular" (non-server) edition of OS X, but you'd have to download and install the web server of your choice; I'm afraid I've never done that, so I don't have any pointers there. If you can afford to upgrade to OS X Server, that would be my recommendation. If you decide to go that route, feel free to email me directly (address is in my profile), and I can walk you through setting everything up.
tperrigo
Hi that_girl, this sounds awesome. I've had a little experience setting up Apache (web server) on Apple computers, as well as a nice horrendous little boo-boo where I opened up mod_proxy on the configuration and had hundreds of computers from around the world using my poor little web server as an anonymous proxy. So I definitely recommend you take the time to learn how to secure your Apache installation, and that you keep it up-to-date, preferably with a package like Fink that automatically takes care of upgrades for you. The biggest thing you should learn is a little about the command line (Applications/Utilities/Terminal.App). Although there's a GUI equivalent for just about everything these days, you can do a lot of important work like quickly inspecting files (cat) or quickly turning the apache server on and off using this tool. You will need to be able to get files on and off your Mac using either SFTP or SCP. I recommend either a GUI Tool like Transmit, or learning how to use these at the command-line (scp), and (sftp). You will need to be able to work remotely, that's where (ssh) or vnc come in. This is your choice depending on how you want to work. As you know, you'll need to be editing a fair amount of text files. TextEdit really should be sufficient for most things, but consider an Integrated Development Environment if you decide to do any serious programming. I haven't used this http://switch.richard5.net/isp-in-a-box-v2/installing-mysql-on-mac-os-x/, but apparently it will solve your PHP installation problems for Mac. On Preview: I have no familiarity with OS X Server but it does seem like a nice for-money solution.
onalark
Get http://www.apachefriends.org/en/xampp-macosx.html, setup ssh (system preferences > sharing > remote login) server for remote logins. XAMPP is not secure at all by default, but it can be tightened up.
phax
http://www.apachefriends.org/en/xampp-macosx.html "XAMPP for Mac OS X is the simplest, most practical and most complete webserver solution for Mac OS X. The distribution includes an Apache 2 web server, integrated with the latest builds of MySQL, PHP (both 4 and 5) and Perl. It comes as a Mac OS X Installer package which contains all the necessary files and requires no dependencies." I've seen it recommended quite a few times on here.
petah
Another note about OS X Server edition-- it also comes with MySQL pre-installed, and configurable through the Server Admin app (though I've never used it; I prefer PostgreSQL instead). As others have mentioned, there are plenty of possibilities for setting up a web server on your existing OS, but I thought I'd mention the server edition because I've found the built-in features to be a huge time-saver.
tperrigo
While OS X Server sounds quite nice, it's perhaps above and beyond for my needs (seeing as I'm just trying to set up something largely personal with preexisting equipment). As for other things, I remember running into problems with VNC if I tried to start up my mini without peripherals (like the monitor and keyboard etc.) attached, i.e. it didn't transmit any video output. Is this expected, or weird? I'm pretty sure xampp was one of those things I tried where I still ran into the php-not-working problems. I'll try again, but I think my current installation of apache might mess things up, so here's a basic-er mac question: how do I get the stuff already there Off Again? I need to have a way of editing files that doesn't use ssh as my workplace blocks port 22. FTP should work--what do I need to do to set up an FTP server? onalark:these are more or less the sorts of things I know, and so I'm more looking into the How of the doing, not of the What to do.
that girl
http://www.apachefriends.org/en/xampp.html it. As Gordon Ramsay would say: "Done!"
basicchannel
that_girl: sorry, sometimes it's hard to get a read on what people are actually asking here. I need to have a way of editing files that doesn't use ssh as my workplace blocks port 22. FTP should work--what do I need to do to set up an FTP server? I HATE it when companies do this. You don't want to run a basic FTP server because they're extremely insecure, see if you can figure out what ports are still open and then set up your sshd to listen on them. Two infrequently blocked ports are 8080 (alternative http) and 443 (secure http). Another good port for you might be 110 (POP Mail), but all of this depends on your host. Note that you only want to use secure http if you aren't using it already for your web server, however it is almost never blocked. Also, once you have ssh working, you get scp and sftp for free since they all work over the same layer. As for getting Apache off, it depends on how you installed it. Different installers will put Apache in different locations. Most of the time, turning it off is sufficient as a new install will either pay no attention to your old install or overwrite all the required files.
onalark
Oh, yes, MySQL doesn't come with OS X (last time I looked). You'll need to download it from the MySQL site, but the installer's a breeze. Just secure it afterwards.
bonaldi
Related Q & A:
- How do I make a python web program that is on a ubuntu server allow access to the server?Best solution by Yahoo! Answers
- How do I make a home based server?Best solution by lifehacker.com
- What monitor can I use with a mac mini?Best solution by eHow old
- Can i connect any monitor with a mac mini?Best solution by Yahoo! Answers
- How do I connect a Mac mini to my TV?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.