Skip to content

Naresh240/sonarqube-installation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

sonarqube-installation

Step 1: Install java 17

yum install java-17-amazon-corretto -y

Step 2: Login as root and execute the following commands

sysctl -w vm.max_map_count=262144
sysctl fs.file-max
ulimit -n
ulimit -u

Setup PostgreSQL15 Database For SonarQube

yum install postgresql15 postgresql15-server -y
postgresql-setup --initdb

Need to change config file as shown in below

vi /var/lib/pgsql/data/pg_hba.conf

Replace Method name "ident" to "md5"

image

Enable postgresql:

systemctl enable postgresql

Start postgresql:

systemctl start postgresql

Login into Database

su - postgres
psql

Create a sonarqubedb database, username and provide access to user

create database sonarqubedb;
create user sonarqube with encrypted password 'Naresh#240';
grant all privileges on database sonarqubedb to sonarqube;
\c sonarqubedb;
GRANT ALL ON SCHEMA public TO sonarqube;
GRANT USAGE ON SCHEMA public TO sonarqube;
\q
exit

Setup Sonarqube Web Server

Download the latest sonarqube installation file to /opt folder. You can get the latest download link from here. http://www.sonarqube.org/downloads/

cd /opt
wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.9.0.65466.zip
unzip sonarqube-9.9.0.65466.zip
mv sonarqube-9.9.0.65466 sonarqube
chown -R ec2-user:ec2-user sonarqube

Open /opt/sonarqube/conf/sonar.properties file

sudo vi /opt/sonarqube/conf/sonar.properties

image image image

Switch to ec2-user and navigate to the start script directory

su - ec2-user
cd /opt/sonarqube/bin/linux-x86-64
./sonar.sh start
./sonar.sh status

Troubleshooting Sonarqube: All the logs of sonarqube are present in the /opt/sonarqube/logs directory

cd /opt/sonarqube/logs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors