Last active
May 29, 2023 15:58
-
-
Save rasheedamir/11460beef67bc6b58d61 to your computer and use it in GitHub Desktop.
Revisions
-
rasheedamir revised this gist
Dec 9, 2014 . No changes.There are no files selected for viewing
-
rasheedamir revised this gist
Dec 6, 2014 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -146,4 +146,8 @@ mvn sonar:sonar ## Configure SonarQube in IntelliJ http://docs.codehaus.org/display/SONAR/SonarQube+in+IntelliJ ## Configure SonarQube in Eclipse http://docs.codehaus.org/display/SONAR/SonarQube+in+Eclipse -
rasheedamir revised this gist
Dec 6, 2014 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -142,4 +142,8 @@ sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncodi mvn clean install mvn sonar:sonar ``` * Now go to your sonar and you will find your project! ## Configure SonarQube in IntelliJ http://docs.codehaus.org/display/SONAR/SonarQube+in+IntelliJ -
rasheedamir revised this gist
Dec 5, 2014 . No changes.There are no files selected for viewing
-
rasheedamir revised this gist
Dec 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ## Create Amazon EC2 Instance * Ensure that inbound `MySQL` port `3306` is opened * `chmod 700 "keypair-name.pem"` ## Install MySQL -
rasheedamir revised this gist
Dec 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -67,7 +67,7 @@ sudo apt-get update sudo apt-get install oracle-java7-installer ``` ## Install Sonar ##### Install * Add the following entry in your /etc/apt/sources.list: `cd /etc/apt/` then `sudo vim sources.list` then `press o` then copy -
rasheedamir revised this gist
Dec 3, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -141,4 +141,5 @@ sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncodi ```bash mvn clean install mvn sonar:sonar ``` * Now go to your sonar and you will find your project! -
rasheedamir revised this gist
Dec 3, 2014 . 1 changed file with 46 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -67,7 +67,7 @@ sudo apt-get update sudo apt-get install oracle-java7-installer ``` ## Install Web Server ##### Install * Add the following entry in your /etc/apt/sources.list: `cd /etc/apt/` then `sudo vim sources.list` then `press o` then copy @@ -97,4 +97,48 @@ sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncodi ##### Start * `cd /opt/sonar/bin` `sudo sh sonar.sh start` `sudo sh sonar.sh stop` * `cd /opt/sonar/log` `tail -f sonar.log` * `ps -ef | grep sonar` ## Analyzing with Maven * Adding following in your `.m2/settings.xml` ```bash <settings> <profiles> <profile> <id>sonar</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <sonar.jdbc.url> jdbc:mysql://www.myserver.com:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance </sonar.jdbc.url> <sonar.jdbc.username>sonar</sonar.jdbc.username> <sonar.jdbc.password>sonar</sonar.jdbc.password> <sonar.host.url> http://www.myserver.com/sonar/ </sonar.host.url> </properties> </profile> </profiles> </settings> ``` * Add following `sonar-maven-plugin` in the project `pom` file ```bash <!-- SonarQube™ is an open source platform for Continuous Inspection of code quality. The Maven Plugin triggers the code analyzers. --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>2.4</version> </plugin> ``` * Run these commands ```bash mvn clean install mvn sonar:sonar ``` -
rasheedamir revised this gist
Dec 2, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ ## Create Amazon EC2 Instance * Ensure that inbound MySQL port is opened * `chmod 700 "keypair-name.pem"` ## Install MySQL -
rasheedamir revised this gist
Dec 2, 2014 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,6 +46,18 @@ FLUSH PRIVILEGES; * To verify the user has been created: `SELECT User FROM mysql.user;` you should see user with name `sonar` * To verify the database has been created: `show databases;` you should see database with name `sonar` * Modify my.cnf ```bash sudo nano /etc/mysql/my.cnf find the line: bind-address = 127.0.0.1 and change it to: bind-address = 0.0.0.0 ``` then restart mysql ## Install Java ```bash -
rasheedamir revised this gist
Nov 28, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,11 +30,11 @@ Create an empty schema and a sonarqube user. Grant this sonarqube user permissio ```bash vi create_database.sql Create SonarQube database and user. Command: mysql -u root -p < create_database.sql ``` ```bash 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'; -
rasheedamir revised this gist
Nov 28, 2014 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ ## Create Amazon EC2 Instance `chmod 700 "keypair-name.pem"` ## Install MySQL To install MySQL, run the following command from a terminal prompt: * `sudo apt-get install mysql-server` @@ -46,15 +46,15 @@ FLUSH PRIVILEGES; * To verify the user has been created: `SELECT User FROM mysql.user;` you should see user with name `sonar` * To verify the database has been created: `show databases;` you should see database with name `sonar` ## Install Java ```bash sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer ``` ## Installing the Web Server ##### Install * Add the following entry in your /etc/apt/sources.list: `cd /etc/apt/` then `sudo vim sources.list` then `press o` then copy -
rasheedamir revised this gist
Nov 28, 2014 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -67,6 +67,16 @@ sudo apt-get install oracle-java7-installer * `sudo nano sonar.properties` * Comment the embedded database and uncomment the line to use MySQL ```bash sudo vi /opt/sonar$ sudo vi conf/sonar.properties #sonar.jdbc.url=jdbc:h2:tcp://localhost:9092/sonar #—– MySQL 5.x # Comment the embedded database and uncomment the following line to use MySQL sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true ``` ##### Configure WebServer * `sonar.web.context=/sonar` * `sonar.web.port=9000` -
rasheedamir revised this gist
Nov 28, 2014 . 1 changed file with 7 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,18 +28,19 @@ Create an empty schema and a sonarqube user. Grant this sonarqube user permissio * Here is a [MYSQL Script](https://github.com/SonarSource/sonar-examples/blob/master/scripts/database/mysql/create_database.sql) ```bash vi create_database.sql Create SonarQube database and user. Command: mysql -u root -p < create_database.sql 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; ``` * To run the script: `sudo mysql -u root -p < create_database.sql` * To verify the user has been created: `SELECT User FROM mysql.user;` you should see user with name `sonar` -
rasheedamir revised this gist
Nov 28, 2014 . No changes.There are no files selected for viewing
-
rasheedamir revised this gist
Nov 28, 2014 . 1 changed file with 5 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,12 +35,11 @@ Create SonarQube database and user. Command: mysql -u root -p < create_database.sql * 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; * To run the script: `sudo mysql -u root -p < create_database.sql` * To verify the user has been created: `SELECT User FROM mysql.user;` you should see user with name `sonar` -
rasheedamir revised this gist
Nov 28, 2014 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,12 +28,12 @@ Create an empty schema and a sonarqube user. Grant this sonarqube user permissio * Here is a [MYSQL Script](https://github.com/SonarSource/sonar-examples/blob/master/scripts/database/mysql/create_database.sql) vi create_database.sql Create SonarQube database and user. Command: mysql -u root -p < create_database.sql CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; -
rasheedamir revised this gist
Nov 28, 2014 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,6 +27,21 @@ The MySQL daemon will be stopped, and you will be prompted to enter a new passwo Create an empty schema and a sonarqube user. Grant this sonarqube user permissions to create, update and delete objects for this schema. The charset of the database has to be set to "UTF-8" and the language (database and user) to "English". * Here is a [MYSQL Script](https://github.com/SonarSource/sonar-examples/blob/master/scripts/database/mysql/create_database.sql) ~$ vi create_database.sql # Create SonarQube database and user. # # Command: mysql -u root -p < create_database.sql # 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; * To run the script: `sudo mysql -u root -p < create_database.sql` * To verify the user has been created: `SELECT User FROM mysql.user;` you should see user with name `sonar` * To verify the database has been created: `show databases;` you should see database with name `sonar` -
rasheedamir revised this gist
Oct 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,7 +56,7 @@ sudo apt-get install oracle-java7-installer * `sonar.web.context=/sonar` * `sonar.web.port=9000` ##### Start * `cd /opt/sonar/bin` `sudo sh sonar.sh start` `sudo sh sonar.sh stop` * `cd /opt/sonar/log` `tail -f sonar.log` * `ps -ef | grep sonar` -
rasheedamir revised this gist
Oct 3, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,6 +53,10 @@ sudo apt-get install oracle-java7-installer * Comment the embedded database and uncomment the line to use MySQL ##### Configure WebServer * `sonar.web.context=/sonar` * `sonar.web.port=9000` ##### Starting! * `cd /opt/sonar/bin` `sudo sh sonar.sh start` `sudo sh sonar.sh stop` * `cd /opt/sonar/log` `tail -f sonar.log` * `ps -ef | grep sonar` -
rasheedamir revised this gist
Oct 3, 2014 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -52,3 +52,7 @@ sudo apt-get install oracle-java7-installer * `sudo nano sonar.properties` * Comment the embedded database and uncomment the line to use MySQL ##### Configure WebServer * `sonar.web.host=192.0.0.1` * `sonar.web.context=/sonar` * `sonar.web.port=9000` -
rasheedamir revised this gist
Oct 3, 2014 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,7 +41,14 @@ sudo apt-get install oracle-java7-installer #### Installing the Web Server ##### Install * Add the following entry in your /etc/apt/sources.list: `cd /etc/apt/` then `sudo vim sources.list` then `press o` then copy `deb http://downloads.sourceforge.net/project/sonar-pkg/deb binary/` then `press ESC` then write `:wq!` then `press ENTER` * `sudo apt-get update` * `sudo apt-get install sonar` ##### Configure Database * Go to `/opt/sonar/conf` * `sudo nano sonar.properties` * Comment the embedded database and uncomment the line to use MySQL -
rasheedamir revised this gist
Sep 28, 2014 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,4 +37,11 @@ Create an empty schema and a sonarqube user. Grant this sonarqube user permissio sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer ``` #### Installing the Web Server * Add the following entry in your /etc/apt/sources.list: `cd /etc/apt/` then `sudo vim sources.list` then `press o` then copy `deb http://downloads.sourceforge.net/project/sonar-pkg/deb binary/` then `press ESC` then write `:wq!` then `press ENTER` * `sudo apt-get update` * `sudo apt-get install sonar` -
rasheedamir revised this gist
Sep 28, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,5 +36,5 @@ Create an empty schema and a sonarqube user. Grant this sonarqube user permissio ```bash sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer ``` -
rasheedamir revised this gist
Sep 28, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,6 +33,8 @@ Create an empty schema and a sonarqube user. Grant this sonarqube user permissio #### Install Java ```bash sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer maven git-core ``` -
rasheedamir revised this gist
Sep 28, 2014 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,3 +31,8 @@ Create an empty schema and a sonarqube user. Grant this sonarqube user permissio * To verify the user has been created: `SELECT User FROM mysql.user;` you should see user with name `sonar` * To verify the database has been created: `show databases;` you should see database with name `sonar` #### Install Java sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer maven git-core -
rasheedamir revised this gist
Sep 28, 2014 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,4 +24,10 @@ If you would like to change the MySQL root password, in a terminal enter: The MySQL daemon will be stopped, and you will be prompted to enter a new password. Create an empty schema and a sonarqube user. Grant this sonarqube user permissions to create, update and delete objects for this schema. The charset of the database has to be set to "UTF-8" and the language (database and user) to "English". * Here is a [MYSQL Script](https://github.com/SonarSource/sonar-examples/blob/master/scripts/database/mysql/create_database.sql) * To run the script: `sudo mysql -u root -p < create_database.sql` * To verify the user has been created: `SELECT User FROM mysql.user;` you should see user with name `sonar` * To verify the database has been created: `show databases;` you should see database with name `sonar` -
rasheedamir revised this gist
Sep 28, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,4 +22,6 @@ If the server is not running correctly, you can type the following command to st If you would like to change the MySQL root password, in a terminal enter: * `sudo dpkg-reconfigure mysql-server-5.5` The MySQL daemon will be stopped, and you will be prompted to enter a new password. Create an empty schema and a sonarqube user. Grant this sonarqube user permissions to create, update and delete objects for this schema. The charset of the database has to be set to "UTF-8" and the language (database and user) to "English". Here is a [MYSQL Script](https://github.com/SonarSource/sonar-examples/blob/master/scripts/database/mysql/create_database.sql) -
rasheedamir revised this gist
Sep 28, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,4 +21,5 @@ If the server is not running correctly, you can type the following command to st If you would like to change the MySQL root password, in a terminal enter: * `sudo dpkg-reconfigure mysql-server-5.5` The MySQL daemon will be stopped, and you will be prompted to enter a new password. -
rasheedamir revised this gist
Sep 28, 2014 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,3 +15,10 @@ Once the installation is complete, the MySQL server should be started automatica When you run this command, you should see the following line or something similar: * `tcp 0 0 localhost:mysql *:* LISTEN 2759/mysqld` If the server is not running correctly, you can type the following command to start it: * `sudo service mysql restart` If you would like to change the MySQL root password, in a terminal enter: * `sudo dpkg-reconfigure mysql-server-5.5` The MySQL daemon will be stopped, and you will be prompted to enter a new password.
NewerOlder