Write it wherever you want. Choose your favourite text editor. Joe, kate, emacs, vi, nedit, gedit, jedit... there are plenty to choose from! Hell, you can even just use
if you really want!
And to run it - either set up apache (beyond the scope of what I have time to reply to here!) or upload to your web server.