| ... | ... | @@ -167,11 +167,46 @@ jvm 1 | 2018.07.26 10:16:23 INFO app[][o.s.a.SchedulerImpl] SonarQube is up |
|
|
|
```
|
|
|
|
- Now log in to http://localhost:9000 with System Administrator credentials (admin/admin)
|
|
|
|
- Everything seems to work rightly, but we aren't done yet
|
|
|
|
- We want to install SonarQube's server to work faster and etc.
|
|
|
|
- We want to install SonarQube's server to work faster and etc.
|
|
|
|
- Go back to terminal on shut down SonarQube (LCTRL + C)
|
|
|
|
-
|
|
|
|
- Next we will apply a little this guide for better performance
|
|
|
|
- [Installing the server](https://docs.sonarqube.org/display/SONAR/Installing+the+Server)
|
|
|
|
- Configuring the Elasticsearch storage path
|
|
|
|
- Navigate in terminal to /var
|
|
|
|
- Make folder sonarqube
|
|
|
|
- Go inside folder you just created and make two more folders and name them as data and temp
|
|
|
|
- Navigate back to /var/sonarqube and give to folder read and write access
|
|
|
|
- In this guide is used chmod -R 777 (not recommended)
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ cd /var
|
|
|
|
$ sudo mkdir sonarqube
|
|
|
|
$ cd sonarqube/
|
|
|
|
$ sudo mkdir data
|
|
|
|
$ sudo mkdir temp
|
|
|
|
$ cd ..
|
|
|
|
$ sudo chmod -R 777 sonarqube
|
|
|
|
```
|
|
|
|
- Now we want SonarQube to use those paths
|
|
|
|
- Navigate to /etc/sonarqube/conf
|
|
|
|
- Use editor as you like, but guide uses nano
|
|
|
|
- Edit file sonar.properties
|
|
|
|
- sonar.path.data=/var/sonarqube/data
|
|
|
|
- sonar.path.temp=/var/sonarqube/temp
|
|
|
|
- Tuning the Web Server
|
|
|
|
- By default, SonarQube is configured to run on any computer with a simple Java JRE.
|
|
|
|
- For better performance, the first thing to do when installing a production instance is to use a Java JDK and activate the server mode by uncommenting/setting the following line in */etc/sonarqube/conf/sonar.properties*
|
|
|
|
- sonar.web.javaOpts=-server
|
|
|
|
- To change the Java JVM used by SonarQube, simply edit <install_directory>/conf/wrapper.conf and update the following line
|
|
|
|
- wrapper.java.command=/path/to/my/jdk/bin/java
|
|
|
|
- Example I have in */usr/lib/jvm/java-11-openjdk-amd64/bin/java*
|
|
|
|
- After that start SonarQube again but now not in console mode, just ./sonar.sh start
|
|
|
|
|
|
|
|
```shell
|
|
|
|
sonarqube@sonarqube:/etc/sonarqube/bin/linux-x86-64$ ./sonar.sh start
|
|
|
|
# After start up last line should look like this...
|
|
|
|
Started SonarQube.
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
| ... | ... | |
| ... | ... | |