Install SonarQube on MacOSX
- Make sure you have
homebrewinstalled in your machine, otherwise follow instrunctions at brew.sh.
- Open terminal, run
brew install sonar. Assuming brew installs SonarQube successfully, take a look at the last line of the terminal where the SonarQube location is printed. In my case it is
- Now run
brew install sonar-scanner(N.B. sonar-runner is no longer available, it’s replaced by sonar-scanner).
- After installation is complete, run the following commands consecutively:
export SONAR_HOME=/usr/local/Cellar/sonar-scanner/184.108.40.2067/libexec export SONAR=$SONAR_HOME/bin export PATH=$SONAR:$PATH
[Note: exporting path in this way will work for the current session of terminal, for permanent use, I need to transfer these path variables to .bashrc file.]
- Now we can run SonarQube from terminal by issuing this command
- Go to http://localhost:9000/ (or appropriate port based on your system) to view the main page of SonarQube. Use this credentials (username: admin, password: admin) to login.
References (a bit deprecated):