Centos6.4下安裝redmine1.0并升級到redmine3.3

CentOs6.4上安裝升級redmine1.0手冊

第一步:安裝依賴包

第二步:安裝MySQL,命令

第三步:安裝rvm

第四步:Svn下載redmine1.0

創(chuàng)建Gemfile文件,并編輯如下

第五步:創(chuàng)建redmine數(shù)據(jù)庫

第六步:配置redmine連接數(shù)據(jù)庫

初始化數(shù)據(jù)庫

文件重命名

第七步:Redmine啟動

Redmine1.0升級到redmine3.3.0步驟

第一步:組件升級

第二步:下載最新版本redmine3.3.0

第三步:安裝完成之后進入redmine3.3目錄,配置數(shù)據(jù)庫

第四步:啟動redmine


第一步:安裝依賴包:

先取得管理員權(quán)限,命令

su root

輸入密碼

然后輸入下面的命令:

yum -y install nano zip unzip libyaml-devel zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel gcc ruby-devel gcc-c++ make postgresql-devel ImageMagick-devel sqlite-devel perl-LDAP mod_perl perl-Digest-SHA


第二步:安裝MySQL,命令:

yum -y install mysql mysql-server

如果出現(xiàn)端口被占用,可以用下面的命令結(jié)束進程

# rm -f /var/run/yum.pid

服務(wù)開機啟動:命令

chkconfig mysqld on

service mysqld start

給mysql數(shù)據(jù)庫設(shè)置密碼:命令:

/usr/bin/mysql_secure_installation

Because we not have a password for the root account so you press Enter to skip.

Enter current password for root (enter for none):

Select Yes to set the password for the MySQL root account.

Set root password? [Y/n] y

Enter and confirm your password, remove the anonymous user, select Yes

Remove anonymous users? [Y/n] y

Allow remote login to MySQL as root account, select No.

Disallow root login remotely? [Y/n] n

Delete the test database, select Yes

Remove test database and access to it? [Y/n] y

Reload privilege tables, select Yes

Reload privilege tables now? [Y/n] y

第三步:安裝rvm:

\curl -L https://get.rvm.io| bash

source /etc/profile.d/rvm.sh

The following command will list the versions of Ruby to install :

rvm list known

選擇1.8.7版本:命令:

rvm?install?ruby-1.8.7-p374

第四步:Svn下載redmine1.0

安裝svn版本管理系統(tǒng):

yum install -y subversion

使用svn下載redmine:

1.cd?/usr/local/

2.svn?co?http://svn.redmine.org/redmine/branches/1.0-stable

3.mv1.0-stable?redmine1.0

4.cd?redmine1.0

5.gem?install?bundler

創(chuàng)建Gemfile文件,并編輯如下:

vi Gemfile

把rails也加在里面:

Gem“rails”,“2.3.5”

# file: redmine/Gemfile

source "http://rubygems.org"

gem"rails","2.3.5"

gem "rake", "0.8.3"

gem "rack", "1.0.1"

gem "i18n", "0.4.2"

gem "rubytree", "0.5.2", :require => "tree"

gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay

gem "mysql"

gem "coderay", "~>0.9.7"

執(zhí)行bundle,

bundle install


第五步:創(chuàng)建redmine數(shù)據(jù)庫:

1.mysql?-uroot?-p?#輸入之前設(shè)置的密碼,這里是pwd

2.create database redmine character set utf8;

3.create user 'redmine'@'localhost' IDENTIFIED BY 'pwd';

4.#用戶名:?redmine;?密碼:pwd

5.grant all privileges on redmine.* to 'redmine'@'localhost';?#最大權(quán)限

6.flush privileges;

7.Quit; ??????????????#退出mysql

第六步:配置redmine連接數(shù)據(jù)庫:

進入redmine1.0目錄:

cd usr/local/redmine1.0

復(fù)制config/database.yml.example到config/database.yml,命令如下:

cp config/database.yml.example ?config/database.yml

cd config

編輯database.yml,命令如下:

vi database.yml

用戶名:redmine,密碼用單引號’pwd’

在redmine1.0目錄下執(zhí)行下面命令:

先執(zhí)行rvm install rubygems 1.4.2 --force

