01. 기본 패키지 설치

$ sudo apt-get install build-essential libpcre3-dev libruby libssl-dev libcurl4-openssl-dev libpq-dev libreadline-dev libjpeg62-dev libpng12-dev curl openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison pkg-config


02. Ruby 설치

$ sudo su -
$ curl -L https://get.rvm.io | sudo bash -s stable
$ source /etc/profile
$ rvm install 2.0.0
$ rvm use 2.0.0
$ rvm --default use 2.0.0

$ nano /etc/environment


PATH="......:/usr/local/rvm/bin"




03. Rails 설치

$ gem install rdoc
$ gem install rails -v 3.2.13
 

04. PostgreSQL 설치 및 설정

$ apt-get install postgresql

$ su - postgres
$ psql

# CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity';
# CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;
# \q

$ exit
$ gem install pg


05. ImageMagick

$ apt-get install imagemagick librmagick-ruby libmagickwand-dev
$ gem install rmagick



06. Redmine

$ cd /srv/install/
$ wget http://www.redmine.org/releases/redmine-2.4.1.tar.gz
$ tar zxvf  redmine-2.4.1.tar.gz


07. bundler & install

$ cd redmine-2.4.1
$ gem install bundler

$ reboot

$ sudo su -
$ cd /srv/install/redmine-2.4.1
$ bundle install --without development test mysql sqlite


08. Apache2 설치

$ apt-get install apache2 apache2-prefork-dev


 

09. passenger 설치

$ gem install passenger
$ cd /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/
./bin/passenger-install-apache2-module

 

$ nano /etc/apache2/mods-available/passenger.conf

<IfModule mod_passenger.c>
   PassengerUser www-data
   PassengerDefaultUser www-data

   PassengerRoot /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29
   PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.0.0-p353/ruby
</IfModule>

$ nano /etc/apache2/mods-available/passenger.load

LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/buildout/apache2/mod_passenger.so


$ cd /etc/apache2/mods-enabled
ln -s ../mods-available/passenger.conf ./passenger.conf
ln -s ../mods-available/passenger.load ./passenger.load


10. database 설정값 등록

$ cd /srv/install/redmine-2.4.1
$ nano ./config/database.yml

 

production:
        adapter: postgresql
        database: redmine
        host: localhost
        username: redmine
        password: redmine
        encoding: utf8
        schema_search_path: public


     - 주의 사항으로는 위의 파일 내용을 입력할 때에 Tab 말고 White-Space로 입력해야 한다.


11. 추가 작업

$ rake generate_secret_token
$ RAILS_ENV=production rake db:migrate
$ RAILS_ENV=production rake redmine:load_default_data
   → Select language [ko]
$ mkdir public/plugin_assets

 

$ chown -R www-data:www-data files log tmp public
$ chmod -R 755 files log tmp public/plugin_assets
$ chown -R www-data:www-data ./config/database.yml
$ chmod 600 ./config/database.yml


 

12. 웹설정

$ cd /var/www/
$ ln -s /srv/install/redmine-2.4.1/public ./redmine

$ nano /etc/apache2/sites-available/default


<Directory /var/www/redmine>

        RailsBaseURI /redmine
        RackEnv production
        RailsEnv production
        PassengerResolveSymlinksInDocumentRoot on

</Directory>


$ service apache2 restart


여기까지 진행하고 웹브라우저로 http://127.0.0.1/redmine에 접속을 하면 Redmine을 볼 수 있다.

초기 관리자는 admin/admin 이다.

반응형

+ Recent posts