Pivotal Tracker is a pretty good free tool, but it tracks your project backlog in typical Agile terms (not code and bugs per se), and it runs online (as a hosted service, not as an installable product). For code and issues, and running on a specific server of yours rather than online, consider e.g. Mercurial, Trac, and TracMercurial (you could also use Trac directly with Subversion, but distributed systems such as Mercurial are the emerging thing -- check them out;-).
There are no doubt other combinations based on other distributed versioning systems such as git and Bazaar, but I'm less familiar with them.
BTW, if you do see the advantages of using "software as a service" rather than doing your own system administration, backups, &c, Bitbucket does free online Mercurial hosting with a homebrew issue tracker (and also integrates with Lighthouse, Twitter, FogBugz, Basecamp, CIA.vc, and other software yet), and similar arrangements exist for other version control systems.
Free hosting plans do of course have limits (e.g., Bitbucket's free plan is limited to 150MB), but upgrading to large teams, multiple repositories, large codebases, &c, is all pretty painless in terms of pricing plans -- if you consider the "costs of ownership" of running your own servers (especially in terms of system administrators), you can see why "software as a service" (aka software "in the cloud") is gradually taking over -- being able to start for free and only pay if and when you need to consume more hosting resources is attractive, and of course, since we're talking about open-source software, you can always decide to switch to "your own servers" approaches any time if there's a business case for it.