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  (2) 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
//