You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To install SonarQube we need an Linux EC2 instance which is installed MySQL otherwise Launch MySQL RDS instance to acomplish this
3
+
SonarQube provides the capability to not only show health of an application but also to highlight issues newly introduced. With a Quality Gate in place, you can fix the leak and therefore improve code quality systematically.
4
+
### Follow this Artical in **[YouTube](https://www.youtube.com/watch?v=zRQrcAi9UdU)**
4
5
5
-
1. Launch an MySQL RDS Database Instance (It takes few minutes)
6
+
### Prerequisites
7
+
1. EC2 instance with Java installed
8
+
1. MySQL Database Server or MyQL RDS instance. **[Get help here](https://www.youtube.com/watch?v=vLaW6b441x0)**
6
9
7
-
2. Launch an EC2 instance and Install MySQL client version
10
+
### Installation
8
11
9
-
```sh
10
-
# yum install mysql
11
-
```
12
-
13
-
3. Install java
14
-
```sh
15
-
# yum install java-1.8.0-openjdk -y
16
-
```
17
-
4. Download stable SonarQube version from below website.
18
-
website: https://www.sonarqube.org/downloads/
12
+
Install MySQL client version
19
13
20
-
Note: for this video I have downloaded version 6.0 : https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-6.0.zip
14
+
```sh
15
+
# yum install mysql
16
+
```
17
+
Download stable SonarQube version from below website.
6.Allow RDS instance security group to access SonarQube server
28
+
Allow RDS instance security group to access SonarQube server
30
29
31
-
7.Connect to RDS instance
30
+
Connect to RDS instance with database credentials
32
31
```sh
33
-
mysql -h <RDS_Instance_endpoint>:3306 -u sonardb -p
32
+
mysql -h <RDS_Instance_endpoint>:3306 -u <DB_USER_NAME> -p<DB_PASSWORD>
34
33
```
35
-
36
-
8. Create a new sonar database
34
+
Create a new sonar database
37
35
```sh
38
36
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
39
37
```
40
38
41
-
9.Create a local and a remote user
39
+
Create a local and a remote user
42
40
```sh
43
41
CREATE USER sonar@localhost IDENTIFIED BY 'sonar';
44
42
CREATE USER sonar@'%' IDENTIFIED BY 'sonar';
45
43
```
46
44
47
-
10.Grant database access permissions to users
45
+
Grant database access permissions to users
48
46
```sh
49
47
GRANT ALL ON sonar.* TO sonar@localhost;
50
48
GRANT ALL ON sonar.* TO sonar@'%';
51
49
```
52
50
53
-
11.check users and databases
51
+
check users and databases
54
52
```sh
55
53
use mysql
56
54
show databases;
57
55
SELECT User FROM mysql.user;
58
56
FLUSH PRIVILEGES;
59
57
QUIT
60
58
```
61
-
### ------ On EC2 Instance ------
59
+
So for you have configured required database information on RDS. Lets Jump back to your EC2 instance and eanble SonarQube properites file to connect his Database.
0 commit comments