apt-get install tor privoxy

edit /etc/privoxy/config
	add forward-socks4a / localhost:9050 .

change proxy settings in firefox to
	HTTP Proxy: 127.0.0.1 port 8118
	SSL Proxy: 127.0.0.1 port 8118
	FTP Proxy: 127.0.0.1 port 8118
	SOCKS v5

or the easier way is to install the torbutton extension from here

https://addons.mozilla.org/en-US/firefox/addon/2275

it will have all of the settings that you want by default


go to this webpage to see how to configure other apps to use tor as well
http://www.hermann-uwe.de/blog/howto-anonymous-communication-with-tor-some-hints-and-some-pitfalls