redmine3.3.1安裝與常用插件安裝

redmine安裝


環境:CentOS6.7

軟件:

mysql5.X

redmine3.3.1

ruby2.3.1

rubygem2.6.8

nginx1.9.15


安裝依賴包:


yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel \

libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel \

curl-devel openssl-devel pcre-devel mysql-devel ImageMagick-devel ImageMagick gcc-c++ gcc c


ruby安裝:

先檢查系統是否有安裝到ruby,如果有卸載

rpm -qa |grep ruby


cd /usr/local/src && wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-2.3.1.tar.gz


tar -zxvf ruby-2.3.1.tar.gz


cd ruby-2.3.1

./configure

make && make install



ruby版本檢查

ruby -v




安裝gem:

cd /usr/local/src && wget https://rubygems.org/rubygems/rubygems-2.6.8.tgz


tar -zxvf rubygems-2.6.8.tgz

cd rubygems-2.6.8

/usr/local/bin/ruby setup.rb


檢查gem是否安裝成功

gem -v



壯哉某朝局域網:

gem sources --remove https://rubygems.org/

gem sources -a https://ruby.taobao.org/

gem sources -l #顯示如下

*** CURRENT SOURCES ***


https://ruby.taobao.org/



接下來繼續安裝需要的包


gem install bundler

gem install rmagick

gem install rails

gem install mysql2



redmine安裝:

mkdir -p /data/www 

cd /usr/local/src && wget http://www.redmine.org/releases/redmine-3.3.1.tar.gz

tar -zxvf redmine-3.3.1.tar.gz

mv redmine-3.3.1 /data/www/redmine

cd /data/www/redmine

bundler install




安裝mysql

useradd -M -s /sbin/nologin mysql



mkdir -p /data/mysql

chown -R mysql /data/mysql

#設置權限

./scripts/mysql_install_db --user=mysql --datadir=/data/mysql

#初始化

echo $?

#查看上一步是否成功,也可以看初始化前面是否出現兩個OK


cp support-files/my-default.cnf /etc/my.cnf

#覆蓋原來系統安裝的mysql日誌文件,5.6以上的版本沒有my-larget.cnf


cp support-files/mysql.server /etc/init.d/mysqld

#加入系統啓動服務列表,然後編輯文件裏面的兩行,如下:

chmod 755 !$


basedir=/usr/local/mysql

datadir=/data/mysql


加入系統啓動列表,啓動

chkconfig --add mysqld

chkconfig mysqld on #這步一般忽略,加入後會默認自動


# mysql

> create database redmine character set utf8;

> create user 'redmine'@'localhost' identified by 'redmine';

> grant all privileges on redmine.* to 'redmine'@'localhost';

> FLUSH PRIVILEGES;



修改數據庫配置:

cd /data/www/redmine/config

cp database.yml.example database.yml

vim database.yml


配置如下:

production:

  adapter: mysql2

  database: redmine

  host: localhost

  username: redmine

  password: "redmine"

  encoding: utf8



生成配置信息,下面幾個操作


生成session的加密token

生成數據表

導入初始化數據

cd /data/www/redmine/config

RAILS_ENV=production bundle exec rake generate_secret_token    

RAILS_ENV=production bundle exec rake db:migrate

RAILS_ENV=production bundle exec rake redmine:load_default_data



啓動redmine

cd /data/www/redmine/

nohup bundle exec rails server webrick -p3000 -b 0.0.0.0 -e production >/dev/null 2>&1 &





一、插件安裝:安裝插件前記得先停掉redmine服務


redmine_webhook安裝:

cd /data/www/redmine/plugins

git clone https://github.com/suer/redmine_webhook.git

rake redmine:plugins:migrate RAILS_ENV=production


++++++++++++++++++++++++++++++++++++++


[root@gl plugins]# rake redmine:plugins:migrate RAILS_ENV=production

(in /data/www/redmine)

/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466

Migrating redmine_checklists (Redmine Checklists plugin (Light version))...

