I hate EULAs. Especially Apple’s OS X Client one…

February 17th, 2010 staze No comments

So, I’m a Sys Admin. I spend all day running down problems, and when I’m not doing that, I’m usually working on bigger problems that are multi-day/week/month issues. And when I’m not doing that, I’m playing with something cool that’ll give us a better user experience, show us data we haven’t seen, etc. Add to this, we basically have no money (we’re State Higher Ed). So, the answer for testing issues is, obviously, virtualization (since we can’t afford to have test machines sitting around).

Now, VMware and Parallels both support Virtualizing OS X Server on Apple Hardware. They do not, however, support Virtualizing OS X Client, since Apple’s EULA specifically says “You can’t do that”.

So, being a Sys Admin, and not taking anything at face value, you look around online, and find various ways around this. Yes, it’s breaking EULA. But, I am running this on Apple Hardware, and we have broken machines sitting in a closet not running any OS. So, far as I’m concerned, it evens out. Obviously this wouldn’t hold up in court, but seriously Apple. The EULA should be something like: “You can virtualize OS X Client on Apple Xserve hardware” or something like that. Make the end user pay for it, but don’t make us hack software to make it work.

Anyway, the big thing that made me create this post is… VMware Fusion 3.0 changed things a bit. This info is still online except one minor tidbit. You HAVE to use physical media when doing the install. Don’t ask me why, you just do.

As for the rest of the info… I leave it to the readers. As for fixing the EULA… Please, Apple… Please.

UPDATE: The issue with VMware and physical media seems to be that VMware is convinced it should be attached to the VMware tools disk image to install that. If there was some way to get around that, it should be easy enough to boot off an image. Because once I had it installed, and unmounted the VMWare Tools “disk”, the OS X installer image immediately mounted. *shrugs* Oh well… I got it installed.

UPDATE 2: So a big reason for this was testing. After I got a normal 10.5 client installed, I created a second VMware disk, and restored our lab image onto it. It’s actually pretty cool to have this. Means I can finally test some things that normally would require a separate machine. So again, please Apple, fix the EULA. At the very least, work with VMware to allow Mac OS X Server (and client ideally) to run on vSphere. Hell, sell some Dongle for $10k. Or hell, get them to port vSphere to the Mac, so you can put a couple Xserves in a vSphere cluster, and they’ll take care of running the Mac OS instances. I want to be able to virtualize OS X on vSphere without jumping through hoops.

Wordpress auto-update

February 15th, 2010 staze No comments

Just a quick note. Wordpress 2.9.2 came out today, and I found that since my server upgrade, the core auto-update/upgrade feature wasn’t working. It wanted me to have FTP access.

Turns out that the website folder itself (in my case, since I host on a Mac, a folder within /Library/WebServer/Documents) wasn’t owned by www. Once I chowned that to www, the auto-upgrade worked perfectly.

Everything else was already owned by www… so, just make sure, the folder wordpress resides in is also owned by the web user (the user httpd runs as).

Good luck! And remember, Happiness is only a chown away.

Finally got SVN going…

February 12th, 2010 staze No comments

I finally got svn working. So the “Code” tab on the title bar now works.

This is mainly thanks to this article on Apple’s developer website. It doesn’t seem to have any wrong data, even though it’s for 10.5.

I’ve updated the few links on my site, as well as the InstallRRD script I posted yesterday to reflect the change in location for these files.

Now if I could just get a resume posted, all the above links work be “valid”. Maybe in a week or two.

Categories: Coding Tags: , ,

Installing RRDTool 1.4 in Snow Leopard (Server) 10.6

February 11th, 2010 staze No comments

Wanting to get some info on mail traffic on our mail server, I wanted to get mailgraph installed and functioning on our server. While there are a few sources of info on the web on getting RRDTool installed in 10.6, one of them only deals with RRDTool 1.2, and the other is in Japanese, though it does cover RRDTool 1.4.2.

While I thought I would take the time to write up an article on how to install RRDTool 1.4.2 on 10.6, I lost interest somewhat, so I’ve just made up a basic script to install it for you. The only requirement is to install Xcode 3.2.1, and you’ll want to `sudo su -` before running the script. It will make a src directory in whatever path you run it in, download all the source, and compile it. It will log all the output to a file “build.log” in your current directory. By default, it installs everything in /usr/local. If you want to change that, you’ll need to modify the first few lines in the script.

Feel free to use, and if you want to see what it’s doing, just take a look at the script.

RRDTool install script: here

Good luck!

PHP 5.3.1 compiled from source on 10.6.2 Server

