debian 7.6 에서 redmine 2.6.1 + thin + nginx 의 설치 와 설정

2870 단어
설치 하 다.
<!-- lang: shell -->
git clone https://github.com/redmine/redmine.git
cd redmine
git co -b 2.6-stable origin/2.6-stable

apt-get install imagemagick
gem install bundler

bundle install

#       
bundle install --without development test

bundle install --without development test rmagick

mv config/database.yml.example config/database.yml
vi config/database.yml
#         :
production:
    adapter: sqlite3
    database: db/test.db

rake generate_secret_token
rake db:migrate RAILS_ENV="production"

ruby script/rails server -e production

이후 방문http://localhost:3000/
thin 설정
<!-- lang: shell -->
#   gem "builder", "3.0.4"      gem "thin"
vi Gemfile

rm Gemfile.lock
bundle install

thin install

#     
update-rc.d -f thin defaults

redmine 프로필 만 들 기
vi /etc/thin/redmine.yml
<!-- lang: shell -->
---
pid: tmp/pids/thin.pid
group: root
wait: 30
timeout: 30
log: log/thin.log
max_conns: 1024
require: []

environment: production
max_persistent_conns: 512
servers: 4
daemonize: true
user: root
socket: /tmp/thin.sock
chdir: /root/git/redmine

다음 실행 / etc / init. d / thin start
통합 nginx
<!-- lang: shell -->
log_format  rm.erp-ec.com  '$remote_addr - $remote_user [$time_local] $request '
         '$status $body_bytes_sent $http_referer '
         '$http_user_agent $http_x_forwarded_for';

upstream thinserver {
    server unix:/tmp/thin.0.sock;
    server unix:/tmp/thin.1.sock;
    server unix:/tmp/thin.2.sock;
    server unix:/tmp/thin.3.sock;
}
server
{
    listen       80;
    server_name rm.erp-ec.com;
    root  /root/git/redmine/public;

    location /
    {
        try_files $uri/index.html $uri.html $uri @cluster;
    }
    location @cluster {
        proxy_pass http://thinserver;
    }
    access_log  /home/wwwlogs/rm.erp-ec.com.log  rm.erp-ec.com;
}

플러그 인 설치
<!-- lang: shell -->
cd plugins

hg clone https://bitbucket.org/haru_iida/redmine_code_review

rake redmine:plugins:migrate RAILS_ENV=production

설치 테마
<!-- lang: shell -->
cd public/themes

git clone git://github.com/makotokw/redmine-theme-gitmike.git

서비스 다시 시작
/etc/init.d/thin restart
데이터베이스 sqlite 3 을 mysql 로 변경
<!-- lang: shell -->
vi Gemfile
#   gem "builder", "3.0.4"      
gem "yaml_db"

#   
rm Gemfile.lock
bundle install

rake db:dump RAILS_ENV=production

vi config/database.yml
#    mysql     
production:
    adapter: mysql2
    database: redmine
    host: localhost
    username: redmine
    password: "redmine123" #          
    encoding: utf8
    socket: /tmp/mysql.sock

#   
rake db:load RAILS_ENV=production

좋은 웹페이지 즐겨찾기