不然會報錯undefined method `source_index' for Gem:Module (NoMethodError)

相關(guān)網(wǎng)址:http://blog.csdn.net/dazhi_100/article/details/47024163

生成密鑰:

RAILS_ENV=production bundle exec rake generate_session_store

生成數(shù)據(jù)庫結(jié)構(gòu):

RAILS_ENV=production bundle exec rake db:migrate

初始化數(shù)據(jù)庫:

RAILS_ENV=production bundle exec rake redmine:load_default_data

選擇默認語言:zh

文件重命名:

cd public

mv dispatch.cgi.example dispatch.cgi

mv dispatch.fcgi.example dispatch.fcgi

mv dispatch.rb.example dispatch.rb

第七步:Redmine啟動:

cd usr/local/redmine1.0

ruby script/server webrick -e production

后臺運行命令:

ruby script/server webrick -e production -d

關(guān)閉后臺運行:kill -9 pid

至此,Redmine1.0安裝完成。


Redmine1.0升級到redmine3.3.0步驟:

前提:redmine1.0安裝并運行成功

第一步:組件升級

Ruby選擇1.9.3,rails選擇2.3.14,

安裝Ruby1.9.3-p551:

cd /

rvm install ruby-1.9.3-p551

將1.9.3設(shè)置成默認使用版本:

rvm --default use 1.9.3-p551


更新rubygems版本:

gem update --system

更新rails版本:

gem install rails -v 2.3.14

更新rake和安裝mysql2(0.4.4):

gem install rake

gem install mysql2

第二步:下載最新版本redmine3.3.0:

1.cd?/usr/local/

2.svn?co?http://svn.redmine.org/redmine/branches/3.3-stable

3.mv3.3-stable?redmine3.3

4.cd?redmine3.3

5.gem?install?bundler

進入redmine3.3目錄:安裝bundler:

gem install bundler

依賴組件安裝:bundle install --without development test rmagick:

第三步:安裝完成之后進入redmine3.3目錄,配置數(shù)據(jù)庫:

復(fù)制config/database.yml.example到config/database.yml:

cp config/database.yml.example ?config/database.yml

cd config

編輯database.yml

vi databases.yml

修改下面相應(yīng)的部分

production: ?adapter: mysql2

database: redmine

host: localhost

username: redmine

password:“pwd”

將Gemfile的mysql2版本改成0.4.4

vi Gemfile

之前安裝redmine1.0.1的時候創(chuàng)建過表,但是redmine3.3和1.0的表結(jié)構(gòu)不同,所以要先刪除之前創(chuàng)建的表:

Mysql -uroot -p

Drop database redmine;

創(chuàng)建數(shù)據(jù)庫redmine和數(shù)據(jù)庫:

1.create?database?redmine?character?set?utf8;

進入redmine3.3目錄,創(chuàng)建一個session安裝密鑰:

cd usr/local/redmine3.3

rake?generate_secret_token

創(chuàng)建初始化所有redmine用到的table表:

RAILS_ENV=production bundle exec rake db:migrate生成表結(jié)構(gòu)

RAILS_ENV=production bundle exec rake redmine:load_default_data初始化數(shù)據(jù),選擇zh

第四步:啟動redmine:

Ruby bin/rails server webrick -e production -d

Redmine1.0.1升級至Redmine3.3.0完畢。


附上redmine1.0和3.3版本的數(shù)據(jù)庫表結(jié)構(gòu):

Redmine3.3數(shù)據(jù)庫表結(jié)構(gòu):

------------------------------------+

| Tables_in_redmine ??????????????????|

+-------------------------------------+

| attachments ????????????????????????|

| auth_sources ???????????????????????|

| boards ?????????????????????????????|

| changes ????????????????????????????|

| changeset_parents ??????????????????|

| changesets ?????????????????????????|

| changesets_issues ??????????????????|

| comments ???????????????????????????|

| custom_field_enumerations ??????????|

| custom_fields ??????????????????????|

| custom_fields_projects ?????????????|

| custom_fields_roles ????????????????|

| custom_fields_trackers ?????????????|

| custom_values ??????????????????????|

| documents ??????????????????????????|

| email_addresses ????????????????????|

| enabled_modules ????????????????????|

| enumerations ???????????????????????|

| groups_users ???????????????????????|

| import_items ???????????????????????|

| imports ????????????????????????????|

| issue_categories ???????????????????|

| issue_relations ????????????????????|

| issue_statuses ?????????????????????|

| issues ?????????????????????????????|

| journal_details ????????????????????|

| journals ???????????????????????????|

| member_roles ???????????????????????|

| members ????????????????????????????|

| messages ???????????????????????????|

| news ???????????????????????????????|

| open_id_authentication_associations |

| open_id_authentication_nonces ??????|

| projects ???????????????????????????|

| projects_trackers ??????????????????|

| queries ????????????????????????????|

| queries_roles ??????????????????????|

| repositories ???????????????????????|

| roles ??????????????????????????????|

| roles_managed_roles ????????????????|

| schema_migrations ??????????????????|

| settings ???????????????????????????|

| time_entries ???????????????????????|

| tokens ?????????????????????????????|

| trackers ???????????????????????????|

| user_preferences ???????????????????|

| users ??????????????????????????????|

| versions ???????????????????????????|

| watchers ???????????????????????????|

| wiki_content_versions ??????????????|

| wiki_contents ??????????????????????|

| wiki_pages ?????????????????????????|

| wiki_redirects ?????????????????????|

| wikis ??????????????????????????????|

| workflows ??????????????????????????|

+-------------------------------------+

Redmine1.0表結(jié)構(gòu):

+-------------------------------------+

| Tables_in_redmine ??????????????????|

+-------------------------------------+

| attachments ????????????????????????|

| auth_sources ???????????????????????|

| boards ?????????????????????????????|

| changes ????????????????????????????|

| changesets ?????????????????????????|

| changesets_issues ??????????????????|

| comments ???????????????????????????|

| custom_fields ??????????????????????|

| custom_fields_projects ?????????????|

| custom_fields_trackers ?????????????|

| custom_values ??????????????????????|

| documents ??????????????????????????|

| enabled_modules ????????????????????|

| enumerations ???????????????????????|

| groups_users ???????????????????????|

| issue_categories ???????????????????|

| issue_relations ????????????????????|

| issue_statuses ?????????????????????|

| issues ?????????????????????????????|

| journal_details ????????????????????|

| journals ???????????????????????????|

| member_roles ???????????????????????|

| members ????????????????????????????|

| messages ???????????????????????????|

| news ???????????????????????????????|

| open_id_authentication_associations |

| open_id_authentication_nonces ??????|

| projects ???????????????????????????|

| projects_trackers ??????????????????|

| queries ????????????????????????????|

| repositories ???????????????????????|

| roles ??????????????????????????????|

| schema_migrations ??????????????????|

| settings ???????????????????????????|

| time_entries ???????????????????????|

| tokens ?????????????????????????????|

| trackers ???????????????????????????|

| user_preferences ???????????????????|

| users ??????????????????????????????|

| versions ???????????????????????????|

| watchers ???????????????????????????|

| wiki_content_versions ??????????????|

| wiki_contents ??????????????????????|

| wiki_pages ?????????????????????????|

| wiki_redirects ?????????????????????|

| wikis ??????????????????????????????|

| workflows ??????????????????????????|

+-------------------------------------+

47 rows in set (0.00 sec)

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容

  • Redmine 安裝記錄 Requirements 本文用到的系統(tǒng)為64位的 Windows, 使用的數(shù)據(jù)庫為SQ...
    飛多學(xué)堂閱讀 1,849評論 0 1
  • Awesome Ruby Toolbox Awesome A collection of awesome Ruby...
    debbbbie閱讀 2,929評論 0 3
  • 1、凡事想別人感激,那是必然要失望的。——《故園》 2、一件事無論太晚或者對于你來說太早,都不會阻攔你成為你想成為...
    胡潤民原創(chuàng)詩詞閱讀 541評論 0 6
  • 我有想法,還沒有時間去做,這是我們會經(jīng)常聽到的一句話,我想做服裝設(shè)計師,還沒有時間去學(xué)習(xí);我想學(xué)習(xí)英語,還沒有時間...
    豌豆婆婆閱讀 196評論 0 0
  • 第一次接觸這個app,感覺還蠻好的,不知道好友看不看得到,總歸還是會比較害羞的。 說起來我也是一個非常喜歡懷舊的人...
    宋柚晨閱讀 146評論 1 0