Migrating redmine_webhook (Redmine Webhook plugin)...

== 1 CreateWebhooks: migrating ================================================

-- create_table(:webhooks)

   -> 0.0400s

== 1 CreateWebhooks: migrated (0.0405s) =======================================


+++++++++++++++++++++++++++++++++++++++++



二、安裝redmine_lightbox2:

git clone https://github.com/paginagmbh/redmine_lightbox2.git

rake redmine:plugins:migrate RAILS_ENV=production



++++++++++++++++++++++++++++++++++++++++++++

[root@gl plugins]# rake redmine:plugins:migrate RAILS_ENV=production

(in /data/www/redmine)

/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466

Migrating redmine_checklists (Redmine Checklists plugin (Light version))...

Migrating redmine_lightbox2 (Redmine Lightbox 2)...

Migrating redmine_webhook (Redmine Webhook plugin)...


++++++++++++++++++++++++++++++++++++++++++++



三、安裝issue_charts:

git clone https://github.com/masweetman/issue_charts.git

bundle install

rake redmine:plugins:migrate RAILS_ENV=production



++++++++++++++++++++++++++++++++++++++++++++++++

[root@gl plugins]# rake redmine:plugins:migrate RAILS_ENV=production

(in /data/www/redmine)

/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466

Migrating issue_charts (Issue Charts plugin)...

== 1 CreateCharts: migrating ==================================================

-- create_table(:charts)

   -> 0.0573s

== 1 CreateCharts: migrated (0.0574s) =========================================


== 2 AddUserIdToCharts: migrating =============================================

-- add_column(:charts, :user_id, :integer)

   -> 0.0833s

== 2 AddUserIdToCharts: migrated (0.0835s) ====================================


== 3 AddPublicToCharts: migrating =============================================

-- add_column(:charts, :public, :boolean, {:default=>false})

   -> 0.0839s

== 3 AddPublicToCharts: migrated (0.0850s) ====================================


== 4 AddColumnsToCharts: migrating ============================================

-- add_column(:charts, :range_integer, :integer, {:default=>30})

   -> 0.0632s

-- add_column(:charts, :range_type, :string, {:default=>"days"})

   -> 0.0563s

== 4 AddColumnsToCharts: migrated (0.1202s) ===================================


== 5 AddTimeToCharts: migrating ===============================================

-- add_column(:charts, :time, :string, {:default=>""})

   -> 0.0664s

== 5 AddTimeToCharts: migrated (0.0674s) ======================================


== 6 AddIssueStatusToCharts: migrating ========================================

-- add_column(:charts, :issue_status, :string, {:default=>"o"})

   -> 0.0619s

== 6 AddIssueStatusToCharts: migrated (0.0623s) ===============================


== 7 RenameColumns: migrating =================================================

-- rename_column(:charts, :public, :is_public)

   -> 0.0306s

== 7 RenameColumns: migrated (0.0308s) ========================================


Migrating redmine_checklists (Redmine Checklists plugin (Light version))...

Migrating redmine_lightbox2 (Redmine Lightbox 2)...

Migrating redmine_webhook (Redmine Webhook plugin)...

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




四、安裝redmine_advanced_roadmap_v2:

git clone https://github.com/Coren/redmine_advanced_roadmap_v2.git

mv redmine_advanced_roadmap_v2 advanced_roadmap_v2

RAILS_ENV=production bundle exec rake redmine:plugins:migrate

gem install rmagick


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[root@gl plugins]# RAILS_ENV=production bundle exec rake redmine:plugins:migrate

(in /data/www/redmine)

/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466

Migrating advanced_roadmap_v2 (Advanced roadmap & milestones plugin)...

== 1 CreateMilestones: migrating ==============================================

-- create_table(:milestones, {:force=>true})

   -> 0.0550s

-- add_index(:milestones, [:user_id], {:name=>"fk_milestones_user"})

   -> 0.0489s

-- add_index(:milestones, [:project_id], {:name=>"fk_milestones_project"})

   -> 0.0412s

