Step-by-step walkthrough

When you search for "drupal syntax highlighting" you will likely get a lot of results involving installation of modules most of them still in beta stage of development. Most of the code you'll find is using SyntaxHighlighter library, which is easy to install and use. Indeed, this excellent library is so easy to use, you don't need any module at all to take advantage of it on your Drupal site. Here's step-by-step tutorial: