Instance should have at least 2 GB RAM. For AWS or Azure cloud, instance should be atleast 2 GB RAM
Install Open JDK 11
Postgres DB Setup
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/
sudo apt-get -y install postgresql postgresql-contrib
Ignore the message in red color below:
sudo systemctl start postgresql
sudo systemctl enable postgresql
sudo su - postgres
9. Switch to sql shell by entering
psql
Execute the below three lines (one by one)
ALTER USER sonar WITH ENCRYPTED password 'password';
CREATE DATABASE sonarqube OWNER sonar;
GRANT ALL PRIVILEGES ON DATABASE sonarqube to sonar;
and then type exit to come out of postgres user.
3. Download SonarQube and Install
sudo apt-get -y install unzip
sudo unzip sonarqube*.zip -d /opt
sudo mv /opt/sonarqube-8.6.0.39681 /opt/sonarqube -v
sudo vi /opt/sonarqube/conf/sonar.prop
uncomment the below lines by removing # and add values highlighted yellow
sonar.jdbc.username=sonar
sonar.jdbc.password=password
sonar.jdbc.url=jdbc:postgresql
Now press escape button, and enter :wq! to come out of the above screen.
Execute the below command:
sudo vi /etc/systemd/system/sonar.serv
add the below code in green color:
[Unit]
Description=SonarQube service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/sonarqube/bin/l
ExecStop=/opt/sonarqube/bin/li
LimitNOFILE=131072
LimitNPROC=8192
User=sonar
Group=sonarGroup
Restart=always
[Install]
WantedBy=multi-user.target
Add the following lines to the bottom of that file:
vm.max_map_count=262144
fs.file-max=65536
Next, we're going to edit limits.conf. Open that file with the command:
sonar - nofile 65536
sonar - nproc 4096
sudo systemctl status sonar
type q now to come out of this mode.
Now execute the below command to see if Sonarqube is up and running. This may take a few minutes.
tail -f /opt/sonarqube/logs/sonar*.log
Make sure you get the below message that says sonarqube is up..
Now access sonarQube UI by going to browser and enter public dns name with port 9000
https://www.coachdevops.com/2020/04/how-to-integrate-sonarqube-with-jenkins.html
Awesome tutorial. Works flawlessly.
ReplyDeletewhen I restart my Azure VM sonarqube is not working. I cannot login into sonarqube console.When I install fresh copy of sonarqube is works,but after restarting vm it doesnot works.
ReplyDeletekindly help
You may have to check your ip address, It must have changed in this case.
ReplyDeleteHey I followed the same article my sonarqube is up and running but it unable to run on browser i am getting an timeout error
ReplyDeleteHow to verify that postgresql is being used as a database
ReplyDeleteOne particular person is the "shooter," who rolls the dice, and the opposite gamers make wagers on the outcomes of that roll. Although a lot of nice games have been transformed for online play, there are some notable exceptions that 카지노사이트 remain unavailable. Some of the most well-liked online free slots embody A Night With Cleo , as well as|in addition to} Mythic Wolf, Rich Wilde and the Book of the Dead, and Wolf Riches. This free slots website accepts a good mixture of cryptos and common fee strategies. 6 cryptos in complete are accepted, together with Bitcoin, Dogecoin, Litecoin, and more.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete