Setting Up A Site Server with Jaguar
rgraham writes "James Duncan Davidson (the original author of Apache Tomcat and Apache Ant) has an article over at O'Reilly's MacDevCenter that walks you through the steps of not only getting Apache up and running on 10.2 (pretty simple, I know) but also DNS and Mail. The aricle goes along well with Alan Graham article on how to setup your own .Mac type service."
no no you have it all wrong, its BUELLER!
seriously though, i dont think the idea is to fully dedicate a mac to being a server, i think the idea is to turn your desktop mac into a desktop mac AND a personal mail/web/etc server, just to make things convenient for yourself. anyone who goes and buys a $1500-3000+ mac just to install apache and sendmail and put on their dsl connection is an idiot.
also keep in mind that jaguar *does run* on some not-so top of the line macs, which would cost fairly little (or nothing, if they're laying around).
The coolest part about a Mac these days is having a $200 dollar linux box in the closet and a Powerbook on the coffetable.... playing music wirelessly through the stereo system served from the mp3 streamer in the closet through the PBook with iTunes while reading /. and checking out how many other people are also listening to your stream via the webpage you designed in PHP and MySQL on the PBook localhost and then moved to your linux box w/o any hassle or reconfig... just a straight tarball copy and an apachectl graceful...
So why would anyone pay $3000 for a home server? It's not about the server, it's about having a perfect machine that you can do it all with... the ultimate pro-sumer device for the home. Develop, play, remore-admin, play, manage the household, play, play games, play, stock market, play, develop some more, play....
any questions?
A fool throws a stone into a well and a thousand sages can not remove it.
It is a wonderful thing to do j2ee dev at the local Starbucks on your localhost Apache /Tomcat/whatever... then finally to upload it all to your dedicated server through your tMobile account... I mean can you get any better? Not to mention how jealous all your friends are that not only can you afford the Powerbook but that it actually makes more money for you while you appear to be taking it easy (well, you really are at least half of the time...).
A fool throws a stone into a well and a thousand sages can not remove it.
lots of code written to run on windows web servers (even the win32 version of apache) needs to be rewritten to run on the production unix server because of locations of libraries, stuff that's not ported, etc... (i guess some of this could be overcame with cygwin, but...)
also in linux you don't get photoshop, or perhaps other commercial tools that most web developers are familiar with. lots of web developers are also stuck with design assignments mixed in with the development, so it's a good idea to have solid graphical tools.
the mac you get both a stable and compatible unix environment, and industry standard graphic design tools.
This is the exact reason why i bought myself an iBook, and I don't regret it a bit.
The last line of /etc/httpd/httpd.conf in the default OS X.1.5 installation reads:
/private/etc/httpd/users
/private/etc/httpd/users file being added for each user which enable you to serve anything you put in the Sites folder in your personal home directory. These are served in turn as http://your.domain.name/~username/page.html or the prevailing DirectoryIndex file to you (me) locally as http://127.0.0.1/~ynotds/
/library/webserver/CGI-Executables
/library/webserver/CGI-Executables/*
.cgi to get scripts running throughout your site.
Include
one
The main config file includes a script alias to run any CGI scripts in
They have put one Perl test script in that directory which you can view locally at http://127.0.0.1/cgi-bin/test-cgi, or at least you can after you have done a
sudo chmod 775
from your Terminal window.
From there, it isn't a lot of work to tweak your config files and uncomment AddHandler cgi-script
Of course the real point to setting up your Mac as a fully functional server is that you get to do all your editing in BBEdit which not only does syntax checking and colour coding on the fly of HTML, Perl, JavaScript and more, but also can directly run Perl in an open document window, enabling you to all manner of extrancting and reporting on the fly.
Now I just need to get brave enough to install MySQL.
-- Our systemic servants do not good masters make.
also in linux you don't get photoshop, or perhaps other commercial tools that most web developers are familiar with.
:)
If not directed to print media, The GIMP surpasses Photoshop in quality (not to mention that it by FAR surpasses Photoshop in Freedom). And if you're a web developer that uses a GUI to do web pages, well, you just plain suck as pro man
i personally don't use a gui for web page editing (i am currently using bbedit) but "the gimp surpasses photoshop in quality" is your opinion, but when i have been working with industry standard tools for years and have all the freedom i need to do anything i want in photoshop (because i know how to use it correctly) why should i switch? and how exactly does GIMP surpass photoshop in quality? does it provide an easy image slicing tools like imageready? or image optimization that is superiour to imageready (since you yourselfg said it surpassed photoshop it would have to be better to get me to give it a chance). does it support actions or photoshop plugins? All of these are honest questions because when i tried using it once none of these things were apparent to me. it seemed a bit like Paint Shop Pro to me. Like a program that looks like it can compete with photoshop to someone that doesn't really know how to use the photoshop.
Well, the worst thing you can say about GIMP is not supporting CYMK and a probably a couple more other patented stuff.
Plugins, it will not load Photoshop's, AFAICS even if run on Windows, but that is hardly something you will really miss, since it has a huge amount of plugins by itself, and if you're not happy with how one works, or need something extra, it's *relatively* easy to change and extend (or maybe you could convince a more experienced GIMP user/developer to help you extend it).
GUI, it's not Photoshop (and who said Photoshop's gui was simple?) but it has already won some prizes, and, its the origin of GTK+ (GIMP ToolKit), which is used in one of the two most used Free Software desktop environments.
Feature set, if you consider Photoshop as a 100% feature set app, GIMP may not be 100% to your eys, but if you consider PaintShopPro as 100%, then GIMP is eons ahead.
The lack of CYMK, makes GIMP not ready for the world of print, but in the fully digital world, there's absolutely no need for Photoshop. It may have a different UI, or you may not like the interface, the extensibility and the Freedom (no, you are not free to share a Photoshop copy with your friends or family, for instance).
But do join the GIMP mailing lists, and you'll see that in the digital world, you can (and probably will) live very happy without Photoshop.
I've been enjoying using my iMac as a development server, but Apple sure doesn't make it easy when they change the file locations and settings with every upgrade and security tweak.
// I will show you fear in a handful of jellybeans.
well, I was using marc's package :-(
OSX Sendmail form PHP seems to be a major pain in the behind : I've read at least 5 articles via google on the subject, and each one solves a different type of problem. My prob seems to be yet another one.
When will I end this grieving ? When will my future begin ?
free doesn't hurt, but it's the place that i work at that paid for the machine and the software so what do i care about the price? and who said anything about php/mysql? are those the only languages out there? tomcat and mod_perl suck for windows, and the tools on linux aren't up to my standards (i guess i offended a linux user by saying that i didn't prefer it over closed software) and i never said i needed photoshop to administer apache. i said it's nice to have all the tools on the same machine so i can work on a site on the bus or on the train or in a cofee shop, or in bed, with the tools that i am used to, and not have to modify anything. and besides, an ibook costs $1100, not $3000. and i get marked troll :rolleyes:
For all the people that say "why on a mac" here is the explanation. there is one of these for every platform. there is a "set up apache as your own developmnent server" howto for every platform, and up until now my question was why not mac? they are capable of running apache, so why not show the interested people how to do it?
1. It's not some wonky, secure, stripped, stable *nix box that can't run GUI IDEs.
2. It can give me multicolored colored visual cues to code, so monochrome terminal sessions are out. Colored terminals are OK, but they lack the same elegance of a full GUI.
3. It can quickly deal with running those additional programs I need when reading laughable client 'specs' in PowerPoint, MS word, HTML email from hell, etc.
4. The code, on my GUI-heavy isolated dev box, can run identically to the code deployed on the stripped, burly, boxen.
5. If I need to test speeds without a GUI, I can ignore it, and use the box in a stripped, clean, mode.
6. It must be stable without being cold and wooden (Red flag of personal preference, I find almost all *nix platforms to be far less comfortable than they could potentially be. I know the KDE/Gnome/Solaris folks are working on it, and have their advantages as well)
7. It must support additional "development necessary tools" such as playing mp3's, accounting for my time with professional accounting software, play mpg's, and run the occasional "break tool" in the form of some game that isn't 5 (or more) years old.
8. It must support running javascript, and be able to test IE, NN, *and* lynx, and be able to run MacOS 9, MacOS X, X windows (and sub-managers), as well as MS windows (and their many variants).
9. The hardware and software should need my personal intervention for tweaking and updates, well, almost never. I am not paid to update my box, I am paid for writing original code.
I run a business, and I use (deep breath) LinuxPPC, Yellow Dog Linux, SuSe (on X86 and PPC), Debian (on PPC and X86), Mac OSX, RedHatX86 (four versions), OpenBSD (PPC and X86), FreeBSD (X86), SunOS (really, some clients still use it), Solaris (all 'of the flock, ugly), Win 3.1, Win 95, Win 98, Win ME, Win NT 3.x, Win NT 4.x, Win2K, Win XP (all).
Of all of the above OS's, which one, do you think, can actually do requirements 1-9? (There's only one, take your time...) I used to do dev work on no less than 3 different boxes a day to meet those requirements. Now I use one.
Of course, if I have a few sites with a few million hits a day (I do), I'll host it elsewhere than my test box, an OS X box.. But I'm not going to develop on that box. I'm going to develop on a box that makes me the most productive, a box where I don't care about IRQ's, drivers, optimizing window managers, running rpm or apt-get or any other time-wasting CLUI tools that interfere with writing code.
For writing code, use a box that meets *your* needs. All platforms prior to OS X meant I was using far too many comps, because I needed multi-platform, multi-client-platform, code. No other platform allows you to test as many platforms at once as PPC/OS 9/OSX on Mac.
-Bop
Whatever you want to say about the AC, you're still not funny. (I, at least, have mod points and choose not to use them for posts that aren't relatively on-topic.)
--Mike
Take for example automation, which is critical for anyone that's going to be driving the software as their job. Photoshop actions, kind of like Applescript, allow you to record your activity and then have the software play it back to you by pantomime. There isn't much to get the hang of, because you're just recording the activity you're doing normally. Gimp's ScriptFu, on the other hand, allows you to script actions in Perl -- right? Now I love Perl, use it all the time, am a member of the local Perl Mongers group, etc, but that is *not* how I picture the average graphics professional wanting to work.
Gimp over Photoshop is an argument much like Linux over Windows -- in spite of all the shouting, the dominant player actually does have some strengths going for it, and the hackishness of the open source competitor just doesn't compare to the polished maturity of the dominant software. If you've got the time to spend on beating the open source stuff into submission -- and hey, that can be fun, I'm not trying to knock that if it's what you're in to -- then sure, the path of "freedom" might be worthwhile. But for everyone else, this isn't a political matter, and they don't exactly feel like slaves because they happen to prefer the [unfortunately] generally superior proprietary software to the open/freee/whatever alternative, whiich has been "almost catching up" for years now...
DO NOT LEAVE IT IS NOT REAL
I know the point of this article is to set up all these services on plain-jane Mac OS X, but even easier than all that, and still cheaper than (m)any commercial solutions, is Mac OS X Server:
http://www.apple.com/macosx/server/
Instead of going through 4 pages of convoluted configuration (if that's not your cup of tea), Mac OS X Server reason for existence is to provice a nice GUI for all of the server components. It's really amazing; anyone here who likes Mac OS X and hasn't really seen what Apple's done with Mac OS X Server 10.2 should check it out.
That pretty much summarizes why I switched to OSX after several years on Linux. Too much is "not ready". I've never had any reason to share software -- open source or proprietary -- with anyone, nor have I ever had a reason or the time to change someone else's code to my liking.
While the "freedom" aspect is interesting, the development model's diffused and decentralized nature often puts users' interests at risk when developers leave a project before completion. If no one else steps in to finish the product, users are left holding the bag with a released-but-unfinished piece of software. (Again, access to source is irrelevant for people who are not developers.)
I'm not a poor college student or struggling developer. I can afford to buy my software. What I want from software is capability, ease of use, polish, and choice. Open source may or may not give me those. Even the much touted choice attribute is somewhat illusionary. Open source, in common with proprietary software, suffers from a decided lack of really original applications..
-- Slashdot: When Public Access TV Says "No"
You obviously don't have any real idea as to what the Macintosh is all about other than "it's supposed to be easy to use."
... shouldn't be dependable on easy-to-use interfaces.
Admins
And your point about the Macintosh is...? You insinuate that to use a Mac server one must be "dependable" on an easy-to-use interface. This is flat-out false. (Why you think it's easy-to-use is a Bad Thing is a whole other issue. I believe it goes to show how the vendors you prefer have lowered your expecations over the years regarding interface design - "if it's easy to use it's got to suck.")
Standard server system are much cheaper even with the obligatory redundancy stuff.
No they're not.
Sorry, but I don't see the points for Macs.
But it's refreshing to know that you did your homework before deciding. Not.
You like your Macintosh better than me, don't you Dave? Dave? Can you hear me Dave?
Having a "grip on technology" has nothing to do with it. Regardless of what I know or don't know, why should I dive into the weeds if I can get the same results by taking the easy route? That applies to admins, too, who shouldn't be spending the company's dime mucking about when they don't need to be.
-- Slashdot: When Public Access TV Says "No"
You wouldn't necessarily buy a new Mac to use as server. But since the entire Mac world is being migrated to a platform that installs Apache, etc., someone has decided to write a piece explaining how to take advantage of that fact. What's your problem with that?
As for price, I would have paid just as much for a PC as I did for this Mac. All the PC would have given me was the need to install Linux and spend hours tweaking the thing so I could stand to look at it. My time is more important to me than the money, so I went the Mac route.
Why does a "community" that whines so much about "choice" and "freedom" have such a hissy fit every time someone says something positive or useful about a competing platform? Any chance that's because you want to limit choice and freedom to only one kind of software?
-- Slashdot: When Public Access TV Says "No"
For years.
PPC chips use only a fraction of the power of Intel chips, and generate far, far less heat. This is why they are Motorola uses them in the embedded market, where they sometimes need six nines of continuous heavy-CPU-use uptime.
Most models of powerbooks don't even have a CPU fan installed, because they never need it.
Information wants to be anthropomorphized.
I cannot believe he didn't even mention turning on your firewall (which is so simple in OS X, since a GUI interface to the ipfw software that has always been there is now available right in System Preferences). It is very irresponsible to tell people to set up a server without telling them how to protect it. Come on. (I use BrickHouse instead of Apple's interface, but they both provide a GUI interface to ipfw, so it's pretty similar, just more full-featured.) Also, the author does not mention alternatives to Sendmail. Many people consider Postfix to be superior. See Installing Postfix and UW IMAP on MacOS X Server for instructions on setting it up for OS X.
What do your computing needs have to do with the availability of more software products than you'll ever use? "Availability of software" is one of the weakest arguments of Windows over Mac out there.
Figure out the things you want to do with your computer before you buy. Then scope out the best solution on whatever platforms you feel like giving a fair chance to. The total number of available software titles is irrelevant...
I'm not exactly a Linux user, well, I am, indirectly, since that is the current kernel of the GNU system. Since I choose not being a subject to the kings above me, who could dicatate over my freedoms, I'll wait as long as its needed.
Did we pay them _anything_ in order to be able to demand _anything_?
Probably not. So, we don't have to put up with almost ready applications. We can help them get there, always without compromising our freedom. Besides, I'd ask how long will Microsoft Windows or Apple MacOS users have to put up without their rights?
Well, there is a small number of empowered people who 'own' the masses by being the only ones who can dictate what happens to your computer and the things you do. I consider this a certain return to medieval times, yes.
Now, whoever thinks that independence and freedom are easy paths, then some history needs to be learned.
Microsoft and Apple are in a perfect situation to tell you you can't do this or that at their will. You have no rights over what you bought, not even the rights fair use gives you. Of course you can disobey the license, but then, you will be violating international copyright law. I rather keep those problems at a distance that can never be far enough.
The right to reverse engineer someone else's IP that they worked hard to create and should be able to earn an income from?
First, you are wrong to say that it is intelectual property, since that is precisely proving that you bought the propaganda and are now confusing copyright law, patent law, trademark law, etc... all mixed in a bag like they are the same thing when they are, in fact, ortogonal.
Reverse engineer _is_ covered in the law and is widely considered a benefitial thing. Only proprietary software vendors want to forbid that, so that no one can make products that will even interoperate with theirs, thus resulting in a monopoly that leaves you at their mercy.
You are also confusing ideas with expressions of ideas. You can't own an idea, for instance, since _anyone_ can have the same idea (since all ideas are developed incrementally above older ideas) even without knowledge that someone else had the same idea. They lost both their time (and possibly money), but one will have to give up because of the other one? That's ridiculous. But if you copy the expression of an idea and then change it, you then are falling under copyright law. If you allow software patents, you will automatically forbid anyone of creating Free Software that could compete with the proprietary software, thus lacking the completeness you complain... no wonder... they can't compete, it's not a free market but a monopolistic market!
I'm just trying to explain why I harbor no sympathy for freeloaders, which I think makes up the bulk of the open source and free software using communities.
So I can safely assume you are in favour of the not invented here syndrome, and that everyone should loose their time re-inventing the wheell so that they can't loose their time making better and more complex software... ok, that's what you want.
I didn't buy a computer to help out in some "movement". I bought one to help me complete a given task in a shorter amount of time thus increasing my personal productivity.
I'm not intending to force you into joining a movement. Just noticing that you have no right whatsoever to complain. YOU are the freeloader when you use Free Software and yet complain, as if you paid anything, as if you helped develop anything. You can shoot yourself now since you harbor no sympathy for yourself.