当前位置: > CentOS > CentOS教程 >

Centos 7安装 redmine 3.X

时间:2016-04-13 00:49来源:linux.it.net.cn 作者:IT
一、配置网卡,能够访问互联网(略)

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

二、配置环境

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 root@localhost;

grant all on redmine.* to redmineuser;

grant all on redmine.* to redmineuser @localhost;

set password for redmineuser@localhost=password('redminpw');

set password for root@localhost=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

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

十三、开启服务

bundle exec rails server -p80 webrick -e production -d -b 0.0.0.0 #使用所有IP地址的80端口提供服务

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

十四、关闭服务

1. (ps命令查出此进程的pid号,再杀掉,目前好像只能这样,我看了--help里面,还没有停止的参数。)


2. # ps aux | grep ruby


3. # kill -9 [PID]

(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容