== 1 CreateMilestones: migrated (0.1459s) =====================================


== 2 CreateMilestoneVersions: migrating =======================================

-- create_table(:milestone_versions, {:force=>true})

   -> 0.0332s

-- add_index(:milestone_versions, [:milestone_id], {:name=>"fk_milestone_versions_milestone"})

   -> 0.0503s

-- add_index(:milestone_versions, [:version_id], {:name=>"fk_milestone_versions_version"})

   -> 0.0405s

== 2 CreateMilestoneVersions: migrated (0.1245s) ==============================


== 3 PresetPermissions: migrating =============================================

== 3 PresetPermissions: migrated (0.0521s) ====================================


Migrating easy_gantt (Easy Gantt plugin)...

Migrating issue_charts (Issue Charts plugin)...

Migrating redmine_checklists (Redmine Checklists plugin (Light version))...

Migrating redmine_lightbox2 (Redmine Lightbox 2)...

Migrating redmine_webhook (Redmine Webhook plugin)...

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



卸載:

RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=advanced_roadmap_v2 VERSION=0




五、安裝甘特圖:


$ bundle install

  (or bundle update)

  $ bundle exec rake db:migrate RAILS_ENV=production

  $ bundle exec rake redmine:plugins:migrate RAILS_ENV=production

- Restart server


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


[root@gl plugins]# bundle exec rake db:migrate RAILS_ENV=production

(in /data/www/redmine)

/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466

== 20150705172511 CreateEasySettings: migrating ===============================

-- table_exists?(:easy_settings)

   -> 0.0152s

-- create_table(:easy_settings)

   -> 0.1918s

-- index_exists?(:easy_settings, [:name, :project_id], {:unique=>true})

   -> 0.0276s

-- add_index(:easy_settings, [:name, :project_id], {:unique=>true})

   -> 0.0465s

== 20150705172511 CreateEasySettings: migrated (0.2844s) ======================


== 20160519161300 CreateEntityAssignments: migrating ==========================

-- table_exists?(:easy_entity_assignments)

   -> 0.0043s

-- create_table(:easy_entity_assignments)

   -> 0.0333s

-- add_index(:easy_entity_assignments, [:entity_from_type, :entity_from_id, :entity_to_type, :entity_to_id], {:name=>"entity_assignment_idx", :unique=>true})

   -> 0.0431s

-- add_index(:easy_entity_assignments, :entity_from_id, {:name=>"entity_assignment_idx_from"})

   -> 0.0416s

-- add_index(:easy_entity_assignments, :entity_to_id, {:name=>"entity_assignment_idx_to"})

   -> 0.0441s

== 20160519161300 CreateEntityAssignments: migrated (0.1682s) =================


[root@gl plugins]# !ec

echo $?

0

[root@gl plugins]# bundle exec rake redmine:plugins:migrate RAILS_ENV=production

(in /data/www/redmine)

/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466

Migrating easy_gantt (Easy Gantt plugin)...

Migrating issue_charts (Issue Charts plugin)...

Migrating redmine_checklists (Redmine Checklists plugin (Light version))...

Migrating redmine_lightbox2 (Redmine Lightbox 2)...

Migrating redmine_webhook (Redmine Webhook plugin)...


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




插件卸載:

bundle exec rake redmine:plugins:migrate NAME=插件名稱 VERSION=0 RAILS_ENV=production




六、安裝projects_show:

git clone https://github.com/speedy32129/projects_show.git


完整完成直接重啓即可。


七、安裝redmine_issues_tree:

git clone https://github.com/Loriowar/redmine_issues_tree.git


克隆完成直接bundle install/bundle update即可





插件地址:

https://github.com/suer/redmine_webhook

https://github.com/paginagmbh/redmine_lightbox2

https://github.com/Loriowar/redmine_issues_tree

https://www.redminecrm.com/

https://github.com/speedy32129/projects_show

https://github.com/masweetman/issue_charts

https://github.com/Coren/redmine_advanced_roadmap_v2



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章