Posted 1012 days ago
I just finished setting up domain based authentication on our new SVN server here at work, so I thought I'd post my notes on the process and links to what you'll need - since I found that the information was pretty disparate.
First a list of what I used, and you'll need:
- Subversion - obviously. I used version 1.2.3
- Apache Web Server - I used version 2.0.55
- mod_auth_sspi 1.0.3 - This has always been hard to come by and there's always been various patches of it floating around. This place is a unified attempt to bring all the patches together, and it works very well. Grab the one for the appropriate version of Apache2
I will assume that you've already installed both Apache 2.0.55 and SVN 1.2.3. If you haven't, please do so and then come back -- the installation for both of them is very simple and will only take you a few minutes to complete.
Step 1: mod_dav and mod_dav_svn
The first step to accessing SVN via Apache is to set up WebDAV. To do this, copy
C:\Program Files\Subversion\bin\mod_dav_svn.so
to:
C:\Program Files\Apache Group\Apache2\modules
Next edit your httpd.conf file, and add the following content:
LoadModule dav_module modules/mod_dav.so LoadModule dav_svn_module modules/mod_dav_svn.so <Location /svn> DAV svn SVNParentPath "/path/to/repositories" </Location>
This example uses SVNParentPath to point to the parent folder of multiple SVN
repositories. If you set it to C:\repositories, then any directory you create under
it, such as C:\repositories\ProjectA, is accessible under the /svn URL, like so: http://localhost/svn/ProjectA.
If you only have 1 repository, or do not plan to use multiple repositories, you could use the SVNPath directive instead, and point
it directly to your SVN repository. This approach is more flexible though, and allows for expansion without
changing your configuration files.
mod_auth_sspi and mod_authz_svn
The next step is to enable domain based authentication and access control to your SVN repositories. Copy:
C:\Program Files\Subversion\bin\mod_authz_svn.so
to
C:\Program Files\Apache Group\Apache2\modules
And edit your http.conf file again to look like this:
LoadModule dav_module modules/mod_dav.so LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so LoadModule sspi_auth_module modules/mod_auth_sspi.so >Location /svn< DAV svn SVNParentPath "D:/Engineering/svn/repos" AuthName "My SVN Server" AuthType SSPI SSPIAuth On SSPIOmitDomain On SSPIAuthoritative On SSPIDomain DOMAINNAME Require valid-user AuthzSVNAccessFile "C:/repositories/svnaccess.txt" </Location>
You can see that we've added two modules, and several lines to our Location /svn element.
Set the SSPIDomain appropriately for the domain you want to authenticate against. SSPIOmitDomain On allows you
to authenticate against the domain without specifying it as an explicit prefix, you can turn that off as you like, but it's simpler to just leave it on.
We also specify an AuthzSVNAccessFile directive that specifies the file we store our authroization information in, which leads us to:
AuthzSVNAccessFile
The AuthzSVNAccessFile specifies a plain text file that identifies which repositories users have access to. It's simple to set up, here's an example:
[groups] developers=Tom,Dick,Harry,Sally,Sue managers=Bill,Jean,Marry,Bob,Dave [repositoryname:path] @developers = rw @managers = r Bill = rw
Replace repositoryname with the name of your repository, which is a subdirectory under the
path you specified in the SVNParentPath directive, and path with the path you're
modifying, such as / for the whole repository, or /branches/Bill for a specific branch. In this example, we've given the group developers read write access, the
managers group read access, and explicitly given Bill read write access (he's a manager).
Conclusion
You should now have web-based access to your SVN repository using domain based authentication! It's a good idea at this point to further protect the repository using an SSL configuration, which I won't cover here. I have some notes on it for an Apple platform that may be useful here and here - I'll cover it explicitly for a Windows installation in another post though, hopefully sometime soon.
Posted 1023 days ago
This guide will walk you through installing Apache2 and SVN using Fink on OS X 10.4. You should be able to follow the same instructions for 10.3; however, there is not currently a stable release of SVN in the fink repository for OS X 10.2 and earlier.
Fink is a package management system for OS X based on Debian Linux's apt-get system. Since it compiles packages from source, you'll need to have Apple's Developer Tools installed. The latest version of the developer tools will install the necessary compilers - GCC 4.0 and GCC 3.3.
Installation
Fink
You can download Fink at fink.sourceforge.net. Currently, the latest stable release is 0.8.0 for OS X 10.4, 0.7.2 for OS X 10.3 and 0.6.4 for OS X 10.2. You should download the latest available stable release for your platform.
Once you've installed Fink you should update it. Open a Terminal window and run:
sudo fink self-update
This will cause Fink to check for updates to itself, as well as download the latest package information. You may be asked to provide information about how Fink should be configured, and in most circumstances you'll be fine to just accept the defaults.
Apache2
We'll install Apache 2 with SSL support first. This will allow us to configure Subversion to work through secure http connections.
sudo fink install apache2-ssl
You'll be prompted by Fink to satisfy a virtual dependency:
fink needs help picking an alternative to satisfy a virtual dependency. The candidates: (1) apache2-ssl-mpm-worker: Apache2 Server Binary - [MPM WORKER] (2) apache2-ssl-mpm-perchild: Apache2 Server Binary - [MPM PERCHILD *EXPERIMENTAL*] (3) apache2-ssl-mpm-prefork: Apache2 Server Binary - [MPM PREFORK] (4) apache2-ssl-mpm-leader: Apache2 Server Binary - [MPM LEADER *EXPERIMENTAL*] (5) apache2-ssl-mpm-threadpool: Apache2 Server Binary - [MPM THREADPOOL *EXPERIMENTAL*]
Unless you have a preference in mind already, choose the default (1) to install MPM Worker. You may be prompted again to satisfy a second dependency:
fink needs help picking an alternative to satisfy a virtual dependency. The candidates: (1) db43-ssl: Berkeley DB embedded database (2) db43: Berkeley DB embedded database - non crypto
And again, unless you have a preference in mind, choose the default.
Fink will prompt you with the list of dependant packages that will be installed, simply press enter to accept, and let Fink work its magic.
Next we'll install the mod_ssl module for Apache2, by executing:
sudo fink install libapache2-ssl-mod-ssl
When it's done, you'll be able to start Apache2 by executing:
/sw/sbin/apachectl start
And stop it using:
/sw/sbin/apachectl stop
Subversion
Installing Subversion with Fink is equally simple. svn-ssl installs the SVN server utilities, and svn-client
installs the SVN client software; we'll install the SSL enabled versions of both these packages.
sudo fink install svn-ssl sudo fink install svn-client-ssl
If you're prompted to satisfy dependencies, the defaults will usually do. Simply sit back and and let Fink work its magic.
WebDAV
The final package we'll install is libapache2-ssl-mod-svn which enables serving respositories using WebDAV.
sudo fink install libapache2-ssl-mod-svn
Configuration
SSL
Now that we have everything installed, we'll configure Apache2 for SSL support. Most of the work has already been done for us by Fink, but we still need to create and install our own self signed RSA certificate. See my guide to creating an apache2 SSL certificate to create a private key file and self signed public key certificate, and then do the following to install it into Apache2:
sudo mkdir /sw/etc/apache2/ssl.key sudo mkdir /sw/etc/apache2/ssl.crt sudo cp ~/server.key /sw/etc/apache2/ssl.key/ sudo cp ~/server.crt /sw/etc/apache2/ssl.crt/ chmod 0400 /sw/etc/apache2/ssl.key/server.key chmod 0400 /sw/etc/apache2/ssl.crt/server.crt
Now, when you start Apache, you'll be prompted for your private key's password; this is because it is encrypted for security reasons. This can be a nuissance, but it's recommended that you keep it this way. If you decide not to, however, here's the steps to decrypt it so you're not prompted anymore:
cd /sw/etc/apache2/ssl.key cp server.key server.key.orig openssl rsa -in server.key.orig -out server.key
Creating SVN Repositories
Choose a location on your hard drive under which all your SVN repositories will reside. I'll use /opt/repositories, but
the location really doesn't matter. We'll create a new "test" repository in this directory:
mkdir /opt/repositories/ mkdir /opt/repositories/test svnadmin create /opt/repsitories/test
I like to set the file system permissions on it such that only Apache2 can write to it:
sudo chown -R www /opt/repositories/test sudo chmod -R 0700 /opt/repositories/test
You should substitute the name of the user you run Apache2 as for "www".
WebDAV Access and Authentication
Finally, we'll enable WebDAV access to your SVN repository in Apache and set up user authentication. Add the following
to your /sw/etc/apache2/ssl.conf file:
<Location /svn>
DAV svn
SVNParentPath /opt/repositories
AuthType BASIC
AuthName "Subversion Repository"
AuthUserFile /sw/etc/apache2/svn-auth-file
Require valid-user
</Location>
We'll then create the /sw/etc/apache2/svn-auth-file using htpasswd. You'll use this file to maintain the list
of users and passwords that can access your repositories.
sudo htpasswd -cm /sw/etc/apache2/svn-auth-file
This will create a new user file and add the specified user to it. You can use htpasswd to add, remove and edit users from this file as you see fit.
Conclusion
You'll now have a secure SVN server accessible through Apache2 using WebDAV.
Posted 1034 days ago
Apple posted an article yesterday titled "Getting Control with Subversion and XCode". I've only had time to skim it briefly, but it seems to be a pretty decent guide to setting up Subversion with Apache 2 and WebDAV - and then integrating SVN into XCode! I'm going to give this a try tonight, I'll posts results later.
Meanwhile, here's the article.
Posted 397 days ago
About a week ago, maybe two, instructions were posted on the net to tether your iphone's EDGE connection -- allowing you to make full use of your unlimited data plan via your laptop. A notably missing feature in the iPhone, as every other EDGE enabled device I've ever owned allows you to do this with ease.
The instructions were posted for Windows and Mac though, and while I love my Mac, my laptop runs RHEL 5... as such, here's the instructions to tether your iphone's EDGE to your linux box.
Assumptions
- You have a jailbreak'd iphone.
- You're comfortable with Linux, and have wireless-tools installed in your distro
The Process...
First, download the iPhone Tether Kit. DO NOT run the scripts in this zip. Copy the srelay binary to /usr/bin on your phone, and net.sourceforge.socks-relay.srelay.plist into /System/Library/LaunchDaemons on your phone... you can accomplish this using scp if you installed ssh, otherwise, use iPHUC.
NOTE: if you copied the files using iPHUC, you'll need to set the executable bit on /bin/srelay using chmod. This sounds easy, but it's a process documented elsewhere (see the installing ssh instructions).
Reboot your iPhone, and you'll have an open socks relay server!
That's the easy part, and this next one's even easier...
Open up a command line terminal, and identify your wireless adapter using iwconfig. Mine's eth1, so we'll do the following:
ifconfig eth1 down iwconfig eth1 mode ad-hoc iwconfig eth1 essid "My AdHoc Network" ifconfig eth1 up ifconfig eth1 10.3.3.1
This sets up an adhoc wireless network with ESSID "My AdHoc Network". Pretty simple.
All you need to do now is connect your iPhone to it. In Settings->Wi-Fi, select "My AdHoc Network" from the list, and edit it's settings. Press "STATIC" to set a static IP with no router... I entered "10.3.3.2" for my IP and "255.255.255.0" for my subnet mask, and left the other values blank.
This will connect your iPhone to your adhoc network, and the Phone will use EDGE for its data connection. Now all you need to do is tell your client apps on your laptop to use the SOCKS proxy at 10.3.3.2:1080, and voila! You're accessing the internet via iPhone's EDGE connection on your laptop.
Many thanks to:
- NerveGAS
- NightWatch
- Everyone at #iphone
Posted 400 days ago
Well I was bored tonight, so I went ahead and hacked the hell out of my iphone.
Thanks to the guys over at iPhone Five Forty and the iPhone Mobile Terminal, I know have a BASH console on my phone. I also went ahead and installed SSHD, Apache 1.3, Python 2.5.1, and Ruby 1.8.6
Can anyone say fan-freaking-nominal?
Resources
- http://iphone.fiveforty.net
- http://iphone.natetrue.com
- http://code.google.com/p/mobileterminal/
Posted 404 days ago
Just a quick note to any of you who are going to install iPhone Update v1.0.1 on your iPhones -- if you've made any modifications to your iPhone, for instance, added custom ringtones, you'll put your phone into recovery mode and be forced into a full restore. Make sure you've synced and backed up everything you want before you do this!
Posted 860 days ago
Apple posted their new TV spots on their website, including the one regarding Mac's immunity to viruses.
Thought I'd post a couple corrections to my previous post.
First, Mac Guy isn't wearing a suit, he's just a laid back dude. Second, if you pay attention to the verbeage, you'll note that it doesn't actually claim immunity - it just points out that there were over 114,000 viruses for PC last year, not mac, and that Mac Guy won't catch PC Guy's virus. While this is probably true, I still stand by my original opinion that this was a horrendous move on Apple's part. The TV spot is clearly designed to hype OS X's immunity to such ailments, and that's going to come back to bite them in the ass as soon as someone releases something into the wild that makes you lose your data.
Using a Mac doesn't make your data secure. It probably makes it more secure than it would be on a Windows box - simply due to differing architectures and out of the box configurations - but regardless of your platform of choice, you must be aware of the threats and be proactive about them in order to avoid problems later.
They have a few more commercials, most of which are pretty funny - in particular the one about restarting. In the years I've been using a Mac, I've only ever had to restart one due to a crash about a half-dozen times. Many of those crashes were caused by me overrunning a graphics buffer while doing poorly thought out work in my Computer Graphics course back in the day, and only maybe two due to unexplainable circumstances.
It's worth noting further than when the Mac does crash, it does so in a manner that does not terrify... a simple message is displayed with a transparent background stating that something unexpected happened, and you must restart your computer; whereas Windows prompts you with the BSoD filled with hex code, memory addresses, and other data that might be relevant to the crash, but which no user would ever find informative.
Posted 860 days ago
I was mortified last night on behalf of the tech-savvy Apple user community. Much to my horror, I actually saw a commercial on TV for Mac and OS X starring two two men in business suits, one of whom represented Mac and the other PC (anyone else find Anthropomorphism humorous?); PC man was afflicted by a common cold. Mac man touts his prowess as being generally immune to such viruses.
Now, as a Mac user of several years and counting, I've never encountered a computer virus. However, with the media and tech communities all abuzz with proof-of-concept viruses, and making statements that Apple has been lax in implementing appropriate measures to ensure their OS is virus free, running a 30 second commercial proclaiming your immunity is the dumbest thing you can do.
Apple's OS X is, in my opinion, generally more secure than Windows in an out-of-box configuration simply because of it's roots in the BSD world. However, no operating system or computer installation could ever be immune to viruses. The simple fact of the matter is if you don't want to get a computer virus, you must take the following precautions:
- Never connect your computer to the internet.
- Never insert media into your computer from a third party.
- Never allow a computer that has ever violated either of these rules to be networked to your computer in any way.
Further, I'd like to point out that many viruses in the world take advantage of flaws in the software you run on top of your operating system - not the operating system itself. Therefore, even if it were valid to state that an operating system is entirely immune, it's still a completely meaningless statement! We all run software on our computers, and virtually every piece of software you run will expose some level of security threat to your computer.
What Apple needs to do is step down from their high horse and openly admit what the tech community already knows; no computer is safe. OS X tends to be safer for a variety of reasons, the most significant being lack of interest in attacking the platform. With the ever growing popularity of OS X, though, that level of interest in the malware community is going, and will continue, to grow... attacks will be made, viruses written, and our computers will be compromised... OS X, Windows or otherwise.
It's also worth noting that in all the time I've used Mac OS X and not gotten a virus, I've also been using PC's running either Linux or Windows and have never been comprimised on those platforms either. It's all about taking good precautions, running virus scanning software, sitting behind a firewall (built into most network routers you can pick up at the local Best Buy, Office Max, Staples, etc), and updating your software with the latest security patches.
So to close, I repeat, someone should be fired for approving that ad. It was a terrible idea, and will only further peak the interest of those who now wish to do harm to the platform that's touted as immune among the naive.
Posted 861 days ago
I checked my Google Analytics data this afternoon to get a feel for what my readers are reading... here's a list of the most popular posts on my site -- interestingly, they were some of my favorites too.
- Getting Started with Struts Shale
- How to Create an ATOM Feed
- Securing EJB Applications with Custom JBoss Login Modules
- Apache Rewrite Rules
- Installing Apache2 and SVN using Fink on OS X
So, according to Google, that's the best of Tim Fanelli (dot com)
Posted 871 days ago
Any of you who've spent more than a couple hours in my presence (I'm sorry), know beyond much of a doubt that I'm what Cheese likes to call a "Fan Boy." I admit it. I'm a marketer's wet dream. Show me a pretty picture of something with buttons and I'll want to buy it.
Unfortunately for me, Apple excels at putting together pretty pictures of things with buttons.
I'm typing to you while lying on my floor infront of my entertainmnt stand in my living room; staring wide-eyed at my 30" high definition TV which is currently playing "monitor" to my new Core Duo Mac Mini. I wanted to post some first impressions of the mini with Front Row as a relative new-comer to the Media PC world.
I say "relative new comer" because I follow the world with some green-eyed wonder. I've done the TiVo thing. I've done the TV-Tuner card thing. My friends have a MythTV Box of Doom of which I'm envious. I've just never had the opportunity to set one up for myself... and after years in the out-of-the-box world of OS X, the do-it-yourselfiness of setting up a linux media PC had been keeping me away. I don't know that it would have been all that difficult... but Uncle Steve (as I like to call him) has spoiled me. I'm a brat. A fan boy brat.
So needless to say I was thrilled with my new investment. Not only did it detect my bluetooth keyboard and mouse on initial startup, it also correctly chose the proper wide-screen resolution supported by my TV. After some initial set up of ripping my music collection off my iPod onto my new mini (which includes Lost Season 2 Episode 1), I quickly grabbed my Apple Remote to play with Front Row.
Front Row is ... well ... dreamy. I love everything about it. I think it could use a couple more features, but I won't go into that here. Having my entire music collection at the tip of my thumb without having to crouch down to look at my iPod (also hooked into my sound system thanks to an iPod Universal Dock) is awesome. I listen to music more than I watch TV, and being able to scroll my play lists, artist lists, and anything else I can access in iTunes is just great. It's fast, it couldn't be simpler, and the on-screen display of what's playing -- it's like having a 30" iPod.
After playing with the music, I flipped to Videos and threw on Lost... while I'm not thrilled with the large-screen quality of the 320x240 video from the iTunes Music Store, browsing videos, playing, pausing, fast forwarding, etc... it's all as simple and intuitive as you'd expect. Of course the real test was DVD's... since I have my Mini hooked up using an HDMI cable, my TV recognizes it as a 1080i input source. And thanks to a handy multi-function line-out jack, I have the Mini hooked into my sound system using a digital optical cable for full 5.1 surround. I popped in Star Wars Episode IV and was taken away. The picture clarity was better than my actual DVD player (which I've come to find out had Progressive Scan turned off...) and the 5.1 Dolby Digital Surround worked without a hitch.
So as if having my entire music collection and new dvd-player in one weren't enough... I went and hooked up 500G of external firewire storage to it, and have been ripping my entire DVD collection to MPEG4/AAC format. Now, in just three tiny little well-matched boxes (the mini, and two 250G stackable LaCie mini fw hd's), I have my entire music collection, my entire movie collection, and the ability to rip DVDs in uber-high quality, all accessible using a tiny white 6 button remote.
All in all, I'm impressed. Did any of you expect that I wouldn't be?
Posted 1023 days ago
This guide will walk you through installing Apache2 and SVN using Fink on OS X 10.4. You should be able to follow the same instructions for 10.3; however, there is not currently a stable release of SVN in the fink repository for OS X 10.2 and earlier.
Fink is a package management system for OS X based on Debian Linux's apt-get system. Since it compiles packages from source, you'll need to have Apple's Developer Tools installed. The latest version of the developer tools will install the necessary compilers - GCC 4.0 and GCC 3.3.
Installation
Fink
You can download Fink at fink.sourceforge.net. Currently, the latest stable release is 0.8.0 for OS X 10.4, 0.7.2 for OS X 10.3 and 0.6.4 for OS X 10.2. You should download the latest available stable release for your platform.
Once you've installed Fink you should update it. Open a Terminal window and run:
sudo fink self-update
This will cause Fink to check for updates to itself, as well as download the latest package information. You may be asked to provide information about how Fink should be configured, and in most circumstances you'll be fine to just accept the defaults.
Apache2
We'll install Apache 2 with SSL support first. This will allow us to configure Subversion to work through secure http connections.
sudo fink install apache2-ssl
You'll be prompted by Fink to satisfy a virtual dependency:
fink needs help picking an alternative to satisfy a virtual dependency. The candidates: (1) apache2-ssl-mpm-worker: Apache2 Server Binary - [MPM WORKER] (2) apache2-ssl-mpm-perchild: Apache2 Server Binary - [MPM PERCHILD *EXPERIMENTAL*] (3) apache2-ssl-mpm-prefork: Apache2 Server Binary - [MPM PREFORK] (4) apache2-ssl-mpm-leader: Apache2 Server Binary - [MPM LEADER *EXPERIMENTAL*] (5) apache2-ssl-mpm-threadpool: Apache2 Server Binary - [MPM THREADPOOL *EXPERIMENTAL*]
Unless you have a preference in mind already, choose the default (1) to install MPM Worker. You may be prompted again to satisfy a second dependency:
fink needs help picking an alternative to satisfy a virtual dependency. The candidates: (1) db43-ssl: Berkeley DB embedded database (2) db43: Berkeley DB embedded database - non crypto
And again, unless you have a preference in mind, choose the default.
Fink will prompt you with the list of dependant packages that will be installed, simply press enter to accept, and let Fink work its magic.
Next we'll install the mod_ssl module for Apache2, by executing:
sudo fink install libapache2-ssl-mod-ssl
When it's done, you'll be able to start Apache2 by executing:
/sw/sbin/apachectl start
And stop it using:
/sw/sbin/apachectl stop
Subversion
Installing Subversion with Fink is equally simple. svn-ssl installs the SVN server utilities, and svn-client
installs the SVN client software; we'll install the SSL enabled versions of both these packages.
sudo fink install svn-ssl sudo fink install svn-client-ssl
If you're prompted to satisfy dependencies, the defaults will usually do. Simply sit back and and let Fink work its magic.
WebDAV
The final package we'll install is libapache2-ssl-mod-svn which enables serving respositories using WebDAV.
sudo fink install libapache2-ssl-mod-svn
Configuration
SSL
Now that we have everything installed, we'll configure Apache2 for SSL support. Most of the work has already been done for us by Fink, but we still need to create and install our own self signed RSA certificate. See my guide to creating an apache2 SSL certificate to create a private key file and self signed public key certificate, and then do the following to install it into Apache2:
sudo mkdir /sw/etc/apache2/ssl.key sudo mkdir /sw/etc/apache2/ssl.crt sudo cp ~/server.key /sw/etc/apache2/ssl.key/ sudo cp ~/server.crt /sw/etc/apache2/ssl.crt/ chmod 0400 /sw/etc/apache2/ssl.key/server.key chmod 0400 /sw/etc/apache2/ssl.crt/server.crt
Now, when you start Apache, you'll be prompted for your private key's password; this is because it is encrypted for security reasons. This can be a nuissance, but it's recommended that you keep it this way. If you decide not to, however, here's the steps to decrypt it so you're not prompted anymore:
cd /sw/etc/apache2/ssl.key cp server.key server.key.orig openssl rsa -in server.key.orig -out server.key
Creating SVN Repositories
Choose a location on your hard drive under which all your SVN repositories will reside. I'll use /opt/repositories, but
the location really doesn't matter. We'll create a new "test" repository in this directory:
mkdir /opt/repositories/ mkdir /opt/repositories/test svnadmin create /opt/repsitories/test
I like to set the file system permissions on it such that only Apache2 can write to it:
sudo chown -R www /opt/repositories/test sudo chmod -R 0700 /opt/repositories/test
You should substitute the name of the user you run Apache2 as for "www".
WebDAV Access and Authentication
Finally, we'll enable WebDAV access to your SVN repository in Apache and set up user authentication. Add the following
to your /sw/etc/apache2/ssl.conf file:
<Location /svn>
DAV svn
SVNParentPath /opt/repositories
AuthType BASIC
AuthName "Subversion Repository"
AuthUserFile /sw/etc/apache2/svn-auth-file
Require valid-user
</Location>
We'll then create the /sw/etc/apache2/svn-auth-file using htpasswd. You'll use this file to maintain the list
of users and passwords that can access your repositories.
sudo htpasswd -cm /sw/etc/apache2/svn-auth-file
This will create a new user file and add the specified user to it. You can use htpasswd to add, remove and edit users from this file as you see fit.
Conclusion
You'll now have a secure SVN server accessible through Apache2 using WebDAV.
Posted 1034 days ago
Apple posted an article yesterday titled "Getting Control with Subversion and XCode". I've only had time to skim it briefly, but it seems to be a pretty decent guide to setting up Subversion with Apache 2 and WebDAV - and then integrating SVN into XCode! I'm going to give this a try tonight, I'll posts results later.
Meanwhile, here's the article.
Posted 1047 days ago
Posted 1055 days ago
Apple is great if for no other reason than that the price range on configurations of their top of the line computer model is ,000 to 5,000! Where else.
Of course, 5,000 gets you an awful lot of computer for your money:
Specifications:
* 2.5GHz Quad-core PowerPC G5
* 16GB 533 DDR2 ECC SDRAM- 8x2GB
* 2x500GB Serial ATA - 7200rpm
* QUADRO FX 4500 512MB SDRAM
* Apple Cinema HD Display (30" flat panel)
* Apple Cinema HD Display (30" flat panel)
* Bluetooth Module + AirPort Extreme Card
* Apple USB Modem
* 16x SuperDrive DL (DVD+R DL/DVD±RW/CD-RW)
* Fibre Channel PCI Express Card (w/ SFP-SFP cable)
* Apple Keyboard & Mighty Mouse - U.S English
* Mac OS X - U.S. English
* Mac OS X Server (Unlimited-Client)
* Final Cut Express HD + Motion 2 preinstalled
* Accessory kit
* AppleCare Protection Plan for Power Mac (w/ or w/o Display)
Yowza.
Posted 1121 days ago
Justin Williams over at Mac Zealots posted an article back in April about the various development technologies that ship in OS X Tiger, called Max OS X Tiger: For Developers. He gives a great overview of the platform and why it is, indeed, a developer's paradise.
In addition to the tools and technologies that come with OS X, I also use Ximian's Mono Project for C# development and Java 1.5 Tiger (OS X still ships with 1.4.2, but you can get 1.5 from apple here).
As for development environments, I'm primarily using Apple's XCode 2 nowadays. C# development is best done in using MonoDevelop, which runs using GTK# under X11. Installation can be a little tricky, Brian Jepson provides instructions here. For Java development, I love JetBrain's IDEA, but it's not free (as in speech or beer); but for it's features and stability, I think it's worth the price; I own a license for IDEA 4.5, and IDEA 5.0 was just recently released. Of course for you Unix freaks there's always trusty vi and emacs.
Most popular open source databases are available for OS X as well, Mark Liyanage has assembled native OS X installation packages for MySQL and PostgreSQL
For you web developers, OS X ships with Apache 1.3.3 with mod_php (version 4), mod_perl and mod_dav. You can get mod php 5 from Mark Liyanage as well. You can install Apache 2 using a package management tool like Fink. Tomcat 5.0 and 5.5 run on OS X as well under Java 1.4.2 and 1.5 respecitvely. For something more robust in the Java world, there's also JBoss.
Finally, most (if not all) of your favorite project management tools work for OS X as well, including Ant, make, Maven, CVS, and Subversion.
So all in all, you really can't miss as a developer on the OS X platform; and since it's a BSD at heart you'll have virtually no work to do in porting existing projects... It's what drove me to make the switch back in 2002, and I've never looked back.
Posted 1226 days ago
So I've been struggling for a while with finding a way to debug web applications in XCode. The answer wasn't immediately obvious. I'm sure it would have been if I happened to have Apple's WebObjects, but I don't; just XCode. Well today I figured out how to do it -- you run Tomcat directly from within XCode!
Now before we get started, I want to point out that I realize there are pros and cons to doing this -- I'm going to save those for the end.
My setup
Here's the software I have installed to work with:
- OS X 10.4 Tiger
- XCode 2
- Java 1.5.0 (also "Tiger")
- Tomcat 5.5.9 (installed in /opt/tomcat)
Step 1: Creating a new project
If you already have a project you want to try this with - just skip to step 2.
If you don't already have an XCode project, now's the time to make it. I used the "Java: Ant Based Application Jar" project template in XCode. This creates a new project with an ant build script, and src and lib directories. Making yourself a nifty servlet that looks something like this:
import java.io.*;
import javax.servlet.http.*;
import javax.servlet.*;
public class javaplay extends HttpServlet {
public void doGet ( HttpServletRequest req,
HttpServletResponse res )
throws ServletException, IOException
{
PrintWriter out = res.getWriter();
out.println("Hello, world!");
out.close();
}
}
is a great beginning. You'll also want to make yourself a WEB-INF/web.xml file, like so:
<web-app>
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>javaplay</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
</web-app>
And then modify your build script a little bit a make the WAR. Mine is embarrasing, so I'm not going to show it to you. There's two steps though:
- Make a new target that creates a WAR and depends on "compile"
- Change the default target of your build script to call your new target.
Ok great, one last final step, grab your servlet-api and jsp-api jars and copy them into your projects "lib" directory. The build script needs these in lib to resolve against at compile time. Now go ahead and build your project to make sure it goes smoothly and generates the WAR as expected.
Had a problem, did you? That's okay... I'll wait till your done.
( ... jeopardy theme ... )
Step 2: Tying in Tomcat
This part's also very easy -- you're going to create a new executable target that starts Tomcat. My setup has Tomcat 5.5.9 installed into /opt/tomcat.
Right-click (ctrl-click) "Executables" under Groups & Files and
select "New Custom Executable". Name it something meaningful, such as "Tomcat", and set
the executable path to: /usr/bin/java. When you press "Finish" you'll get the
"Executable Tomcat Info" dialog up. Go to the Arguments tab, and add the following set of
arguments, in order:
-classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/commons-logging-api.jar -Dcatalina.home=/opt/tomcat -Xmx128m -Xms64m -Xincgc -Djava.awt.headless=true org.apache.catalina.startup.Bootstrap -debug start
Set your new target to be the active target, and run your project. You'll notice that your console output is Jakarta Tomcat starting up! Not too shabby, eh?
Step 3: There is no step 3
That's it. Just deploy your webapp to tomcat, start it up under XCode, and you're good to go. Give it a try, set a break point in your servlet code and hit the page through a web browser.
Conclusion
One thing I did to make my life easier in this setup is to make my default ant target automatically deploy the WAR file to my tomcat directory. That way when I hit "Build & Debug", it builds, deploys, and launches tomcat in my debugger.
Well I hope you found this helpful. I know I keep having to go back to using IntelliJ IDEA for my servlet based projects up until now I haven't been able to figure this out. I'm still looking into getting the XCode debugger to hook up to a remote Tomcat session, and I'll be posting info about that soon (I hope). If anyone out there has info on doing that, please get in touch with me.
Posted 1235 days ago
Well as you all know the Tiger is out. You can download Java 1.5 here and the Java 1.5 developer documentation here. The Java 1.5 installer does not make itself your default java though, so you should do two things:
- In /Applications/Utilities/Java/JS2E 5.0, run the Java Preferences, and set your default Java version to be J2SE 5.0.
- Open a terminal window and execute the following:
cd /System/Library/Frameworks/JavaVM.framework/ sudo rm Versions/CurrentJDK sudo ln -sf Versions/1.5 Versions/CurrentJDK
Now everyone's defaulting to Java 5.0 - huzzah!
Posted 1495 days ago
Well I was wrong -- OS 10.4 Developer Preview DOES include Dashboard -- and it is awesome. Just thought I'd add that. I've got a bit of a eadache right now, otherwise I'd post screen shots and what not. But you'll just have to wait.
Posted 1497 days ago
Well I'm back in Potsdam for the week, so i finally got to check my mail -- and what do I find in my mail? Two interesting things. The first has nothing to do with this post, but I figure I'll mention it anyway. I receieved a letter from my bank. The letter was a thank you for signing up for internet banking on my checking account. I signed up for internet banking 3 years ago... the date on the letter -- November 28, 2001. The postmark -- November 29, 2001 :). Thank you USPS for your speedy service.
The second, and more important, thing burried in the stack of catalogs and bills -- was my ADC mailing with OS X Tiger (10.4) Developer Preview discs in it! yay!
So of course I ran right home and installed it. It's pretty sweet. On the surface of things, it's not terribly different than Panther (10.3) -- The Spotlight search is amazing. It sifts through all your stuff and searches for terms, and then sorts the results out by application. So, for instance, if I type "Zedak", I get a list of emails containing the name "Zedak", a list of calendar entries containing "Zedak", a list of word documents containing "Zedak", etc. etc. etc., and it's very quick about it too :).
I am in love with safari RSS -- it kind of makes Eat My Feed pretty useless...
Automator and Dashboard don't appear to be part of the developer preview infortunately. I was really looking forward to them. Oh well...
That's really the only new feature I've discovered so far. It looks and feels a lot like Panter did. There's some minor changes to window decorations, and there's support for 64 bit G5's on the UNIX end of things -- don't have the hardware for that. I got to install the Java 1.5 DP1 release now that I'm using 10.4, and that's pretty cool :). I've been dying to play with some new java features. Maybe I'll incorporate some into Eat My Feed.
Oh well. that's all for now :).
Posted 1499 days ago
Apple is great. I just thought I'd rave about their hardware a little. About three weeks ago I decided it was time to use my ADC Hardware Purchase Program credit and upgrade my laptop. I was holding out all year foolishly hoping that the G5's would make it into the portable line up... and my credit expires in September, so I had to use it or lose it.
What I got is a 15" Powerbook G4 1.5Ghz with 1.5GB RAM. This is an amazing machine. My previous laptop was a 17" Powerbook G4 1.0Ghz w/ 768M RAM -- and I'm pleased to say that my new toy is noticeably faster across the board.
For the most part, the innards are the same. 167Mhz FSB, DDR2700 SODIMM's. It's got a 50% faster clock speed on the CPU, and double the RAM from my old setup though, which makes a huge difference when I'm running JBoss or Tomcat for development. My Java IDE, IDEA 4.5, also performs extraordinarily well. Aside from that the only internal difference is the 5400 RPM hard drive, up from 4200 in my old machine. Also, I opted for the 128M video ram instead of the stock 64M, so I can play the Sims with ease. hahaha.
On the outside, the only difference is the screen size. I thought I'd miss my 17" screen, that was a lot of realestate for a laptop, and it was great to have. After working on the 15" for a couple days though, I can honestly say I don't miss it at all. I had to do a little rearranging to get used to the smaller screen width - but I don't feel like I'm missing anything, or limited by it at all. Apple's Expose gets used slightly more often now than it did on the 17" though :).
All in all a fantastic machine. So much so that I just had to take time out of my day to make a post about it.
Posted 1675 days ago
I recently had a request for my opinion about Java's performance under OS X. Unfortunately I don't have any valid method of comparison other than my own personal experience, and even that doesn't provide too much.
Some background first: I've been using Macs for about 2 years now, and I must say they are the best systems I've ever used. From an aesthetic point of view, the hardware is just plain sexy; from a practical standpoint, it's fast and reliable. (I also have many fast reliable x86 boxes... the point of this is not to start a flame war!). The operating system was the main selling point for me; in the x86 world I am a *NIX user (linux on some, darwin on others, and i'm thinking about getting my hands dirty with Hurd) -- but I keep my x86 world to server functions rather than using them as desktops now. This is because after discovering Apple's Aqua interface on OS X, and knowing that BSD and all my favorite and familiar tools are just under the covers, I could never go back.
So as an Enterprise Java developer -- this left me with the question: sure it looks great, is easy to use, and is a BSD, but what about Java?
"What about Java?" is a loaded question. There's many aspects to Java... most end users would particularly be interested in GUI performance, as Java has the notorious reputation for having bad interface performance. As developers, GUI performance is also important, not only in our development, but also in the tools we use... most Java IDE's are themselves written in Java, and if they don't work well, we don't work well. We also need to be concerned with the performance of our tools, such as the java compiler, the Ant build system, and anything else you happen to use. As Enterprise Developers we further have the headache of needing to run application servers, I myself use JBoss, many others perhaps use Apple's WebObjects, or maybe even just the Sun Reference Implementation.
Like I said above, I don't have any formal measurement for performance, just my own experience... but on all of the above noted points, I am thrilled with Java's performance on OS X.
Apple's has done an enormous amount of performance tuning in the Swing and JFC libararies in their JRE implementation; so much so, in fact, that I can rarely notice a difference between running Swing applications and Cocoa (apple's native UI) applications.
The only real "tool" I use regularaly is Ant. For the sake of this article, I took my current project tree and compiled it on my Mac, and also on my IBM workstation (specs at the bottom of this post...). A clean build of my project tree on the Mac took a solid 1.2 seconds longer than on my IBM (and when you look at the specs, you'll see why); and with an average build time of 27 seconds, a 1.2 second discrepancy is perfectly acceptable.
How about my application server... I mentioned that I use JBoss. For those of you who have never started JBoss, it has the nice little feature of telling you how long it took to start the JBoss Microkernel after the server initialization is complete. Now here, I definitely have no valid comparison to my x86 server (again, specs below...). I can start JBoss on my Mac in just under 20 seconds. My colleagues at IBM who are helping to test my system tell me they're server starts JBoss in about 25, unfortunately the only specs I have on their system is that it's a mid-range P4 desktop running Windows XP. I don't know what they have to memory, processor speed, bus speed, or if they have a hyperthreading processor.
So -- what's all this tell you about performance of Java on OS X? -- unfortunately not much. Just my personal experience with it, and I'm thrilled. I've had no issues with it whatsoever, performance or functional.
A couple points worth mentioning:
- XCode, Apple's development suite, has fantastic support for developing Java projects, and it's entirely free... it comes with OS X infact. I use it frequently. (My primary IDE is IntelliJ's IDEA).
- The JRE on OS X is put out by Apple, not Sun. From what I understand the Sun people work very closely with Apple to ensure the JRE is 100% compatible with the actual Sun implementation; Apple prefers to put out their own JRE so that they can provide performance tuning specifically for their hardware and operating system.
System specs:
- My mac: A PowerBook G4 17" 1.0 Ghz w/ 768 Meg RAM
- IBM Desktop: Intellistation X Pro Pentium 4 2.8 Ghz w/ 2G RAM and Hyperthreading enabled
- IBM Server: Intellistation Z Pro: Dual Xeon 2.8 Ghz w/ 2.5G RAM and Hyperthreading enabled
As you can see, my x86 equipment far surpasses my laptop as far as performance goes... so my psuedo-runtime numbers on each platform should be compared with a grain of salt.
add to
del.icio.us