Tuesday, August 27, 2019

SonarQube Installation - Linux - Mithun Technologies - 9980923226


Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com

                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
SonarQube Server Installation

#!/bin/bash     
#title                : Install SonarQube server
#description     : Execute this script as a normal user
#author             : Mthun Technologies
#date                 : 08112012
#version            : 1.0   
#CopyRights     : Mithun Technologies
#Contact            : 9980923226 | devopstrainingblr@gmail.com

#Hardware Requirements for SonarQube
#----------------------------------------------------

#The SonarQube server requires at least 2GB of RAM to run efficiently and 1GB of free RAM for the OS.

#Login as a root user.
sudo su -
 
Install Java ( Java is the Pre Requisite Software)
--------------------------------------------------------------
yum install java-11-openjdk-devel -y

#Download the SonarqQube Server software.
cd /opt
yum install wget unzip -y
wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.6.1.59531.zip

unzip sonarqube-9.6.1.59531.zip
mv sonarqube-9.6.1.59531 sonarqube


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

Give the sudo access to sonar user
visudo

sonar   ALL=(ALL)       NOPASSWD: ALL

Change the owner and group permissions to /opt/sonarqube/ directory.
chown -R sonar:sonar /opt/sonarqube/
chmod -R 775 /opt/sonarqube/
su - sonar
cd /opt/sonarqube/bin/linux-x86-64/

./sonar.sh start

Troubleshooting
--------------------

sonar service is not starting?

a)make sure you need to change the ownership and group to /opt/sonarqube/ directory for sonar user.
b)make sure you are trying to start sonar service with sonar user.
c)check java is installed or not using java -version command.

Unable to access SonarQube server URL in browser?

a)make sure port 9000 is opened in security groups - AWS ec2 instance.

Create SonarQube server as a sonar service
--------------------------------------------------------

ln /opt/sonarqube/bin/linux-x86-64/sonar.sh /etc/init.d/sonar

vi /etc/init.d/sonar

#add below lines in /etc/init.d/sonar

SONAR_HOME=/opt/sonarqube
PLATFORM=linux-x86-64

WRAPPER_CMD="${SONAR_HOME}/bin/${PLATFORM}/wrapper"
WRAPPER_CONF="${SONAR_HOME}/conf/wrapper.conf"
PIDDIR="/opt/sonarqube/"

#Enable the sonar service
sudo systemctl enable sonar

#Start the sonar service
sudo systemctl start sonar

#Check the status of the  sonar service

sudo systemctl status sonar






Connect to Mithun Technologies...

www.facebook.com/mithuntechnologies
www.facebook.com/mithunsoftwaresolutions
www.linkedin.com/in/mithuntechnologies/








Linux Commands - Mithun Technologies - 9980923226



             Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com
                                                       http://mithuntechnologies.com/
                                                       http://mithuntechnologies.co.in/ 
                                                       Important Linux Commands

mkdir: Make or Create directory

find : find command used to search and locate list of files and directories based on conditions you specify for files that match the arguments. Find can be used in variety of conditions like you can find files by permissions, users, groups, file type, date, size and other possible criteria.

umask :  User Mask or User file creation MASK : It is used to set the permissions for files/directories  newly created on a Linux Machine.

chmod : It will change the file or directory access permissions.

chown: It will change the ownership of the file a file.

chgrp: It will changes the group ownership of a file or directory.

cp :   It will copy file contents of one file to another file.

mv: It will move or rename the file.

wc: Counts the number of lines, words, bytes, or characters in a file.

ln :  It will create the link between files.

vi or vim: Text editor.

tail : It will display the last 10 rows.

scp :

grep: which stands for "global regular expression print," processes text line by line and prints any lines which match a specified pattern.

who :  Displays the current users working on the system.

w : Show who is logged on and what they are doing.

df : Report file system disk space usage

ifconfig: To find the IP address.

man : Display the on-line manual pages.

service : It will give the status of service.

uptime: Tells how long the system has been running.

last: show listing of last logged in users.  

ps : Display the current process running.

kill : Kill the process.

top : Display Linux tasks. 


   





Ansible Installation in Amazon Linux - Mithun Technologies - 9980923226

  Mithun Technologies            +91-9980923226              devopstrainingblr@gmail.com                                                 ...