February 3rd, 2010 staze 5 comments

Apple unfortunately forgot to include freetype support in GD with their stock version of PHP 5.3.0 in 10.6 Server at least up to 10.6.2.

So, there’s some info online about compiling freetype into GD in 10.6, but it doesn’t specifically address 10.6 Server, and it references downloading the PHP 5.3.0 source from Apple’s servers, rather than directly from php.net.

So, here’s the info.

  1. Create a directory for the src.
    sudo mkdir /src
  2. Chown that over to yourself.
    sudo chown username /src
  3. Change into that directory.
    cd /src
  4. Create pcre directory.
    mkdir pcre
  5. Change into pcre directory.
    cd pcre
  6. Download pcre source.
    curl ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.01.tar.gz -O
  7. Download php5.3.1 source.
    curl http://us3.php.net/distributions/php-5.3.1.tar.gz -O
  8. Download libjpeg-v7 source.
    curl http://www.ijg.org/files/jpegsrc.v7.tar.gz -O
  9. Untar all of the above.
    find *.tar.gz -exec tar xfvz {} \;
  10. Change into pcre source directory.
    cd pcre-8.01
  11. configure pcre.
    ./configure --disable-shared --enable-static
  12. Make, and install pcre.
    make && make install DESTDIR=/src/pcre/pcre-local
  13. Change into the jpeg directory.
    cd ../../jpeg-7
  14. Copy some config files into the current directory.
    cp /usr/share/libtool/config/config.sub .; cp /usr/share/libtool/config/config.guess .
  15. Config libjpeg.
    export MACOSX_DEPLOYMENT_TARGET=10.6
    CFLAGS="-arch x86_64" \
    CXXFLAGS="-arch x86_64" \
    LDFLAGS="-arch x86_64" \
    ./configure --enable-shared
  16. Make, and Make install.
    make; sudo make install
  17. Change directory into PHP source folder.
    cd ../php-5.3.1
  18. Modify line 186 of ./ext/iconv/iconv.c and change #define iconv libiconv to #define iconv iconv
  19. Configure PHP.
    MACOSX_DEPLOYMENT_TARGET=10.6
    CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp"
    CCFLAGS="-arch x86_64 -g -Os -pipe"
    CXXFLAGS="-arch x86_64 -g -Os -pipe"
    LDFLAGS="-arch x86_64 -bind_at_load"
    export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET
    ./configure --prefix=/usr \
    --mandir=/usr/share/man \
    --infodir=/usr/share/info \
    --disable-dependency-tracking \
    --sysconfdir=/private/etc \
    --with-apxs2=/usr/sbin/apxs \
    --enable-cli \
    --with-config-file-path=/etc \
    --with-libxml-dir=/usr \
    --with-openssl=/usr \
    --with-kerberos=/usr \
    --with-zlib=/usr \
    --enable-bcmath \
    --with-bz2=/usr \
    --enable-calendar \
    --with-curl=/usr \
    --enable-exif \
    --enable-ftp \
    --with-gd \
    --with-jpeg-dir=/usr/local/lib \
    --with-png-dir=/usr/X11R6 \
    --with-freetype-dir=/usr/X11R6 \
    --with-xpm-dir=/usr/X11R6 \
    --with-ldap=/usr \
    --with-ldap-sasl=/usr \
    --enable-mbstring \
    --enable-mbregex \
    --with-mysql=mysqlnd \
    --with-mysqli=mysqlnd \
    --with-pdo-mysql=mysqlnd \
    --with-mysql-sock=/var/mysql/mysql.sock \
    --with-iodbc=/usr \
    --enable-shmop \
    --with-snmp=/usr \
    --enable-soap \
    --enable-sockets \
    --enable-sysvmsg \
    --enable-sysvsem \
    --enable-sysvshm \
    --with-xmlrpc \
    --with-iconv-dir=/usr \
    --with-xsl=/usr \
    --with-pcre-regex=/src/pcre/pcre-local/usr/local
  20. Make PHP.
    export EXTRA_CFLAGS="-lresolv"; make
  21. Backup your php.ini
    sudo cp /private/etc/php.ini /private/etc/php.ini.bak
  22. Install new PHP
    sudo make install
  23. Restore php.ini, and restart apache.
    sudo cp /private/etc/php.ini.bak /private/etc/php.ini; sudo apachectl graceful

All and all, on a new mac mini server, this took about 20-30 minutes. And I now have a working PHP 5.3.1 install, and freetype now works with GD (allowing me to put the captcha back on my contact form under “About”. Good luck!

Reference Links: