How to Install Jenkins-sonar-learning

sudo apt update
sudo apt install openjdk-8-jdk
sudo apt update
wget -q -O — https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c ‘echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list’
sudo apt-get update
sudo apt-get install jenkins
sudo service jenkins start
sudo update-alternatives — config javac/usr/lib/jvm/java-8-openjdk-amd64
http://sonar-pkg.sourceforge.net/
deb http://downloads.sourceforge.net/project/sonar-pkg/deb binary/
sudo apt-get update
sudo apt-get update
sudo apt-get install sonar

To configure Mysql for Sonar

http://dev.mamikon.net/installing-sonarqube-on-ubuntu/
sudo apt-get install mysql-server
mysql -u root -p
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER ‘sonar’ IDENTIFIED BY ‘sonar’;
GRANT ALL ON sonar.* TO ‘sonar’@’%’ IDENTIFIED BY ‘sonar’;
GRANT ALL ON sonar.* TO ‘sonar’@’localhost’ IDENTIFIED BY ‘sonar’;
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sudo /etc/init.d/sonar start

--

--

DevOps/Cloud | 2x AWS Certified | Terraform | Gitlab

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store