Archive for the ‘Leopard’ Category
Instead of doing “lookupd -flushcache” you have to do “dscacheutil -flushcache”.
Update: Updated post (on December 11, 2008) here.
- We won’t be running any binary installations, all software will be compiled from source.
- The installation won’t make use of Fink or Darwinports either.
- These are instructions for the Intel Macs.
- Using this approach would mean that you will need to maintain the stack by hand.
- Use this information at your own risk.
- If you don’t want to go through all the trouble and use a binary installation, read this post.
The software stack we are going to install will be as follows:
Apache HTTP Server 2.2.6
MySQL 5.1.22 RC
We will also need to install the following software dependencies:
- Xcode (from the Leopard DVD or Apple Developer connection )
- Readline (http://tiswww.case.edu/php/chet/readline/rltop.html)
- Tidy (http://tidy.sourceforge.net)
This installation would not have been possible without help from the following websites:
- Installing Readline on OSX without using Fink or Darwinports
- Workaround for Tidy’s platform.h problem
- Installing the GD library on OSX Leopard
Now to the installation:
Download mysql-5.1.22-rc.tar.gz from the http://dev.mysql.com website
$sudo make install
Update: The steps did help me in getting to install the server, but on start up it did give certain location-specific errors.
As Hill has pointed out in the comments, MySQL.com has not released a version of their software for Leopard, but I got 5.1.22 RC to install, run and connect from PHP without any hassles following the instructions in one of the links he had kindly posted.
Download the source from ftp://ftp.cwru.edu/pub/bash/readline-5.2.tar.gz
There are bugs with the installation as elaborated in this link with workarounds:
$sudo make install static
Download the source from http://www.postgresql.org
$sudo make install
Follow the instructions at Veola.net
$CFLAGS="-arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
if you get an apr.h error regarding sendfile, edit the apr.h file in srclib/ext/includes and change APR_HAS_SENDFILE to ’0′
$sudo make install
--with-snmp=/usr --enable-exif \
$sudo make install
And that’s all folks!
For all the elegance that Apple and the Mac franchise brings with it, iTunes, which is the default music player that comes with it is a serious blight on the entire set up. I’ve found it particularly infuriating since I am so used to Foobar in my previous incarnation on Windows that I can’t imagine a player that is represented by iTunes.
But, fear not. Hope is here, in fact two iterations of it. First one is called Cog, which has the minimalistic pedigree of Foobar and is under constant development. The other one is named pretty obviously as Play. Both are fine players and I am taking my own time figuring out which one is better. Though, sadly,
either player (Cog has alpha level support in the nightly builds and it is buggy for now) seems to lack CUE file support in the little that I’ve poked around with it.
On the even brighter side, I am getting spanking good sound quality from either player compared to silly iTunes. And on that very musical note iTunes gets the boot from my dock.
Update: New post on installing from source here.
Getting Apache 2, PHP 5, MySQL 5 and Postgresql 8 on Leopard was not as easy as it was made to look, so I am noting it down so that it could help somebody later.
This does not deal with installing PHP or Apache from source which can be a bit hairy on OSX.
This was done on OSX Leopard, I have no idea if the same will work on Tiger, Panther etc.
Follow the instructions at your own risk. It did not blow up my Macbook Pro in doing this, but I can’t guarantee you that you’ll extract the same mileage.
All binaries have been downloaded from Marc Liyanage’s website (thanks Marc!):
- Download the respective packages from the website
- Install them according the instructions
- Stop the httpd that is shipped with leopard (sudo /usr/sbin/apachectl stop)
- Backup existing PHP module: cp /usr/local/apache2/modules/libphp5.so /usr/local/apache2/modules/libphp5.so.orig
- Replace with the Entropy version: sudo cp /usr/local/php5/libphp5.so /usr/local/apache2/modules/libphp5.so
- Backup existing php.ini: cp /private/etc/php.ini /private/etc/php.ini.orig
- Replace with the Entropy version: sudo cp /usr/local/php5/lib/php.ini /private/etc/php.ini
- Edit the httpd.conf in /usr/local/apache2/conf to load the PHP module
- Back up existing httpd.conf in /private/etc/httpd
- Replace it with the version in /etc/local/apache/conf
- Start Apache
I know it is not the best or the most proper way possible. But after many days of poking around, this was the easiest and I am not one to complain about that.
At long last I made the switch from being a Windows user to one of those nose-in-the-air snobs who carry those beautiful laptops with leftover apple on the backside. The reasons for the switch were simple enough. I gave up my old laptop somewhere in the recent chaos and had to get a new one. Most of my options involved running Vista and it basically boiled down to the new Dell XPS M1330 and the Macbook or the Macbook Pro. While the XPS was an incredibly amazing deal at its current prices of Rs 64,000, even with the graphics card slapped on, the nagging question was that of having to run Vista.
Now, I am not a rabid anti-Windows person or a great Linux fanboy. I live by the quintessential “horses for courses” adage and have run almost everything (with the exception of the Mac, other than a stint during the journalism school days), including variants of Windows from the 3.x days, DOS, Netware, Linux, BSD, AIX etc, during my time. In my daily dalliance with computers over the past four years, Windows XP has dominated every part of it (other than the servers) and I have a pretty intimate knowledge of Windows XP by now. That said, keep XP clean of attacks, viruses and various infections is a dark art and a game of cat and mouse that never ends.
The question thus (with a Rs 30,000 mark up on it) was if I wanted to spend my time on yet another learning curve wrangling Vista to behave to my liking. From what I have seen of VIsta, it is a major upgrade that will require me to relearn jumping through the myriad hoops involved in learning any Microsoft OS. On the other hand, I am very comfortable with the command line, though for using a desktop it is not my ideal choice on any given day. Thank you, but I shall keep my point-and-click sensibilities with me any day. And as you know by now, the lure of the shiny Apple won.
In terms of a regular desktop experience, Apple and OSX has been a delight. I will not reiterate what’s been said so many times before: that things just work on the damn thing. A network printer that normally takes me about 15 clicks to add on XP took just three clicks on OSX. It looks and behaves like one of those stunning supermodels – what you get to see is more or as equally tantalizing as what is being very thinly hidden from your eyes. On the other hand, most of the trouble I’ve had are with my development platform. More on that later.
My current desktop stack includes Adium (instant messaging), Firefox (220.127.116.11, not the 3.x beta), Freemind (mindmapping), Fugu (SFTP), SVNX (Subversion client), VMWare Fusion (for Microsoft Office and Outlook, I know, sigh) Ecto (blogging, oh yes!) and JellyfiSSH (SSH client front end). In terms of performance Adium is lovely, Firefox is pretty similar to how it behaves in Windows, Freemind has been spotty (Leopard Java issues, I presume), VMWare Fusion is absolutely awesome, though Outlook is patchy. In short, it has been pretty nice to me till date.
Incidentally, I run only Microsoft Office under VMWare Fusion. Initially, I had dedicated a whole 700 MB of RAM to the VM, then chopped it to 512 MB and now it is running at a healthy 256 MB. In the long run, I do intend to see how Office for Mac 2008 holds up and move to it. Irrespective of whatever RAM I end up giving to Fusion, when it does run, I get less than 200 MB of RAM to spare. I do not know if it is any better if you run it as a real VM than a Bootcamp version, but this is only a stopgap arrangement.
Things have been different though on the developer side. I am one of those people who love to compile my development stack from source and YUM on Centos has throughly spoiled me on that count. The shortest compile instructions that I’ve seen for any OSX software runs into several screenfuls and there seems to be no sane way to get the dependency libraries in place (nobody has a straight answer whether FInk or Macports is the better option).
OSX Leopard itself runs with Apache 2.2.x and PHP 5, but it does not have the Postgresql module complied in and I have not been able to get the Entropy distribution to start up with PHP enabled for some bizarre reason that I’ve not had the time to figure out yet. I grabbed the Postgresql binary from Entropy and MYSQL server from, well, MYSQL.com. My other dependency, on Eclipse PDT, has currently hit a wall with the PHP situation and I have not taken a look yet at what major hara-kiri it would take for me to get it running with Xdebug on OSX. So the jury is still out on that one.
In conclusion I am happy that I made the switch. In terms of both hardware and software Apple and OSX is an elegant combination. I have no idea how much pain the development set up would give me, but even in the worst case scenario I could run a server install in a VMware Fusion session and forget all about it. But the most important point is that the Mac has allowed me to take my time off from maintaining my desktop environment and till OSX worms and viruses are a commonplace occurrence I think that should hold. As far as Vista goes, I’ve helped a couple of my lads in my team with it and I want to stay as far away from it as possible.