Don't bother writing one yourself - it'll just be crap that you've got to debug.
"good" in this particular software field is entirely relative. With that in mind...
[link|http://www.mantisbt.org/|Mantis] isn't bad. You could also use [link|http://www.bugzilla.org/|Bugzilla] and throw away a lot of the fields.
On the Windows side, I've used [link|http://www.numarasoftware.com/Track-It.asp|Track-IT!] and thoroughly hated it. Additional minus points for having the word "Webinar" on their product page.
We've got an in-house web-based incident-tracking thing written in Java that's pretty good. It took a very, very clever man a long time to design, write and debug it. And five years on, it's still not quite right.