Some customization steps after Geany installation

Install Geany and its plugins

sudo add-apt-repository ppa:geany-dev/ppa
sudo apt-get update
sudo apt-get install geany geany-plugins

Activate needed plugins

Open Geany, go to Tools -> Plugin Manager and activate the plugins:

Geany Plugin Manager

Enable “Mark Word” feature of the Addons plugin

Go to Tools -> Plugin Manager, select Addons and click on Preferences. Enable the option “Mark all occurences of a word when double-clicking it” on the Configure Plugins dialog.

Geany configure plugins

Add color schemes to Geany

Follow the instructions on github.com/codebrainz/geany-themes for downloading and installing new schemes. Then go to View -> Change Color Scheme and select one.

Create custom color scheme

Make a copy of your favorite color scheme

cp ~/.config/geany/colorschemes/solarized-dark.conf ~/.config/geany/colorschemes/my-solarized-dark.conf

Open the new file in Geany, update the [theme_info] section, and modify the colors according to the Geany Manual, for example:

marker_line=0x000000;0xb8f4b8;false;false
marker_search=0x000000;0xb8f4b8;false;false
marker_mark=0x000000;0xb8f4b8;false;false

Get rid of the vertical line (long line marker)

Navigate to Edit -> Preferences, select Editor then the Display tab, and disable the Long line marker.

Geany long line marker

Installing SonarQube Runner on Ubuntu

Prerequisites

SonarQube
DBMS (MySQL in my case)

Download and unzip SonarQube Runner distribution

Visit the SonarQube official site for the current version.

wget http://repo1.maven.org/maven2/org/codehaus/sonar/runner/sonar-runner-dist/2.4/sonar-runner-dist-2.4.zip

unzip sonar-runner-dist-2.4.zip
mv sonar-runner-2.4 /opt/sonar-runner

Edit sonar-runner.properties

Open /opt/sonar-runner/conf/sonar-runner.properties in a text editor, and modify it.
Uncomment the following lines:

sonar.host.url=http://localhost:9000/sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8

sonar.jdbc.username=sonar
sonar.jdbc.password=sonar

The value of the sonar.host.url depends on your SonarQube Web Server settings located in /opt/sonar/conf/sonar.properties (See: Installing SonarQube on Ubuntu)

Create and set environment variables

Create ~/.pam_environment file if it does not exist:

touch ~/.pam_environment

Open ~/.pam_environment in a text editor, and add the following lines to it:

SONAR_RUNNER_HOME=/opt/sonar-runner
PATH DEFAULT=${PATH}:${SONAR_RUNNER_HOME}/bin

Re-login in order to initialize these changes, and check them with the following command:

sonar-runner -h

Run SonarQube Runner on a sample source

First localize the source code and binaries for analysis purposes, e.g.:

~/my_apps/my_project/src
~/my_apps/my_project/build/classes

Then create a configuration file for your project naming it sonar-project.properties:

touch ~/my_apps/my_project/sonar-project.properties

Open the file in a text editor, and add the following lines to it:

sonar.projectKey=my:project
sonar.projectName=My project
sonar.projectVersion=1.0
sonar.sources=src
sonar.binaries=build/classes
sonar.sourceEncoding=UTF-8

Start the SonarQube web server, and run SonarQube Runner from your project directory:

~/my_apps/my_project$ sonar-runner -X

After the process is done, open the SonarQube web page at http://localhost:9000/sonar, and check your project analysis within Projects panel.

REFERENCES

docs.sonarqube.org/display/SONARQUBE45/Installing+and+Configuring+SonarQube+Runner
qualilogy.com/en/install-sonarqube-first-analysis-with-sonarqube-runner/

Installing SonarQube on Ubuntu

Prerequisites

Java JRE
DBMS (MySQL in my case)

Create SonarQube database and user

First run MySQL through terminal:

mysql -u root -p

Then create the database and a user:

CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'sonar' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';
FLUSH PRIVILEGES;

Download and unzip SonarQube distribution

Visit the SonarQube official site for the current version.

wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.4.zip

unzip sonarqube-5.6.4.zip
mv sonarqube-5.6.4 /opt/sonar

Edit sonar.properties

Open /opt/sonar/conf/sonar.properties with your favourite text editor, and modify it.
MySQL settings
Uncomment the user credentials and the MySQL related settings:

sonar.jdbc.username=sonar
sonar.jdbc.password=sonar

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

Web Server settings
The following settings allow you to run the server on page http://localhost:9000/sonar

sonar.web.host=127.0.0.1
sonar.web.context=/sonar
sonar.web.port=9000

Implement SonarQube server as a service [optional]

Copy sonar.sh to etc/init.d/sonar and modify it according to your platform.

sudo cp /opt/sonar/bin/linux-x86-64/sonar.sh /etc/init.d/sonar
sudo gedit /etc/init.d/sonar

Insert two new lines:

SONAR_HOME=/opt/sonar
PLATFORM=linux-x86-64

Modify the following lines:

WRAPPER_CMD="${SONAR_HOME}/bin/${PLATFORM}/wrapper"
WRAPPER_CONF="${SONAR_HOME}/conf/wrapper.conf"
...
PIDDIR="/var/run"

Register as a Linux service:

sudo update-rc.d -f sonar remove
sudo chmod 755 /etc/init.d/sonar
sudo update-rc.d sonar defaults

Create Desktop icons [optional]

Install gnome-panel if missing:

sudo apt-get install gnome-panel --no-install-recommends

Open Dialog for creating new item for starting SonarQube:

sudo gnome-desktop-item-edit /usr/share/applications/ --create-new

Create launcher for starting SonarQube

Copy the item to the Desktop:

sudo cp /usr/share/applications/SonarQube\ Start.desktop /home/user/Desktop/

Open Dialog for creating new item for stopping SonarQube:

sudo gnome-desktop-item-edit /usr/share/applications/ --create-new

Create launcher for stopping SonarQube

Copy the item to the Desktop:

sudo cp /usr/share/applications/SonarQube\ Stop.desktop /home/user/Desktop/

Run SonarQube server

Start SonarQube server either by typing the direct command:

sudo /opt/sonar/bin/linux-x86-64/sonar.sh start

or by typing the service command:

sudo /etc/init.d/sonar start

or by clicking on the SonarQube Start icon which was created before (with password).

Visit SonarQube web page at http://localhost:9000/sonar

Stop SonarQube server either by typing the direct command:

sudo /opt/sonar/bin/linux-x86-64/sonar.sh stop

or by typing the service command:

sudo /etc/init.d/sonar stop

or by clicking on the SonarQube Stop icon which was created before (with password).

REFERENCES

docs.sonarqube.org/display/SONAR/Installing+the+Server
weblogs.java.net/blog/johnsmart/archive/2009/06/installing_sona.html
Giant Geek Blog ยป Install SonarQube for Continous Inspection