SonarQube Installation
The pre-requisite for instalaation of java
- JAVA
- MAVEN
JAVA INSTALLATION
output wil be like this /etc/alternatives/java
output wil be like this /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-1.el8_0.x86_64/jre/bin/java
MAVEN INSTALLATION
if you got error will get like this
The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE
The output will be /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-1.el8_0.x86_64/jre/bin/java
SONARQUBE go to this website https://www.sonarqube.org/downloads/
here goto root ALL=(ALL) ALL ALL=(ALL) NOPASSWD:ALL
If we dont gine NOPASSWD here whenever yu hit the root it will ask password NOPASSWD:ALL- it wont ask password
Here we cannot run sonarqube in root due to some security issue. so we have to create a user. we will give root ownership permissions and all read write and xecute permissions.
now goto the instance change the port number in security groups now hit the ip:9000 in search bar
login details as username=admin password=admin
after logging change the password Administration-->security-->yes-->save
SONARQUBE with MAVEN Integration
here a Target folder will be created in that foldera .war file will generated
Goto the pom.xml
scroll down to properties there yu can find sonar propertiesand edit provide the <sonar.host.url>url link</sonar.host.url> <sonar.login>username</sonar.login> <sonar.password>password</sonar.password>
Here a maven-web-applications file will be generated in SonarQube site