GVKun编程网logo

CentOS6.2 安装 Redmine教程(centos6.5mini安装教程)

13

对于想了解CentOS6.2安装Redmine教程的读者,本文将提供新的信息,我们将详细介绍centos6.5mini安装教程,并且为您提供关于3#CentOS6.7x64Apache/PHP/Mar

对于想了解CentOS6.2 安装 Redmine教程的读者,本文将提供新的信息,我们将详细介绍centos6.5mini安装教程,并且为您提供关于3# CentOS 6.7 x64 Apache/PHP/Mariadb环境安装Redmine3.2.1、CentOS 6.5 安装redmine项目管理系统、centos 6.5下安装mysql+nginx+redmine 3.1.0 笔记、centos 6.7下安装redmine+svn+apache的有价值信息。

本文目录一览:

CentOS6.2 安装 Redmine教程(centos6.5mini安装教程)

CentOS6.2 安装 Redmine教程(centos6.5mini安装教程)

折腾了一天,终于把Redmine搭建到服务器上了,本文记录搭建的过程以及过程中遇到的各种问题。

首先需要安装Ruby on rails,网上找了好多安装的说明,这个最好:http://blog.sina.com.cn/s/blog_73d38dbc0100zj7n.html 感谢原作者。

使用该文中的方法成功安装ruby。下面是ruby的安装步骤。

1 删除旧的ruby,yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs

2 wget http://nodejs.org/dist/v0.6.6/node-v0.6.6.tar.gz
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
wget http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz
3 安装一些基本包
yum install openssl-devel zlib-devel gcc gcc-c++ make autoconf readline-devel curl-devel expat-devel gettext-devel
4 安装Node
tar -zxf node-v0.6.6.tar.gz
cd node-v0.6.6
./configure
make
make install
5 安装yaml
tar -zxf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure ?prefix=/usr/local
make
make install
6 安装ruby
tar -zxf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
./configure ?prefix=/usr/local ?enable-shared ?enable-pthread ?disable-install-doc ?with-opt-dir=/usr/local/lib
make
make install
7 安装rails
gem install rails
8
yum install ruby-devel
yum install sqlite-devel
9 安装sqlite3
tar -zxf sqlite-autoconf-3070900.tar.gz
cd sqlite-autoconf-3070900
./configure
make
make install

Ruby安装完以后,就需要参照Redmine官网上的安装步骤一步一步的进行下去,官网上的安装文档在这里:

http://www.redmine.org/projects/redmine/wiki/RedmineInstall

下面我精简一下

1. 获取源码,从下面这个页面可以下载到redmine的发布版,解压缩以后CD到redmine源码的根目录

http://rubyforge.org/frs/?group_id=1850

2. 然后是MysqL的配置(如果使用其他数据库,可参照官网安装说明)

如果没有安装MysqL,可以使用

yum install MysqL

yum install MysqL-server

yum install MysqL-devel

安装,然后启动MysqL服务,然后设置root密码

service MysqLd start

MysqL

SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘secret_password’);

MysqL需要的配置如下(创建一个数据库和用户)

CREATE DATABASE redmine CHaraCTER SET utf8; CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

3. 将config/database.yml.example拷贝为config/database.yml并编辑其中的production部分。ruby1.9+的话使用如下配置:

production: adapter: MysqL2 database: redmine host: localhost username: redmine password: my_password

4. 在redmine根目录下依次执行以下命令:

gem install bundler bundle install --without development test rake generate_secret_token RAILS_ENV=production rake db:migrate RAILS_ENV=production REDmine_LANG=zh rake redmine:load_default_data

需要注意的地方:

在执行第二条命令的时候会有一些错误,我安装的时候碰见两个

一个是MysqL.h missing,这个是因为我没有install MysqL-devel这个包,直接yum install一下即可。

另一个是Can’t install RMagick 2.13.1.需要安装一个库:yum install ImageMagick-devel

最后一条命令中REDmine_LANG=zh是设置语言,我这里设置为中文。

5. 启动

ruby script/rails server webrick -e production

使用该命令启动以后,redmine的访问地址为:http://localhost:30

如果需要其他机器访问,需要将端口3000设为防火墙的例外端口,访问地址是http://IP:3000

超级管理员的用户名密码为:admin/admin


3# CentOS 6.7 x64 Apache/PHP/Mariadb环境安装Redmine3.2.1

3# CentOS 6.7 x64 Apache/PHP/Mariadb环境安装Redmine3.2.1

系统安装按照1# CentOS 6.7 x64 最小化安装

Apache/PHP/MariaDB环境按照2# CentOS 6.7 x64 Apache/PHP/Mariadb环境搭建



创建数据库

[root@centos2~]#MysqL-uroot-pmariadb.2016P<<EOF2>/dev/null
createdatabaseredminedefaultcharactersetutf8;
createuser'redmineuser'@'%'identifiedby'redmine.2016P';
grantallprivilegesonredmine.*to'redmineuser'@'%'identifiedby'redmine.2016P';
flushprivileges;
EOF


下载、安装Ruby2.3/rubygems2.6.3

[root@centos2src]#wgethttps://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz
[root@centos2src]#wgethttp://production.cf.rubygems.org/rubygems/rubygems-2.6.3.tgz
[root@centos2src]#wgethttp://www.redmine.org/releases/redmine-3.2.1.tar.gz
[root@centos2src]#tarzxfruby-2.3.0.tar.gz
[root@centos2ruby-2.3.0]#cdruby-2.3.0
[root@centos2ruby-2.3.0]#./configure--prefix=/usr/local/ruby&&make&&makeinstall
[root@centos2ruby-2.3.0]#echo"exportPATH=/usr/local/ruby/bin:$PATH">/etc/profile.d/ruby.sh
[root@centos2ruby-2.3.0]#source/etc/profile.d/ruby.sh
[root@centos2ruby-2.3.0]#cd..
[root@centos2src]#tarxfrubygems-2.6.3.tgz
[root@centos2src]#cdrubygems-2.6.3
[root@centos2rubygems-2.6.3]#rubysetup.rb


修改gem源

[root@centos2src]#gemsource--removehttps://rubygems.org/
[root@centos2src]#gemsources-ahttps://ruby.taobao.org/


配置Redmine

[root@centos2src]#tarzxfredmine-3.2.1.tar.gz
[root@centos2src]#mvredmine-3.2.1/data/redmine
[root@centos2src]#sed-i"s/source'https:\/\/rubygems.org'/source'https:\/\/ruby.taobao.org'/"/data/redmine/Gemfile
[root@centos2src]#cp/data/redmine/config/configuration.yml.example/data/redmine/config/configuration.yml
[root@centos2src]#cp/data/redmine/public/dispatch.fcgi.example/data/redmine/public/dispatch.fcgi
[root@centos2src]#cp/data/redmine/public/htaccess.fcgi.example/data/redmine/public/htaccess.fcgi
[root@centos2src]#sed-i's/#imagemagick_convert_command:/imagemagick_convert_command:\\/usr\/local\/imagemagick\/bin\/convert/'/data/redmine/config/configuration.yml
[root@centos2src]#sed-i's/attachments_storage_path:/attachments_storage_path\:\/data\/redmine\/files/'/data/redmine/config/configuration.yml
#配置数据库
[root@centos2src]#cat>/data/redmine/config/database.yml<<EOF
production:
adapter:MysqL2
database:redmine
host:localhost
username:redmineuser
password:"redmine.2016P"
encoding:utf8
EOF
[root@centos2src]#chown-Rwww.www/data/redmine
[root@centos2src]#mkdir/data/wwwlogs/redmine
[root@centos2src]#chown-Rwww:www/data/wwwlogs/redmine/
[root@centos2src]#rm-rf/data/redmine/files/delete.me


配置Apache

[root@centos2src]#mv/usr/local/apache/conf/vhost/0.conf{,\.bak}
[root@centos2src]#cat>/usr/local/apache/conf/vhost/redmine.conf<<EOF
<VirtualHost*:80>
ServerNameredmine.test.com
ServerAdminwalter.jia@junlins.com
DocumentRoot/data/redmine/public/
ErrorLog/data/wwwlogs/redmine/error_redmine_apache.log
CustomLog/data/wwwlogs/redmine/access_redmine_apache.logcommon
<Directory/data/redmine/public/>
Options+indexes
Orderallow,deny
Allowfromall
Requireallgranted
</Directory>
</VirtualHost>
EOF


安装gem依赖包

[root@centos2src]#geminstallbundle
[root@centos2src]#geminstallrbpdf-font
[root@centos2src]#geminstallhtmlentities-v=4.3.1
[root@centos2src]#geminstallrmagick--verbose----with-opt-dir=/usr/local/imagemagick--with-opt-include=/usr/local/imagemagick/include--with-opt-lib=/usr/local/imagemagick/lib--ruby=/usr/local/ruby
[root@centos2src]#geminstallMysqL2----with-MysqL-include=/usr/local/mariadb/include/MysqL/--with-MysqL-lib=/usr/local/mariadb/lib/--with-MysqL-dir=/usr/local/mariadb/
[root@centos2src]#geminstallpassenger-v=5.0.28
[root@centos2src]#cat>>/usr/local/apache/conf/httpd.conf<<EOF
LoadModulepassenger_module/usr/local/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.0.28/buildout/apache2/mod_passenger.so
<IfModulemod_passenger.c>
PassengerRoot/usr/local/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.0.28
PassengerDefaultRuby/usr/local/ruby/bin/ruby
</IfModule>
EOF
[root@centos2src]#passenger-install-apache2-module--apxs2-path/usr/local/apache/bin/apxs--apr-config-path/usr/local/apache/bin/apr-1-config
#此处按回车


安装Redmine

[root@centos2redmine]#cd/data/redmine
[root@centos2redmine]#bundleinstall--withoutdevelopmenttestpostgresqlsqlite
[root@centos2redmine]#sed-i"/inodot/{n;s/'inodot'/#'inodot'/;}"/usr/local/ruby/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb
[root@centos2redmine]#mv/data/redmine/lib/tasks/testing.rake{,\.bak}
[root@centos2redmine]#rm-rf/data/redmine/Gemfile.lock
[root@centos2redmine]#geminstallrbpdf-font
[root@centos2redmine]#bundleinstall--withoutdevelopmenttestpostgresqlsqlite
[root@centos2redmine]#bundleexecrakegenerate_secret_token
[root@centos2redmine]#bundleexecrakedb:migrateraILS_ENV=production
[root@centos2redmine]#RAILS_ENV=productionrakeredmine:load_default_data
#此处输入"zh",然后按回车键


重启Apache

[root@centos2redmine]#servicehttpdrestart


访问Redmine

浏览器访问服务器的80端口

CentOS 6.5 安装redmine项目管理系统

CentOS 6.5 安装redmine项目管理系统

前提:先关闭防火墙和selinux

主机操作系统是CentOS 6.5

软件:

rubygems-2.4.1.tgz

ruby-2.2.6.tar.gz

redmine-3.2.0.tar.gz


1. 安装依赖关系

yum install zlib* openssl*ImageMagick-devel gcc -y


2、安装ruby

tar -zxvf ruby-2.2.6.tar.gz

cd ruby-2.2.6

./configure --prefix=/usr/local/ruby

make

make install

验证:

Vim /etc/profile -> exportPATH=/usr/local/ruby/bin:$PATH ->source /etc/profile

[root@localhost ~]# ruby -v

ruby 2.2.6p396 (2016-11-15 revision 56800) [x86_64-linux]

3、安装rubygem

tar -zxvf rubygems-2.4.1.tgz

ruby setup.rb

验证:

[root@localhost ~]# gem -v

2.4.1


4、更换ruby

去除美国的ruby

[root@localhost ~]# gem sources -r https://rubygems.org/

https://rubygems.org/ removed from sources

添加淘宝的ruby

[root@localhost ~]# gem sources -a https://ruby.taobao.org/

https://ruby.taobao.org/ added to sources


5、安装rails 4.2.5 mongrel

[root@localhost ~]# gem install rails -v=4.2.5

[root@localhost ~]# rails -v

Expected string default value for '--rc'; got false (boolean)

Rails 4.2.5

[root@localhost ~]# gem install mongrel -v=1.2.0.pre2


6、安装MysqL MysqL-server MysqL-devel几个包并启动数据库

[root@localhost ~]# yum install MysqL MysqL-server MysqL-devel

[root@localhost ~]# service MysqLd start

7、创建redmine数据库和用户并授权

MysqL> create database redmine character set utf8;

Query OK,1 row affected (0.00 sec)

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

Query OK,0 rows affected (0.01 sec)

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

Query OK,0 rows affected (0.00 sec)

MysqL> flush privileges;

Query OK,0 rows affected (0.00 sec)

MysqL> \q

Bye

8、安装httpd

yum install httpd httpd-devel

9、下载、解压reedmine并配置

wget http://www.redmine.org/releases/redmine-3.2.0.tar.gz


tar -zxvf redmine-3.2.0.tar.gz

mv redmine-3.2.0 /var/www/html/redmine

cd /var/www/html/redmine/config

mv database.yml.example database.yml

vim database.yml


production:

adapter: MysqL2

database: redmine

host: localhost

username: redmine

password: "redmine"

encoding: utf8


10、安装一些依赖包

cd /var/www/html/redmine

vim Gemfile

source http://rubygems.org#删除官方的gem源

source' https://ruby.taobao.org'#使用淘宝的gem源

执行 bundle install 安装依赖包,注意在redmine的主目录文件里执行,其中报错说是不能使用root用户执行该命令,可以不用管

使用bundle show可以查看已经安装了那些包的


11、开始配置会话

注意:该命令只能执行一遍

[root@localhost redmine]# rake generate_secret_token

/usr/local/ruby/lib/ruby/gems/2.2.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: duplicated key at line 466 ignored: "inodot"

vim /usr/local/ruby/lib/ruby/gems/2.2.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb

编辑465行,把该行注释即可

12、导入生成数据

rake db:migrate RAILS_ENV='production'


13、启动redmine,可以看到redmine已经在运行了

[root@localhost redmine]# ruby /usr/local/ruby/bin/rails server webrick -e production

=> Booting WEBrick

=> Rails 4.2.5 application starting in production on http://localhost:3000

=> Run `rails server -h` for more startup options

=> Ctrl-C to shutdown server

[2017-03-17 04:38:06] INFO WEBrick 1.3.1

[2017-03-17 04:38:06] INFO ruby 2.2.6 (2016-11-15) [x86_64-linux]

[2017-03-17 04:38:06] INFO WEBrick::HTTPServer#start: pid=45508 port=3000


14、查看redmine进程监听的端口

[root@localhost ~]# ss -tnlp|grep 3000

LISTEN 0 128 127.0.0.1:3000 *:* users:(("ruby",45508,10))

LISTEN 0 128 ::1:3000 :::* users:(("ruby",9))

15、修改文件系统权限

cd /var/www/html/redmine

mkdir tmp tmp/pdf public/plugin_assets #主要是修改文件夹权限,如果有了可以不创建,只修改权限和属主

chown -R apache:apache /var/www/html/redmine

chown -R apache:apache files/ log/ tmp/ public/plugin_assets/

chmod -R 755 files log tmp public/plugin_assets

16、配置redmine和apache结合


需先安装httpd httpd-devel两个包

gem install passenger

passenger-install-apache2-module

执行该命令并选择了一些选项后,会出现下面的报错!

* Checking for C++ compiler...

Found: no

* Checking for Curl development headers with SSL support...

Found: no

Error: Cannot find the `curl-config` command.

Installation instructions for required software

* To install C++ compiler:

Please install it with yum install gcc-c++

* To install Curl development headers with SSL support:

Please install it with yum install libcurl-devel


上面提示我们需要安装c++,libcurl-devel

yum install gcc-c++ libcurl-devel


Vim /etc/httpd/conf.d/redmine.conf

实际情况可以根据 passenger-install-apache2-module的执行结果修改

LoadModule passenger_module /usr/local/ruby/lib/ruby/gems/2.2.0/gems/passenger-5.1.2/buildout/apache2/mod_passenger.so

<IfModule mod_passenger.c>

PassengerRoot /usr/local/ruby/lib/ruby/gems/2.2.0/gems/passenger-5.1.2

PassengerDefaultRuby /usr/local/ruby/bin/ruby

</IfModule>

Listen 3000

<VirtualHost *:3000>

ServerName www.shamereedwine.com#自己的主机名

# !!! Be sure to point DocumentRoot to 'public'!

DocumentRoot /var/www/html/redmine/public

<Directory /var/www/html/redmine/public >

# This relaxes Apache security settings.

AllowOverride all

# MultiViews must be turned off.

Options -MultiViews

</Directory>

</VirtualHost>

17、启动apache

service httpd start


18、打开主页面http://172.30.63.190:3000/

使用用户名admin和密码admin登入,如下图所示界面:

wKiom1jQ62Xi8T0mAACWNe97DEM941.png-wh_50

19、安装成功!

centos 6.5下安装mysql+nginx+redmine 3.1.0 笔记

centos 6.5下安装mysql+nginx+redmine 3.1.0 笔记

系统:centos 6.5 x64

redmine 版本:3.1.0

ruby 版本: 2.2.3

rails 版本 : 4.2

过程

1、安装RVM

安装公钥

[root@localhost ~]# curl -sSL https://rvm.io/mpapis.asc | gpg --import 
gpg: 已创建目录‘/root/.gnupg’
gpg: 新的配置文件‘/root/.gnupg/gpg.conf’已建立
gpg: 警告:在‘/root/.gnupg/gpg.conf’里的选项于此次运行期间未被使用
gpg: 钥匙环‘/root/.gnupg/secring.gpg’已建立
gpg: 钥匙环‘/root/.gnupg/pubring.gpg’已建立
gpg: /root/.gnupg/trustdb.gpg:建立了信任度数据库
gpg: 密钥 D39DC0E3:公钥“Michal Papis (RVM signing) <mpapis@gmail.com>”已导入
gpg: 合计被处理的数量:1
gpg:           已导入:1  (RSA: 1)

安装rvm

[root@localhost ~]# curl -L https://get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 22721  100 22721    0     0   6915      0  0:00:03  0:00:03 --:--:--  113k
Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz

#省略……

# Administrator,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

载入RVM环境并获取需要的支持安装包

[root@localhost ~]# source /etc/profile.d/rvm.sh
[root@localhost ~]# rvm requirements
Checking requirements for centos.
Installing requirements for centos.
Installing required packages: patch, libyaml-devel, autoconf, patch, readline-devel, libffi-devel, 
automake, libtool, sqlite-devel
..........
Requirements installation successful.

2、利用rvm安装 Ruby 1.9.3 并设为默认

# rvm install 2.2.3
# rvm use 2.2.3 --default

3、安装rails

由于国内网络原因(你懂的),导致rubygems.org存放 Amazon S3上面的资源文件间歇性连接失败。所以你会与遇到gem install rack或bundle install的时候半天没有响应,具体可以用gem install rails -V来查看执行过程。下面替换成淘宝的GEM镜像站:

# gem sources -l
*** CURRENT SOURCES ***
https://rubygems.org/

# gem sources --remove https://rubygems.org/
https://rubygems.org/ 
removed from sources

# gem sources -a https://ruby.taobao.org/
https://ruby.taobao.org/ added to sources

# gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org/


安装rails 4.2

gem install rails -v=4.2

4、安装依赖包

下载redmine3.1.1

 wget http://www.redmine.org/releases/redmine-3.1.1.tar.gz

解压并进入目录

tar -zxvf redmine-3.1.1.tar.gz
cd redmine-3.1.1


安装管理ruby的包依赖的工具bundler

gem install bundler #注意是在网站根目录下执行

安装redmine依赖的所有ruby包

bundle install --without development test rmagick #完成redmine依赖包的安装

如果失败执行下列命令

gem install json -v ''1.8.3''
gem install minitest -v ''5.8.0''
gem install activesupport -v ''4.2.3''
gem install actionview -v ''4.2.3''
gem install actionpack -v ''4.2.3''
gem install activejob -v ''4.2.3''
gem install actionmailer -v ''4.2.3''
gem install actionpack-action_caching -v ''1.1.1''
gem install actionpack-xml_parser -v ''1.0.2''
gem install activemodel -v ''4.2.3''
gem install activerecord -v ''4.2.3''
gem install coderay -v ''1.1.0''
gem install railties -v ''4.2.3''
gem install jquery-rails -v ''3.1.4''
gem install mysql2 -v ''0.3.20''
gem install net-ldap -v ''0.3.1''
gem install protected_attributes -v ''1.1.3''
gem install ruby-openid -v ''2.3.0''
gem install rack-openid -v ''1.4.2''
gem install rails -v ''4.2.3''
gem install rbpdf -v ''1.18.6''
gem install redcarpet -v ''3.1.2''
gem install request_store -v ''1.0.5''

5、为Rails生成cookies秘钥

rake generate_secret_token

6、安装redmine

创建redmine数据库

mysql> create database redmine;

添加mysql用户

GRANT ALL PRIVILEGES ON redmine.* TO ''redmine''@''localhost'' IDENTIFIED BY ''my_password'';

配置Redmine的database.yml

cp config/database.yml.example config/database.yml
cat database.yum #修改对应数据库连接信息
production:  
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "my_password"  
  encoding: utf8

创建数据库结构

RAILS_ENV=production bundle exec rake db:migrate

生成缺省数据

RAILS_ENV=production bundle exec rake redmine:load_default_data

7. 在WEBrick服务上测试Redmine是否安装成功

bundle exec rails server webrick -e production -b 0.0.0.0

地址:http://IP:3000 (注意:打开iptables 3000端口号)
缺省管理员用户:

  • login: admin

  • password: admin


8、配置Redmine在Nginx上运行

按ctrl+c结束webrick服务

安装passenger

gem install passenger
passenger-install-nginx-module

在湖闻樟注:passenger-install-nginx-module可以选择自动下载完整nginx还是自己编译,我在这里是选了下载完整nginx

复制redmine到nginx的html目录

cp ../redmine-3.1.1 /usr/local/nginx/html/redmine

配置nginx.conf,修改server部分的location 为

        location / {
            root   html/redmine/public;
            index  index.html index.htm;
        }

启动nginx

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf


参考:

http://www.redmine.org/projects/redmine/wiki/RedmineInstall

https://blog.linuxeye.com/407.html

centos 6.7下安装redmine+svn+apache

centos 6.7下安装redmine+svn+apache

系统环境

cat/etc/redhat-release

CentOSrelease6.7(Final)

uname-r

2.6.32-573.el6.x86_64

1.替换yum源为163。大家都是高手,这里不做详细的交代了。

把这个文件放到/etc/yum.reop下。

yuminstall-yupdate

关闭和清理防火墙和selinux

2.

mkdir/tools

cd/tools

wgethttps://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

wgethttp://production.cf.rubygems.org/rubygems/rubygems-2.4.5.tgz

Wgethttp://www.redmine.org/releases/redmine-3.1.0.tar.gz

wgethttp://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.6.tar.gz

3.安装环境

yum-yinstalllibyaml-develzlib-develcurl-developenssl-develhttpd-develapr-develapr-util-develgccruby-develgcc-c++makepostgresql-develImageMagick-develsqlite-develperl-LDAPmod_perlperl-Digest-SHA

4.安装apache和MysqL

yuminstallMysqL-community-serverMysqLMysqL-develhttpdhttpd-develMysqL-server-y

rpm-ivhepel-release-latest-6.noarch.rpm

rpm-Uvhhttp://dev.MysqL.com/get/MysqL-community-release-el6-5.noarch.rpm

5.启动MysqL

serviceMysqLdstart

MysqLadmin-uroot-ppasswordP@55w0rd

MysqL-uroot-p

MysqL>createdatabaseredmine;

MysqL>useredmine;

MysqL>source/data/redmine.sql

6.安装ruby

cd/tools

tarxzvfruby-2.1.6.tar.gz

cdruby-2.1.6

./configure--prefix=/usr/local/ruby

make&&makeinstall

cd..

vim/etc/profile

exportPATH=/usr/local/ruby/bin:$PATH再这行加到文档中export那行后面

source/etc/profile

ruby-v

#ruby2.1.6p336(2015-04-13revision50298)[x86_64-linux]

7.安装rails

cd/tools

tarxzvfrubygems-2.4.5.tgz

cdrubygems-2.4.5

rubysetup.rb

gem-v

#2.4.5

whichgem

#/usr/local/ruby/bin/gem

更换gem源为淘宝的源。默认的官方源因为网络问题速度慢

gemsources--removehttps://rubygems.org/

gemsources-ahttps://ruby.taobao.org/

gemsources-l最后只能看到一个淘宝的源

geminstallrails-v=4.2

8.安装redmine3.1

cd/tools

mkdir/home/www

tarxzvfredmine-3.1.0.tar.gz-C/home/www/

cd/home/www

mvredmine-3.1.0/redmine

cdredmine/

geminstallMysqL2

配置redmine文件

cdconfig

cpdatabase.yml.exampledatabase.yml

vimdatabase.yml

production:

adapter:MysqL2

database:redmine

host:localhost

username:root

password:"P@55w0rd"(这里是你登陆redmien数据库的用户名和密码)

encoding:utf8

development:

adapter:MysqL2

database:redmine_development

host:localhost

username:root

password:""

encoding:utf8

9.安装依赖

cd/home/www/redmine

geminstallbundler

bundleinstall--withoutdevelopmenttestrmagick这个命令执行后会报错,是说你有依赖没有安装。按他的提示把需要的依赖全部安装就行了。基本是geminstall开头的那那段。大概有20-30个依赖。耐心装吧。如果你SHELL玩的好,可以写个脚本装。

geminstalljson-v'1.8.3'

geminstallrake-v'10.4.2'

geminstallactivesupport-v'4.2.3'

geminstallactionview-v'4.2.3'

geminstallactionpack-v'4.2.3'

geminstallactionmailer-v'4.2.3'

geminstallactionpack-action_caching-v'1.1.1'

geminstallactionpack-xml_parser-v'1.0.2'

geminstallactivemodel-v'4.2.3'

geminstallactiverecord-v'4.2.3'

geminstallcoderay-v'1.1.0'

geminstallrailties-v'4.2.3'

geminstalljquery-rails-v'3.1.3'

geminstallnet-ldap-v'0.3.1'

geminstallprotected_attributes-v'1.1.3'

geminstallruby-openid-v'2.3.0'

geminstallrack-openid-v'1.4.2'

geminstallrails-v'4.2.3'

geminstallrbpdf-v'1.18.6'

geminstallredcarpet-v'3.1.2'

geminstallrequest_store-v'1.0.5'

geminstallMysqL2-v'0.3.19'

为Rails生成cookies秘钥

rakegenerate_secret_token

调整文件系统权限

cd/home/www/redmine/

mkdir-ptmptmp/pdfpublic/plugin_assets

chown-Rapache.apache/home/www/

chmod-R755/home/www/

初始化数据库

rakedb:migrateraILS_ENV=production

rakeredmine:plugins:migrateraILS_ENV=production

raketmp:cache:clear

raketmp:sessions:clear

测试redmine是否安装成功

ruby/usr/local/ruby/bin/railsserverwebrick-eproduction-d

lsof-itcp:3000检查端口是否开启

10.配置Redmine在Apache上运行

cd/home/www/redmine/public

cpdispatch.fcgi.exampledispatch.fcgi

cphtaccess.fcgi.example.htaccess

chown-Rapache.apache/home/www/redmine/

安装Passenger(用于整合Apache)

geminstallpassenger

passenger-install-apache2-module

11.安装SVN和其他模块。

yuminstall-ysubversion

yum-yinstallelinks

yuminstall-ymod_ssl

yuminstall-ymod_fcgid

yuminstall-ymod_dav_svn

yuminstall-ymod_auth_MysqL

mkdir-p/usr/lib64/perl5/vendor_perl/Apache/

cd/home/www/redmine/extra/svn

cpRedmine.pm/usr/lib64/perl5/vendor_perl/Apache\

修改配置文件,安装完成后。你需要对配置进行修改。由于篇幅问题。这里不多说了。只说几个重要的配置文件。

vim ruby.conf

LoadModule passenger_module /usr/local/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.15/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.15
PassengerDefaultRuby /usr/local/ruby/bin/ruby
</IfModule>

vim redmine.conf

<Location /pm>
RailsEnv production
RailsBaseURI /pm
Options -MultiViews
</Location>

vim subversion.conf


PerlLoadModule Apache::Redmine
<Location /svn>
DAV svn
SVNParentPath "/home/svn"
SVNListParentPath on

Order deny,allow
Deny from all
Allow from (你的服务器IP)这行也可以不要。
Satisfy any
LimitXMLRequestBody 0
SVNPathAuthz off


PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
AuthType Basic
AuthName "Redmine SVN Repository"

Require valid-user
RedmineDSN "DBI:MysqL:database=redmine;host=localhost:3306"
RedmineDbUser "redmine"
RedmineDbPass "redmine"
# cache max. 50 passwords
RedmineCacheCredsMax 50
</Location>

其他配置文件基本可以默认不改

需要在httpd.conf和ssl.conf里面把网站根目录给改下。

cd/home/www/

ln-sredmine/public/pm

chown-Rapache.apache*

chmod755-R*

12.建立SVN版本库

cd/home

mkdirsvn

把要迁移的SVN项目库的文件放到/home/svn目录下。

chown-Rapache.apachesvn

chmod-R755svn

授权数据库远程连接grantallprivilegesonredmine.*toredmine@localhostidentifiedby'redmine';

flushprivileges;

grantallprivilegesonredmine.*toroot@'%'identifiedby'redmine';

MysqL-uroot-p-h172.16.1.10

13.修改svn和redmien结合文件

svnls--config-dir/tmp/subversion_config--config-optionconfig:auth:store-auth-creds=yeshttps://172.16.1.99/svn/omniv4

cd/home/www/redmine/lib/redmine/scm/adapters

cpsubversion_adapter.rbsubversion_adapter.rb_yy20150820

vimsubversion_adapter.rb

str<<"--no-auth-cache--non-interactive--config-dir/tmp/subversion_config"把一替换文件中的

str<<"--no-auth-cache--non-interactive"这一行

注意修改你的主机名和ip地址对应。否则可能会出错。

今天关于CentOS6.2 安装 Redmine教程centos6.5mini安装教程的分享就到这里,希望大家有所收获,若想了解更多关于3# CentOS 6.7 x64 Apache/PHP/Mariadb环境安装Redmine3.2.1、CentOS 6.5 安装redmine项目管理系统、centos 6.5下安装mysql+nginx+redmine 3.1.0 笔记、centos 6.7下安装redmine+svn+apache等相关知识,可以在本站进行查询。

本文标签: