How to Install SonarQube in Ubuntu 22.04 | SonarQube Setup in Ubuntu | Ubuntu SonarQube Install | 09

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey folks my name is David and welcome back to another video in the series of devsecops project now if you're hearing me for the first time please subscribe the channel because it really motivates me to create more content like this alright so without further Ado let us dive right into the video okay so in today's video we are going to talk about sonar Cube installation in Ubuntu so let's talk about a few prerequisites for that so the first one is you need to have admin rights or you have to have a pseudo user access the next thing is Ubuntu as a OS because obviously we are going to do that in Ubuntu and then you have to have Java installed so I'll be using Java 11 over here I've already installed in this system but you can install it uh install it from just Google it and you will be able to install it I'll show you some commands then you can install it okay and then you need to have postgresql 9.3 or higher we're going to talk about that in the video and then we have to have an SSH access so we because we are going to do a few things which need this access and at the end we need to open port 9000 on the firewall that's all because that's a default port for sonar Cube so that's all we need to do all right so let's dive right into the demo part okay so uh I have just opened the terminal over here and I have got the root access and just go to your browser and look for this website www.wulture.com and I'll link it in the description as well don't worry okay so how to use sonar Cube on Ubuntu 22.04 LS if you want to check the version of your OS you can check it by this I guess uh there's a command for that let me let me find okay I think that has to be LSB hyphen release hyphen a perfect so I've got Ubuntu 22.4 so I'll be installing this okay let's Circle back so prerequisites are this and we have to configure the firewall first so we'll just sudo allow this so let's do that copy and paste it over here we'll just go back here paste it rules are better perfect let's go back and then we'll allow the https copy paste perfect let's go back check the firewall status let's copy this paste hit enter it's inactive let me clear the screen okay my command was wrong so I have to type system CTL status ufw and then you can see it is active Okay so again let's go back to the browser and it's saying install open jdk which is 11. I think it's already installed in my system but if it is not installed in your system you can use this and install it okay let me check whether I have it or not I'll check the Java version perfect I already have it so I do not need it okay so I'll just clear the screen go back and then it is saying install post gray SQL which is this so just copy this command I'll just copy whole of this and credits to this website because it has made my work so easy otherwise I had to type all of this so thank you vulture.com so it has been downloaded perfect let's go back sudo apt update copy go back paste hit enter and it will take its own sweet time let's see how much time does it take oh perfect it's done let's go back to this copy this Ctrl V hit enter you want to continue yes I want to continue it started and depending on your internet speed it's going to take some time all right so what I'll do is I'll just fast forward the video okay perfect so it is done let's go back and then pseudo system CTL let me expand it a bit if I can expand it perfect I think you can see it better now go back paste it over here hit enter and it is saying that it is active perfect let's clear this go back so now we have to configure the post gray SQL so rest of the things are done we have installed it everything is done let's go back sudo hyphen U paste hit enter so now we are in the post Gray you can see it from here okay so we have to now type the command so we have to create a sonar Cube user so let's just copy this and let's see what happens paste it over here hit enter it is saying that there is a syntax error so let me check whether I've written everything perfectly right or not okay I don't think I had copied the correct path I have to copy this I'm sorry my bad Ctrl V hit enter and then create role is done right now create this create database sonar Cube we have to copy this paste it over here hit enter and create database is done now we have to Grant all privileges on the sonar Cube database to the sonarq role okay so let's copy this and Grant the Privileges okay I'll type G paste it over here hit enter and it is done perfect let's exit the shell I'll just have to type for the quit Okay paste it over here hit enter and now we are in the root let me just clear the screen and let's go back okay perfect so this is the account I think we are already in the root so all the part is done over here now we have to go and install the sonar Cube that's the main part so if you want to take a look at the sonarq versions you can go to the website and you can take a look at it so right now at the time of recording this video we have 9.7.1 Community developer Enterprise and data center we're going to use the community version because it's free that's that's why okay so let's copy this command and uh let's see what happens so it is 9.6 it has been used it is updated thanks to vulture.com it will be paste hit enter and then it is going to take its own sweet time so I'll just fast forward the video okay this is done let's go back let's unzip the downloaded archive okay paste it over here hit enter uh yes it's done if you wanted to do LS over here you can see that it has been unzipped okay let me clear the screen again go back now we have to move the files to opt directory so we're going to sudo move MV is move so now keep this and into opt directory okay paste it over here hit enter and it has been moved if you want to check you can just check it by cat copy this copy not cat LS because LS hyphen a paste it over here and you can see that it has been moved you can see that right perfect let's go back okay now we have to just remove the zip file that we have downloaded so paste it over here hit enter and if you're doing LS over here it would be gone perfect let's create the screen again and let's go back now we have to create a sonar Cube user so use this command to create a user along with the sonar group for sonar Cube just let's just copy this go back paste hit enter and it has been added perfect go back let's give it give it the access or I must say give it the permissions so paste it over here hit enter done that's all in the seventh step we are going to configure the sonar Cube server so let me just clear the screen first perfect okay so let's just copy this command go back paste it over here hit enter and yeah let's let's do that okay so I think this is garbage value let me remove this okay this should be done perfect Now look for this file and sonar I think sonar user was the name I guess sonar usage yeah Sonar user was the name and password you can give anything I'll just give sonar that's all okay and then you have to go for the jdbc connection which is this foreign and then find the following line uncomment it and replace with the existing value of the following okay so we can get this copy this hit enter over here paste it my bad I think I've one should have gone to the top okay here is the value let me check if I can paste it okay perfect I can paste it and if you're not using this so just if you do not want to do any changes just do it like this all right that's all and then you have to find the following lines sonar web Java options hyphen server and sonar this okay so I think that we do not need this because we do not have install engine X so does not matter actually uh okay so that's all I think should be it now let's give it the memory so just copy this okay you have to move out of it first of all so when you have to exit it you just have to give a few set of commands so there are a few commands written over here and then you just have to go by that so when you want to move out of it you have to do control O So control o is saving a nano file and Ctrl X is existing so hit enter perfect and Ctrl X you'll move out perfect so let's just clear this and this thing is okay now paste that the command that you copied okay over here and then this count has to be pasted so paste the following at the end of the file let's just go over here and paste it over here perfect then Ctrl X hit enter and just let us see whether everything is all right or not okay so this is done if you want to do it again we are over here and you can delete as well like like this you can just delete the values if you want so you can do the changes in this okay I have to do just Ctrl o to save it again you have to write the file Ctrl X and then you move out perfect let's just clear this go back oh it's already written written over there okay so now I think this is done you have to uh give these values to increase the file descriptor and the threads that's on our Cube user can use okay so let's do that copy this go back paste it over here hit enter and then go back over here use this copy paste it again over here Ctrl o to save it hit enter and Ctrl X to move out perfect now save the file by this and that's all reboot the system so we'll just reboot the system let's go back sudo reboot and then it is going to be rebooted so this is virtualbox 7.0 which we are using let it happen it's going to take you know its own sweet time if you want to move this video just move it a bit further or you can just watch it in 1.25 speed so this is turn X XS boxes dot o r g so now we have entered and then we have to just go inside perfect okay open the terminal we not need this open the terminal get the sudo access sudo Sue again the password OS boxes dot o r g hit enter clear the screen let's go back to our web browser we're in the web browser now okay this was not so Ctrl H will go to the history today we did open this one right I guess perfect not this one this one perfect let's go back and let's just scroll you have to set up the sonar service now okay so let's go over here copy this go back paste hit enter and then you can see there's a lot of things over here all you have to do is copy all of this and just paste it over here that's all just have to paste it Ctrl X sorry Ctrl o to save Ctrl X to move out perfect and if you want to check just do this and do a cat over here and then you would be able to understand let's do that perfect now let's just clear this go back and then sudo systemctl starts on our Cube so let's see whether it is running fine or not paste it and it has started now you can check the status it is active and running that is perfectly fine so let's just enable it because if you want to do that you can enable it I'll just open a new terminal if you want to create it quit it just create it doesn't matter I'll do localhost not 8080 we have to go to 9000 and it is not open okay I think I made a mistake in the file let's go back to the user so what we have to do is to control F your underscore password okay so this one I entered wrong I just pasted the command I did not pay attention that's my bad so let's copy this command go back paste it over here hit enter and then inside that you just have to come down in the password so the password is not this it is your password and I made a mistake over here okay so I think this should be good so Ctrl o to save it hit enter Ctrl X to move out perfect now all we have to do is check the status on our Cube is it up and running yes it is up and running I'll just restart it this should be done let's just check the status perfect so let's just Ctrl C go back at the browser 9000 and refresh it let's see whether it comes up or not and it has come up so that was the only mistake that I did what I did wrong was I just blindly copy pasted the command I did not pay attention to this and I'll show you your underscore password I did not pay attention to this so I just copied it and you can give your own password over here and this is done once this is done you just have to go down and here you you have to enter your password that's all that was the issue okay so once this opens for you give a name admin admin I think this is default name and the password and it'll load so give old password as admin new password is anything I'll give it as password that's all let's just update it and it has been updated okay and now you can see that this is installed so it is saying that there is a new version of sonarq available which is fine I mean you do not have to go through this there are projects issues rules quality profile quality Gates Administration and a lot of other things okay you can go over here now this is a Community Edition and pay attention that this there is no white there is no yellow line over here saying that it is not expandable to the production database because we have used post grayscale over here and this does not come with a default database so that is one advantage advantage of using postgresql with this so if someone asks you in an interview that why are we using postgresql tell him or her that we are using it because it is expandable in the uh you can say in the in the production environment in the higher environments in the staging environments and all the other things and and we are not using the default one because it's not expandable or scalable is the right way okay all right so I hope you folks have understood this part if yes feel free to comment below and we will address that and please do subscribe the channel because it really motivates me to create more content like this so thanks guys and I'll see you in the next one
Info
Channel: LogicOps Lab
Views: 12,047
Rating: undefined out of 5
Keywords: how to install sonarqube in ubuntu 22.04, how to install sonarqube in ec2 instance, how to install sonarqube in ubuntu 20.04, how to install sonarqube in linux, sonarqube installation linux, sonarqube installation on ubuntu 20.04, sonarqube installation, ubuntu sonarqube install, install ubuntu sonarqube 20.04, sonarqube setup in ubuntu, how install sonarqube, how can I install sonarqube, installing sonarqube on linux, installing sonarqube, install sonarqube on ubuntu 22.04
Id: -SFce17OQ5U
Channel Id: undefined
Length: 18min 20sec (1100 seconds)
Published: Mon Dec 19 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.