Code Monkey home page Code Monkey logo

sonarqube-installation-'s Introduction

Sonarqube-installation-

SonarQube Installation And Setup In AWS EC2 Redhat Instance.

Prerequisite
  • AWS Acccount.
  • Create Redhat EC2 T2.medium Instance with 4GB RAM.
  • Create Security Group and open Required ports.
    • 9000 ..etc
  • Attach Security Group to EC2 Instance.
  • Install java openJDK 1.8+ for SonarQube version 7.8

1. Create sonar user to manage the SonarQube server

#As a good security practice, SonarQuber Server is not advised to run sonar service as a root user, 
# create a new user called sonar and grant sudo access to manage sonar services as follows

sudo useradd sonar
# Grand sudo access to sonar user
sudo echo "sonar ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/sonar
# set hostname for the sonarqube server
sudo hostnamectl set-hostname sonar 
sudo su - sonar

1b. Assign password to sonar user

sudo passwd sonar

2. Enable PasswordAuthentication in the server

sudo sed -i "/^[^#]*PasswordAuthentication[[:space:]]no/c\PasswordAuthentication yes" /etc/ssh/sshd_config
sudo service sshd restart

3. Install Java JDK 1.8+ required for sonarqube to start

cd /opt
sudo yum -y install unzip wget git
sudo yum install  java-11-openjdk-devel

4. Download and extract the SonarqQube Server software.

sudo wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.8.zip
sudo unzip sonarqube-7.8.zip
sudo rm -rf sonarqube-7.8.zip
sudo mv sonarqube-7.8 sonarqube

5. Grant file permissions for sonar user to start and manage sonarQube

sudo chown -R sonar:sonar /opt/sonarqube/
sudo chmod -R 775 /opt/sonarqube/

6. start sonarQube server

sh /opt/sonarqube/bin/linux-x86-64/sonar.sh start 
sh /opt/sonarqube/bin/linux-x86-64/sonar.sh status

7. Ensure that SonarQube is running and Access sonarQube on the browser

sonarqube default port is = 9000

get the sonarqube public ip address

publicIP:9000

curl -v localhost:9000
54.236.232.85:9000
default USERNAME: admin
default password: admin

sonarqube-installation-'s People

Contributors

donkolawolu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.