Installation Redmine on Ubuntu

Posted at 2014. 3. 26. 00:54 | Posted in Server/Ubuntu
반응형

우분투에서 Readmine 설치하는데 이것저것 짜잘한 에러가 많이 난다... 그래서 정리한다.


아무것도 설치되지 않은 Ubuntu 12.04 를 기준으로 한다.


참조

http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_Ubuntu

http://openarisu.tistory.com/231




Preparation


apache2 와 데이터베이스(mysql, postgresql 중 하나)가 필요하다. mysql 로 하겠다.


# apt-get install apache2 software-properties-common librmagick-ruby ruby-rmagick mysql-server mysql-client mysql-common


데이터베이스(mysql)의 root 계정 비밀번호 설정



root 비밀번호 재입력



mod_passenger 설치


# apt-get install libapache2-mod-passenger

a2enmod passenger

/etc/init.d/apache2 restart


gem 설치


gem install rake -v 0.8.7

Fetching: rake-0.8.7.gem (100%)

Successfully installed rake-0.8.7

1 gem installed

Installing ri documentation for rake-0.8.7...

Installing RDoc documentation for rake-0.8.7...


gem install fastercsv

Fetching: fastercsv-1.5.5.gem (100%)

Successfully installed fastercsv-1.5.5

1 gem installed

Installing ri documentation for fastercsv-1.5.5...

Installing RDoc documentation for fastercsv-1.5.5...


# gem install bundler

Fetching: bundler-1.5.3.gem (100%)

Successfully installed bundler-1.5.3

1 gem installed

Installing ri documentation for bundler-1.5.3...

Installing RDoc documentation for bundler-1.5.3...




Installation


redmine 설치


# apt-get install python-software-properties

add-apt-repository ppa:ondrej/redmine

You are about to add the following PPA to your system:

 Redmine, Rails and other dependencies needed to run Redmine on Ubuntu Precise.


The repository seem to be stable again.  However please note that many plugins are not compatible with 2.x releases, so think before you update.  Also there might be some glitches when upgrading, so if you think you found one, please send the report with as many information you can gather to me.


NOTE: Unfortunatelly it seems to be virtually impossible to backport Redmine to anything older than Ubuntu 12.04 due entangled circular build dependencies in ruby packages.


NOTE: It should be possible to run redmine in this repository with ruby1.9.1 (1.9.3).


PLEASE READ: If you like my work and want to give me a little motivation, please consider donating: https://deb.sury.org/pages/donate.html

 More info: https://launchpad.net/~ondrej/+archive/redmine

Press [ENTER] to continue or ctrl-c to cancel adding it

엔터

gpg: keyring `/tmp/tmpMM_hPJ/secring.gpg' created

gpg: keyring `/tmp/tmpMM_hPJ/pubring.gpg' created

gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com

gpg: /tmp/tmpMM_hPJ/trustdb.gpg: trustdb created

gpg: key E5267A6C: public key "Launchpad PPA for Ondřej Surý" imported

gpg: Total number processed: 1

gpg:               imported: 1  (RSA: 1)

OK


# apt-get update

# apt-get install redmine redmine-mysql


<Yes> 선택



데이터베이스는 mysql 선택



root 계정의 비밀번호 입력



redmine 계정의 비밀번호 입력



redmine 비밀번호 재입력





Configuration


passenger.conf 파일에서 아래와 같이 추가


# vi /etc/apache2/mods-available/passenger.conf


<IfModule mod_passenger.c>

  PassengerRoot /usr

  PassengerRuby /usr/bin/ruby

  PassengerDefaultUser www-data

</IfModule>


security 파일 수정 ("OS" → "Prod")


vi /etc/apache2/conf.d/security


ServerTokens Prod


퍼미션 변경


# chmod a+x /usr/share/redmine/public

chmod 755 /usr/share/redmine/public


Gemfile.lock 파일을 웹 계정 소유로 넘겨줌


# touch /usr/share/redmine/Gemfile.lock

# chown www-data:www-data /usr/share/redmine/Gemfile.lock


Gemfile 파일을 수정


# vi /usr/share/redmine/Gemfile


source 'https://rubygems.org'


gem 'fastercsv'


local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")

...



여기서부터는 Apache2 의 VIrtualHost 관련된 부분이다. 여기는 각자의 설정대로 하면 된다.


아래의 설명은 /var/www 을 redmine 경로로 대체하여 사용하는 방법이다.


default 파일 수정(2줄 추가)


# vi /etc/apache2/sites-available/default


        DocumentRoot /var/www

        <Directory />

                Options FollowSymLinks

                RailsBaseURI /

                PassengerResolveSymlinksinDocumentRoot on

                AllowOverride None

        </Directory>


apache2 의 루트 경로를 redmine 경로로 대체


# a2enmod rewrite

Enabling module rewrite.

