How to Install Sonarqube 9.9 LTS on Ubuntu 22.04 LTS | Install OpenJDK 17 | Install PostgreSQL 10

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so in this session we are going to learn how to install sonar Cube on Ubuntu 222.0 for LTS and here we are going to install the latest version of sonar Cube so the latest version of sonar cube is 9.9 so let's start so first of all here I mentioned some previous sites so first of all we need 2 1 2 22.0 for LTS with minimum 2GB RAM and 1 CPU then post SQL with version 9.3 or higher then SSH access with pseudo Privileges and the last is we need a firewall port with 9000. okay so that's the some prerequisites after that now we need to run this command so first of all let's start so now we are going to install sonar Cube on Ubuntu so the version is 9.9 so let's start with this commands then now the next command is here okay now the third one and then last okay that's it now let's clear the screen first okay now the next is here to increase the this 5 so we need to open this file using our favorite editor and we need to add this line into this file so let's open this file here and here I'm going to paste this two lines so let's insert okay now let's save the file and exit okay now it's done foreign package okay so it's done so let's clear the screen first now after that we need to install this unzip package right so we need to install these obligated unzip package so how to install the command is here through the AP to get install wget unzip hyphen what okay so okay let's clear the screen and now the next phase now let's install open jdk so here we need to install open jdk right so here we are going to use sonar Cube 9.9 right so that that's the latest version of sonar Cube so to install sonar Cube 9.9 we need to install open jdk 17 right so here we are going to install this open jdk 17. so let's install foreign okay it's almost done okay it's done now let's clear the screen first and let's check the Java version so how to check enter Java iPhone version so as you can see our open jdk version is 17 right okay now let's clear the screen first and now the next step is here set default jdk if you have multiple versions of java then you need to run this command and set the jdq version that you want okay next is SQL right so here firstly we need to add and download the post rescue Repository so let's install and download so I'm going to install using this command foreign next command is here okay it's done now let's install postpaid SQL using this command Surah apt get hyphen Why install postbaseql so as you can see it's installing okay it's done so let's clear the screen and now let's start our post SQL now let's enable foreign so as you can see it's active right okay now let's clear the screen first okay now the next step is here change the password for the default post K SQL user right so we need to set the password so the command is pseudo password postgres so enter a password so I'm going to enter three types for confirmation okay password updated successfully now we need to switch to our post rescue how to switch to the command is Su hyphen postgres so enter your password okay as you can see we have successfully switched to postgres here okay now let's clear the screen and now here after that we need to create a new user so our username is sonar so let's create new user okay after that here switch to the posterior Square chain so how to finish so the command is here psql to switch to postgresql okay so now we are in post a scale shape and here we need to set a password for the newly created user for sonar Cube database right so our user is sooner and the password also sooner right if you want to change the password then you can replace your so I am going to set my password so not you can see rule right okay now after that create a new database for postgresql so my database name is sonar cube right okay so I'm going to create new database using this command okay database create okay now the next is grab all privilege to sonar user on Sonar Cube database so for that we need to enter this command to Grant all privilege okay Grant you can see the command okay now we need to exit from psql so how to exit so the command is like that thank you after that we need to exit from Pro SK SQL now we are in Ubuntu right you can see we are in Ubuntu user okay now let's clear the screen and now now the next is here how to install sonar cube right so now we are going to install sonar Cube or Uber right so first of all we need to inside our TMP directory so let's go to the TMP directory here if I run the ls command here as of now we have these files right so now we are going to install sonar Cube 9.9 right okay so you can see the version 9.9 this is the latest version of sonar to Prime if you want to check then you can go to the official page of sonar Cube here let's go over here and let's check the version sorry here here download for free if I don't go see here as you can see the latest version is version 9.9 LTS right at least February 2023 so that's the latest version of sonar Cube that we are going to install right so let's install sorry let's download sonar Cube 9.9 using this W get Command right okay now if I run the ls command so you can see we have successfully downloaded this ZIP file here right okay now we need to unzip the unzip this file so how does it so the command is here here unzip the achieve setup in this directory right so here we are going to unzip this sonar Cube 9.9 right so after that hyphen D and then slash opt that means hyphen dim is directory and we are going to unzip this folder in slash opt directory right so that's why the command is like this so let's um unzip this file okay it's done now firstly let's clear the screen and if I run the ls command so you can see there is only zip file right so then go to the slash opt directory and here if I have the ls command you can see our unzip file okay now the next is we need to move this extracted file that means this unzip file into this directory slash in slash opt we need to create a folder sonar cube right so here the command is like this we need to move this extracted file into this sonar Cube folder right so the command is like this command you can see there is a folder sonar Cube so list inside of insular Cube folder and after that if I run the ls command you can see the files of this sonar okay now let's clear the screen first now the next step is configure sonar Cube on command to 22.0 for LTR so first of all we need to create group and user right okay so let's create group foreign and after that as you know after creating group we need to give the permissions right so for that let's run these two commands for directory access then next is here okay now it's done now the next step is we need to open this sonar Cube configuration file right here so I'm going to use my favorite editor Nano and here we need to uncomment these two lines sonar dot J uh jdbc username after that sonar dot jdbc password so here we need to enter our sonar user and sonar password if you remember our username is sonar and our password also sonar right and after that here we need to add this line so I'm going to copy this slide and okay now let's save the file and exit okay now after that now the next step is here we need to edit this sonar script file and set this run as user so let's open our sonar.sh file using this command and here we need to set the run as user sonar right our user is Sona so that's why we need to set this line here so I'm going to enter here let's save the file and exit okay it's done now it's done now start sonar Cube and we need to follow these steps okay so first of all we need to switch to our sonar user so let's switch as you know how to switch SoDo Su and your users so you can see we are in sonar so I am going to enter Bash as you can see we are in sonar right okay and here after that I am going to move this script directly okay and after that here let's start our sonar Cube using this command dot sonar dot sh stack so as you can see starting sonar Cube started sonar cube right so let's check the status of our sonar okay how to check so the command is like that soma.sh status so as you can see sonar cube is running right that means we have successfully installed sonar Cube 9.9 okay now I'm going to stop my Sonar Cube how to stop so the command is like that as you can see there is fully stopping sonar Cube wait for snarky to exit so wait for few seconds foreign if you want to check the status so let's run the status command so you can see now sonar cube is not running why because we have successfully stopped our sonar Cube you can see right okay now let's clear the screen first and now after that here as you can see we need to create a systemd service file right so for that let's exit first okay now we are in Ubuntu user rights okay so let's clear the screen first so first of all we need to create system re file right you can see here create a systemd service file for sonar Cube to run as system startup so let's run this command and here in this we need to add this below lines so let's add now let's save the file and exit okay now after that we need to start our sonar right so let's run this command now we are going to start sonar using systemd5 so first of all let's start then let's enable our sonar okay now let's check the status so as you can see it's active running if you want to check again then you can check again you can see it's active running right here that means we have successfully installed sonar Cube 9.9 on Ubuntu 22.0 for LTS right so here we have check the status using system defined right okay now the next is access sonar Cube so let's access sonar cube in our browser so how to access so first of all you need to copy your instance IP and then after that our port number is port number is 9 000 that means nine thousand so as you can see it's loading so you can see login to sonar Cube so first of all the default username is admin and the default password also admin foreign first of all we need to set our password for security so enter your old password old password is admin and set a new password must be long click on update neighbor so as you can see this is the sonar Cube dashboard you can see sonar Cube here right okay and here you can see the admin right up or account login administrator and so on so that is the sonar Q dashboard so here we have successfully installed sonar Cube 9.9 the latest version of sonar Cube on Ubuntu 22.0 for LTS so thank you for watching
Info
Channel: DevOps Hint
Views: 4,354
Rating: undefined out of 5
Keywords: How to Install Sonarqube 9.9 LTS on Ubuntu 22.04 LTS, Install OpenJDK 17 on Ubuntu 22.04 LTS, Install and Setup PostgreSQL 10 Database For SonarQube, SonarQube Logs, Configure Systemd service for SonarQube, Access SonarQube on web browser, Change SonarQube admin Password
Id: 7knFgvKwlHA
Channel Id: undefined
Length: 23min 52sec (1432 seconds)
Published: Sat Mar 18 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.