Centos6.4下安裝redmine1.0并升級(jí)到redmine3.3

CentOs6.4上安裝升級(jí)redmine1.0手冊(cè)

第一步:安裝依賴包

第二步:安裝MySQL羔味,命令

第三步:安裝rvm

第四步:Svn下載redmine1.0

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

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

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

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

文件重命名

第七步:Redmine啟動(dòng)

Redmine1.0升級(jí)到redmine3.3.0步驟

第一步:組件升級(jí)

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

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

第四步:?jiǎn)?dòng)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é)束進(jìn)程

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

服務(wù)開機(jī)啟動(dòng):命令

chkconfig mysqld on

service mysqld start

給mysql數(shù)據(jù)庫(kù)設(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ù)庫(kù):

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ù)庫(kù):

進(jìn)入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功茴,密碼用單引號(hào)’pwd’

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

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

不然會(huì)報(bào)錯(cuò)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ù)庫(kù)結(jié)構(gòu):

RAILS_ENV=production bundle exec rake db:migrate

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

RAILS_ENV=production bundle exec rake redmine:load_default_data

選擇默認(rèn)語(yǔ)言:zh

文件重命名:

cd public

mv dispatch.cgi.example dispatch.cgi

mv dispatch.fcgi.example dispatch.fcgi

mv dispatch.rb.example dispatch.rb

第七步:Redmine啟動(dòng):

cd usr/local/redmine1.0

ruby script/server webrick -e production

后臺(tái)運(yùn)行命令:

ruby script/server webrick -e production -d

關(guān)閉后臺(tái)運(yùn)行:kill -9 pid

至此庐冯,Redmine1.0安裝完成。


Redmine1.0升級(jí)到redmine3.3.0步驟:

前提:redmine1.0安裝并運(yùn)行成功

第一步:組件升級(jí)

Ruby選擇1.9.3坎穿,rails選擇2.3.14展父,

安裝Ruby1.9.3-p551:

cd /

rvm install ruby-1.9.3-p551

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

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

進(jìn)入redmine3.3目錄:安裝bundler:

gem install bundler

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

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

復(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的時(shí)候創(chuàng)建過(guò)表玲昧,但是redmine3.3和1.0的表結(jié)構(gòu)不同栖茉,所以要先刪除之前創(chuàng)建的表:

Mysql -uroot -p

Drop database redmine;

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

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

進(jìn)入redmine3.3目錄,創(chuàng)建一個(gè)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

第四步:?jiǎn)?dòng)redmine:

Ruby bin/rails server webrick -e production -d

Redmine1.0.1升級(jí)至Redmine3.3.0完畢孵延。


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

Redmine3.3數(shù)據(jù)庫(kù)表結(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)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末吕漂,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子隙袁,更是在濱河造成了極大的恐慌,老刑警劉巖弃榨,帶你破解...
    沈念sama閱讀 217,509評(píng)論 6 504
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件菩收,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡鲸睛,警方通過(guò)查閱死者的電腦和手機(jī)娜饵,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,806評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)官辈,“玉大人箱舞,你說(shuō)我怎么就攤上這事遍坟。” “怎么了晴股?”我有些...
    開封第一講書人閱讀 163,875評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵愿伴,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我电湘,道長(zhǎng)隔节,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,441評(píng)論 1 293
  • 正文 為了忘掉前任寂呛,我火速辦了婚禮怎诫,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘贷痪。我一直安慰自己幻妓,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,488評(píng)論 6 392
  • 文/花漫 我一把揭開白布劫拢。 她就那樣靜靜地躺著肉津,像睡著了一般。 火紅的嫁衣襯著肌膚如雪尚镰。 梳的紋絲不亂的頭發(fā)上阀圾,一...
    開封第一講書人閱讀 51,365評(píng)論 1 302
  • 那天,我揣著相機(jī)與錄音狗唉,去河邊找鬼初烘。 笑死,一個(gè)胖子當(dāng)著我的面吹牛分俯,可吹牛的內(nèi)容都是我干的肾筐。 我是一名探鬼主播,決...
    沈念sama閱讀 40,190評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼缸剪,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼吗铐!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起杏节,我...
    開封第一講書人閱讀 39,062評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤唬渗,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后奋渔,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體镊逝,經(jīng)...
    沈念sama閱讀 45,500評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,706評(píng)論 3 335
  • 正文 我和宋清朗相戀三年嫉鲸,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了撑蒜。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,834評(píng)論 1 347
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖座菠,靈堂內(nèi)的尸體忽然破棺而出狸眼,到底是詐尸還是另有隱情,我是刑警寧澤浴滴,帶...
    沈念sama閱讀 35,559評(píng)論 5 345
  • 正文 年R本政府宣布拓萌,位于F島的核電站,受9級(jí)特大地震影響巡莹,放射性物質(zhì)發(fā)生泄漏司志。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,167評(píng)論 3 328
  • 文/蒙蒙 一降宅、第九天 我趴在偏房一處隱蔽的房頂上張望骂远。 院中可真熱鬧,春花似錦腰根、人聲如沸激才。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,779評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)瘸恼。三九已至,卻和暖如春册养,著一層夾襖步出監(jiān)牢的瞬間东帅,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 32,912評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工球拦, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留靠闭,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 47,958評(píng)論 2 370
  • 正文 我出身青樓坎炼,卻偏偏與公主長(zhǎng)得像愧膀,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子谣光,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,779評(píng)論 2 354

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

  • Redmine 安裝記錄 Requirements 本文用到的系統(tǒng)為64位的 Windows, 使用的數(shù)據(jù)庫(kù)為SQ...
    飛多學(xué)堂閱讀 1,794評(píng)論 0 1
  • Awesome Ruby Toolbox Awesome A collection of awesome Ruby...
    debbbbie閱讀 2,867評(píng)論 0 3
  • 1萄金、凡事想別人感激蟀悦,那是必然要失望的⊙醺遥——《故園》 2日戈、一件事無(wú)論太晚或者對(duì)于你來(lái)說(shuō)太早,都不會(huì)阻攔你成為你想成為...
    胡潤(rùn)民原創(chuàng)詩(shī)詞閱讀 524評(píng)論 0 6
  • 我有想法,還沒(méi)有時(shí)間去做的圆,這是我們會(huì)經(jīng)常聽(tīng)到的一句話鼓拧,我想做服裝設(shè)計(jì)師,還沒(méi)有時(shí)間去學(xué)習(xí)越妈;我想學(xué)習(xí)英語(yǔ)季俩,還沒(méi)有時(shí)間...
    豌豆婆婆閱讀 175評(píng)論 0 0
  • 第一次接觸這個(gè)app,感覺(jué)還蠻好的梅掠,不知道好友看不看得到酌住,總歸還是會(huì)比較害羞的。 說(shuō)起來(lái)我也是一個(gè)非常喜歡懷舊的人...
    宋柚晨閱讀 139評(píng)論 1 0