FreeBSD 9.0 架設安裝 redmine

之前有介紹過FreeBSD 架設 redmine.
不過現在因為版本關係不相容,以無法使用.

$ cd /usr/ports/www/redmine
$ make install clean
===>  redmine-1.3.1 is marked as broken: Does not work with RubyGems 1.8.
*** Error code 1
 
Stop in /usr/ports/www/redmine.
$


現在來介紹一下如何手動安裝.

1. 首先先裝好 Ruby 1.9 與所需要相關套件

1
2
3
4
5
6
7
8
9
10
$ echo "RUBY_VERSION=1.9.3" >> /etc/make.conf
$ cd /usr/ports/lang/ruby19
$ make install clean
$ cd /usr/ports/devel/ruby-gems
$ make install clean
$ cd /usr/ports/converters/ruby-iconv
$ make install clean
$ cd /usr/ports/databases/ruby-mysql
$ make install clean
$ gem19 install rails --version=2.3.14

2. 拉Redmine最新版本 來安裝

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$ mkdir /usr/local/www/ 
$ cd /usr/local/www/
$ svn co http://redmine.rubyforge.org/svn/trunk redmine
$ cd redmine
 
# 拷貝設定檔 設定
$ cp config/configuration.yml.example config/configuration.yml
$ cp config/database.yml.example config/database.yml
 
# 編輯好相關設定
$ vi config/configuration.yml
$ vi config/database.yml
 
# 產生 session store secret.
$ rake generate_session_store
 
# 產生 populate database 資料庫
$ rake db:migrate RAILS_ENV=production
$ rake redmine:load_default_data RAILS_ENV=production
 
# 建立獨立使用者
$ pw groupadd -n redmine -g 3000
$ pw useradd -n redmine -u 3000 -g 3000 -d /usr/local/www/redmine -s /bin/sh -h -
 
# 修改好目錄權限
$ mkdir tmp public/plugin_assets
$ sudo chown -R redmine:redmine files log tmp public/plugin_assets
$ sudo chmod -R 755 files log tmp public/plugin_assets
 
# Login as Redmine user
$ su - redmine
 
# 啟動
$ ruby19 script/server webrick -e production

NGINX 設定

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
upstream mongrel {
    server 127.0.0.1:3000;
}
server {
    listen          80;
    server_name     redmine.test;
 
    root /usr/local/www/redmine/public;
 
        location / {
            proxy_set_header  X-Real-IP  $remote_addr;
            proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header  Host $http_host;
            proxy_redirect off;
            proxy_read_timeout 30;
 
                if (-f $request_filename/index.html) {
                    rewrite (.*) $1/index.html break;
                }
 
                if (-f $request_filename.html) {
                    rewrite (.*) $1.html break;
                }
 
                if (-f $request_filename.txt) {
                    rewrite (.*) $1.txt break;
                }
 
                proxy_pass http://mongrel/;
        }
}

One thought on “FreeBSD 9.0 架設安裝 redmine

  1. Thanks for your valuable post. Over time, I have come to understand that the particular symptoms of mesothelioma cancer are caused
    by your build up associated fluid involving the lining in the
    lung and the chest muscles cavity. The illness may start from the chest region and distribute to other limbs.
    Other symptoms of pleural mesothelioma cancer include weight-loss, severe inhaling and exhaling trouble, a fever,
    difficulty ingesting, and swelling of the face and neck areas.
    It should be noted some people living with the
    disease usually do not experience virtually any serious symptoms at all.

    Also visit my blog post: is quibids legit

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *