Centos 7安裝 redmine 3.X

來源:互聯網
上載者:User

標籤:redmine rails

一、配置網卡,能夠訪問互連網(略)

========================================================

二、配置環境

yum -y install patch make gcc gcc-c++ gcc-g77 flex* bison file  

yum -y install libtool libtool-libs libtool-ltdl-devel* autoconf kernel-devel automake libmcrypt*  

yum -y install libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel  

yum -y install freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel  

yum -y install glib2 glib2-devel bzip2 bzip2-devel libevent libevent-devel  

yum -y install ncurses ncurses-devel curl curl-devel e2fsprogs  

yum -y install e2fsprogs-devel krb5 krb5-devel libidn libidn-devel  

yum -y install openssl openssl-devel vim-minimal nano sendmail  

yum -y install fonts-chinese gettext gettext-devel  

yum -y install gmp-devel pspell-devel   

yum -y install readline* libxslt* pcre* net-snmp* gmp* libtidy*  

yum -y install ImageMagick* subversion*

yum -y install wget  

======================================================

三、安裝mysql

wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

rpm -ivh mysql-community-release-el7-5.noarch.rpm

yum install mysql-community-server mysql-community-devel

rpm -qa |grep mysql #檢查安裝

=======================================================

四、安裝rvm

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

source /etc/profile /usr/local/rvm/bin/rvm reload

rvm -v #:未出現版本號碼請重裝

=======================================================

五、安裝ruby

rvm list known  #查看可安裝列表

rvm install ruby-2.1.8  #官方只支援1.9~2.2之間的版本

gem -v #如果未顯示版本,重新安裝ruby  


===========================================================

六、更新gem源

gem source -l 

gem source -r https://rubygems.org/  #:預設的url地址後必須有”/”,否則刪不掉。

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

gem source -l  #:確認只有 https://ruby.taobao.org/

=======================================================

七、安裝gem組件

gem install rails  

gem install rake  

gem install mysql2  

=======================================================

八、配置redmine資料庫檔案

cd /usr/local/redmine/config 

cp database.yml.example database.yml

vi database.yml

production:

adapter: mysql

database:redmine

host: localhost

username: redmineuser

password: redminepw

encoding: utf8

======================================================

九、配置mysql

service mysqld start

mysql -u root -p

Mysql> create database redmine default character set utf8;

grant all on redmine.* to root;

grant all on redmine.* to [email protected];

grant all on redmine.* to redmineuser;

grant all on redmine.* to redmineuser @localhost;

set password for [email protected]=password(‘redminpw‘);

set password for [email protected]=password(‘newpass‘);

flush privileges;  

exit;

=======================================================

十、安裝redmine

cd /usr/local/

svn co http://svn.redmine.org/redmine/branches/3.2-stable/

mv 3.2-stable redmine 

cd redmine 

bundle install

=====================================================

十一、初始化redmine

bundle exec rake generate_secret_token

RAILS_ENV=production bundle exec rake db:migrate

RAILS_ENV=production bundle exec rake redmine:load_default_data #初始化資料選擇zh 

====================================================

十二、

mkdir -p tmp tmp/pdf public/plugin_assets

sudo chmod -R 755 files log tmp public/plugin_assets

===================================================

十三、開啟服務

nohup ruby bin/rails server webrick -e production -b 0.0.0.0 -p 3000 &

bundle exec rails server webrick -e production -d

===================================================

十四、關閉服務

  1. (ps命令查出此進程的pid號,再殺掉,目前好像只能這樣,我看了--help裡面,還沒有停止的參數。)

  2. # ps aux | grep ruby

  3. # kill -9 [PID]


本文出自 “zhangl” 部落格,請務必保留此出處http://214986.blog.51cto.com/204986/1762314

Centos 7安裝 redmine 3.X

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.