레이블이 EC2인 게시물을 표시합니다. 모든 게시물 표시
레이블이 EC2인 게시물을 표시합니다. 모든 게시물 표시

2014년 3월 3일 월요일

How To Jenkins Installing at EC2

  1. Jenkins 홈페이지: http://jenkins-ci.org/
  2. 설치 참고: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
  3. JDK 설치
    1. sudo add-apt-repository ppa:webupd8team/java
      sudo apt-get update
      sudo apt-get install oracle-jdk7-installer
      인스톨 후 정상적으로 설치가 되었는지 확인
      java -version
      java version "1.7.0_05"
  4. maven 설치
    1. sudu apt-get install maven
    2. maven 설명: http://dimdim.tistory.com/entry/Maven-%EC%A0%95%EB%A6%AC
  5. apache2, nginx git 설치
    1. apt-get install apache2 nginx git
  6. nodejs 설치
    1. apt-get install nodejs
    2. URL: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
  7. Plug-in 설치
    1. Git, nodejs, Jira, Heroku, Sonar, BitBucket, Gerrit
  8. 기본 설정으로는 누구나 관리가 가능하게끔 되어 있으므로, security 설정하자.
    image2014-3-1 23-34-6
  9. JDK, MAVEN 설정
    image2014-3-1 23-43-50image2014-3-1 23-44-43
  10. Gerrit 연동(Gerrit Trigger)
    1. Jenkins wiki URL: https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger
  11. JIRA 연동
    1. Jenkins wiki URL: https://wiki.jenkins-ci.org/display/JENKINS/JIRA+Plugin

Get Started With SonarQube On EC2

Requirements(요구 사양 확인)

Prerequisite

The only prerequisite for running SonarQube is to have Java (Oracle JRE 6 onwards) installed on your machine.

Hardware Requirements(하드웨어 요구사양)
  1. The SonarQube web server requires at least 500 Mb of RAM to run efficiently.
  2. The amount of disk space you need will depend on how much code you analyze with SonarQube. As an example, Nemo the public instance of SonarQube, has more than 10 millions lines of code under analysis with 4 years of history. Nemo is currently running on a Amazon EC2 small instance, using  about 10 Gb of drive space

http://docs.codehaus.org/display/SONAR/Requirements

Installation

Install JAVA7 (자바 7 설치)

ubuntu@ip-172-31-31-224:~$ sudo apt-get install openjdk-7-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
0 upgraded, 138 newly installed, 0 to remove and 3 not upgraded.
Need to get 79.2 MB of archives.
After this operation, 181 MB of additional disk space will be used.
Do you want to continue [Y/n]?

Install MySQL (mysql 설치)

~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libnet-daemon-perl
  libplrpc-perl libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
  mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libipc-sharedcache-perl tinyca mailx
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libnet-daemon-perl
  libplrpc-perl libterm-readkey-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common
  mysql-server mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 13 newly installed, 0 to remove and 3 not upgraded.
Need to get 27.2 MB of archives.
After this operation, 97.5 MB of additional disk space will be used.
Do you want to continue [Y/n]?

Installing the DataBase (DB설치)

make sample scripte for mysql

~$ 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;

create database

~$ mysql -u root -p < create_database.sql
Enter password: <—insert your root passwd of mysql

Download

Add the following entry in your /etc/apt/sources.list :

deb http://downloads.sourceforge.net/project/sonar-pkg/deb binary/

Update your local package index and install Sonar:

sudo apt-get update
sudo apt-get install sonar

Sonar native packages

Those packages install standalone version of Sonar into "/opt/sonar" and provide init script, so it can be launched as:

/etc/init.d/sonar start

Change Database


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


Restart


$ sudo /etc/init.d/sonar restart
Starting sonar...
Started sonar.


Run!!!


image2014-3-1 17-20-32

http://sonar-pkg.sourceforge.net/

http://docs.codehaus.org/display/SONAR/Installing

http://www.chrishjorth.com/blog/free-aws-ec2-ubuntu-apache-php-mysql-setup/