Appendix A. Installation and setup
The purpose of this appendix is to get you up and running on the SonarQube platform. We’ll assume that if you’re here, it’s because you’re ready to give SonarQube a try, so we’ll focus on practical advice and skip the persuasive writing.
Before you can get SonarQube up and running, there are a few prerequisites. You’ll need to have Java installed where you want to run SonarQube, at least version 6, as well as a database.
Don’t let the fact that SonarQube bundles-in the H2 database tempt you to skip this step. H2 is included as a courtesy for initial testing only and is not for long-term, production use. If you try to use H2 as your production database, we guarantee you’ll be disappointed—not least because you cannot upgrade a SonarQube database that’s stored in H2. We use MySQL because, much like SonarQube, it’s free and open source; it’s dependable; and if you decide down the road that you want paid support, it’s available. But you can use any one of the supported databases: Oracle, Postgres, SQL Server, and of course MySQL.
Once you’ve checked off the basic requirements, you can move on to installing SonarQube itself. We’ll start by walking you through verifying your Java installation and setting up the SonarQube database, then move on to installing SonarQube itself, and then finish with some advice on upgrades. For the SonarQube installation and upgrade steps, we’ll look at Windows 7 and Ubuntu Linux.