To activate the new configuration, you need to run:

  service apache2 restart


# cd /var

# mv www ww2

# ln -s /usr/share/redmine/public www

# /etc/init.d/apache2 restart




Test


메인화면 떳다...이제.. 놀자..




반응형

'Server > Ubuntu' 카테고리의 다른 글

Disable automatic updates kernel on Ubuntu  (1) 2017.12.20
Installation Maven 3 on Ubuntu  (0) 2014.03.25
Using Xmanager to Ubuntu 10.10  (0) 2011.04.13
Subversion  (0) 2010.08.16
Openfire  (0) 2010.05.25
Webmin  (0) 2009.11.18
Squirrelmail  (0) 2009.11.12
SparkWeb  (0) 2009.11.12
Cacti  (0) 2009.11.12
Apache + SSL  (0) 2009.11.12
//

Installation Maven 3 on Ubuntu

Posted at 2014. 3. 25. 20:06 | Posted in Server/Ubuntu
반응형

출처 : http://stackoverflow.com/questions/5312350/where-is-maven-installed-on-ubuntu




우분투 버전 확인


# lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description:    Ubuntu 12.04.4 LTS

Release:        12.04

Codename:       precise


설치


# add-apt-repository ppa:natecarlson/maven3

# apt-get update

# sudo apt-get install maven3


메이븐 버전 확인


# mvn3 -v

Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-15T02:37:52+09:00)

Maven home: /usr/share/maven3

Java version: 1.7.0_51, vendor: Oracle Corporation

Java home: /usr/lib/jvm/java-7-oracle/jre

Default locale: ko_KR, platform encoding: UTF-8

OS name: "linux", version: "3.2.0-60-generic-pae", arch: "i386", family: "unix"



기본 명령어로 링크


# ln -s /usr/bin/mvn3 /usr/bin/mvn


반응형

'Server > Ubuntu' 카테고리의 다른 글

Disable automatic updates kernel on Ubuntu  (1) 2017.12.20
Installation Redmine on Ubuntu  (0) 2014.03.26
Using Xmanager to Ubuntu 10.10  (0) 2011.04.13
Subversion  (0) 2010.08.16
Openfire  (0) 2010.05.25
Webmin  (0) 2009.11.18
Squirrelmail  (0) 2009.11.12
SparkWeb  (0) 2009.11.12
Cacti  (0) 2009.11.12
Apache + SSL  (0) 2009.11.12
//

Javascript Dependency in Maven

Posted at 2014. 3. 19. 19:22 | Posted in JavaScript
반응형

http://www.webjars.org/


보통 메이븐을 통해서 자바 라이브러리(jar)들간의 의존 관계를 해결한다.


하지만 자바스크립트 라이브러리는 이런게 없다. 어디선가 js 파일 받아서 웹 소스에다가 놓고 써야한다.


예를 들어 "jQuery UI"를 써야 하면 jquery.ui.js 파일 받고 "jQuery UI"가 필요로 하는 jquery.js 를 구해서 넣어야한다.



<script type="text/javascript" src="js/static/jquery-1.11.0.min.js" ></script>

<script type="text/javascript" src="js/static/jquery-ui.min.js" ></script>


근데! 누군가가 메이븐으로 자바스크립트 라이브러리의 의존 관계를 관리할 수 있도록 했다.

이 기발한 원리는 이러하다. ㅋㅋ


1. /META-INF/ 안에 js 파일들을 넣은 jar 파일을 만들어서 메이븐으로 쓸 수 있도록 한다.

2. 프레임워크마다의 방법으로 classpath 안의 js 파일들을 웹상에서 쓸 수 있도록 한다.


pom.xml 에 아래와 같이 jquery-ui 를 추가하면


<dependency>

<groupId>org.webjars</groupId>

<artifactId>jquery-ui</artifactId>

<version>1.10.3</version>

</dependency>


아래와 같이 jquery 까지 다운로드 받게 된다.



실제 jar 내용을 보면 아래와 같이 js 와 관련된 파일들이 들어있다. (requireJS도? 들어있네 ㄷㄷ)



Spring 3의 mvc 네임스페이스를 이용하면 쉽게 설정 가능하다. (다른 방법은 http://www.webjars.org/documentation 참조)


<mvc:resources mapping="/js/static/**" location="classpath:/META-INF/resources/webjars/" />


html 에서는 리소스의 경로에 맞게 해주면 되겠다.


<script type="text/javascript" src="js/static/jquery/1.9.1/jquery.min.js" ></script>

<script type="text/javascript" src="js/static/jquery-ui/1.10.3/ui/minified/jquery-ui.min.js" ></script>


web-jars.war

 ↑ 소스 포함 war


web-jars.zip

 ↑ 이클립스 메이븐 프로젝트


반응형

'JavaScript' 카테고리의 다른 글

url 파라미터 알아내기  (5) 2010.01.15
//