CentOS5.4安装redmine详细步骤

http://blog.csdn.net/leekwen/article/details/8516832

<<<<输出日志的配置>>>>

在页面访问的时候,终端窗口上可能会跳出如下的日志信息:

Started GET "/login" for 192.168.160.20 at Fri Jan 18 01:15:34 -0800 2013
Processing by AccountController#login as HTML
  Current user: anonymous
  Rendered account/login.html.erb within layouts/base (7.7ms)
Completed 200 OK in 39ms (Views: 33.7ms | ActiveRecord: 2.3ms)
Started POST "/login" for 192.168.160.20 at Fri Jan 18 01:15:38 -0800 2013
Processing by AccountController#login as HTML
  Parameters: {"login"=>"登录 »", "back_url"=>"http://192.168.160.11:3000/", "password"=>"[FILTERED]", "username"=>"admin", "utf8"=>"✓", "authenticity_token"=>"NtV3Vej/A7dD6Cn1GFC0oyLNhEvPTOebueDeqlmGKAU="}
  Current user: anonymous
Successful authentication for 'admin' from 192.168.160.20 at Fri Jan 18 09:15:38 UTC 2013
Redirected to http://192.168.160.11:3000/
Completed 302 Found in 113ms (ActiveRecord: 99.8ms)
Started GET "/" for 192.168.160.20 at Fri Jan 18 01:15:38 -0800 2013
Processing by WelcomeController#index as HTML
  Current user: admin (id=1)
  Rendered welcome/index.html.erb within layouts/base (32.8ms)
Completed 200 OK in 100ms (Views: 50.2ms | ActiveRecord: 41.6ms)
Started GET "/admin" for 192.168.160.20 at Fri Jan 18 01:15:43 -0800 2013
Processing by AdminController#index as HTML
  Current user: admin (id=1)
  Rendered admin/_menu.html.erb (124.9ms)
  Rendered admin/index.html.erb within layouts/admin (134.9ms)
  Rendered layouts/base.html.erb (13.6ms)
Completed 200 OK in 168ms (Views: 159.9ms | ActiveRecord: 2.5ms)

这个是因为redmine中的日志选项未做了配置:

[root@localhost ~]# cd /usr/local/redmine-2.1.6/
[root@localhost redmine-2.1.6]# cp config/additional_environment.rb.example config/additional_environment.rb
[root@localhost redmine-2.1.6]# vi config/additional_environment.rb
[root@localhost redmine-2.1.6]# touch log/debug.logs
[root@localhost redmine-2.1.6]# ls -l log/debug.logs
-rw-r--r-- 1 root root 0 Jan 18 02:03 log/debug.logs
[root@localhost redmine-2.1.6]# chown -R redmine:redmine log/
[root@localhost redmine-2.1.6]# chmod -R 755 log/
[root@localhost redmine-2.1.6]# cat config/additional_environment.rb
# Copy this file to additional_environment.rb and add any statements
# that need to be passed to the Rails::Initializer.  `config` is
# available in this context.
#
# Example:
#
#   config.log_level = :debug
#   ...
# !!!请确信目录中保存的日志文件是存在的!!!

config.logger = Logger.new("/usr/local/redmine-2.1.6/log/debug.log", 2, 1000000)
config.logger.level = Logger::INFO

<<<<以服务的形式启动redmine>>>>

可以修改/etc/rc.local文件,将redmine以服务启动的脚本加入其中:

[root@localhost redmine-2.1.6]# vi /etc/rc.local

[root@localhost redmine-2.1.6]#cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
# add those line for redmine demon
/usr/local/redmine-2.1.6/script/rails server webrick -e production -d
# add end

如果要重启redmine请直接进行关闭,然后再运行一下/etc/rc.local文件即可,具体操作如下:

[root@localhost redmine-2.1.6]# killall -9 ruby
[root@localhost redmine-2.1.6]# . /etc/rc.local
=> Booting WEBrick
=> Rails 3.2.11 application starting in production on http://0.0.0.0:3000
[root@localhost redmine-2.1.6]# netstat -tln |grep :3000
tcp        0      0 0.0.0.0:3000                0.0.0.0:*                   LISTEN
[root@localhost redmine-2.1.6]# ps -aux |grep ruby
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root  557  0.0 12.6  71880 65156 ?    S    19:01  0:00 ruby /usr/local/redmine-2.1.6/script/rails server webrick -e production -d
root  584  0.0  0.1   3916 668 pts/2  S+   19:01   0:00 grep ruby

<<<<提升redmine的访问速度>>>>

这个有两种方式:一种是安装mongrel(局域网速度会提升),一种是将redmine与httpd服务整合在一起。

第一种mongrel安装相对简单:

注:必须进入redmine的安装目录下运行

[root@localhost redmine-2.1.6]# gem install mongrel

Building native extensions.  This could take a while...
Successfully installed mongrel-1.1.5
1 gem installed
Installing ri documentation for mongrel-1.1.5...
Installing RDoc documentation for mongrel-1.1.5...
[root@localhost redmine-2.1.6]# killall -9 ruby

[root@localhost redmine-2.1.6]# . /etc/rc.local
=> Booting WEBrick
=> Rails 3.2.11 application starting in production on http://0.0.0.0:3000

第二种方式是利用apache来运行redmine:

这个配置相对于第一种方式来说是要复杂一点。

具体操作如下:

[root@localhost ~]# cd /usr/local/redmine-2.1.6/

[root@localhost redmine-2.1.6]# gem install passenger
Fetching: fastthread-1.0.7.gem (100%)
Building native extensions.  This could take a while...
Fetching: daemon_controller-1.1.1.gem (100%)
Fetching: passenger-3.0.19.gem (100%)
Successfully installed fastthread-1.0.7
Successfully installed daemon_controller-1.1.1
Successfully installed passenger-3.0.19
3 gems installed
Installing ri documentation for fastthread-1.0.7...
Installing ri documentation for daemon_controller-1.1.1...
Installing ri documentation for passenger-3.0.19...
Installing RDoc documentation for fastthread-1.0.7...
Installing RDoc documentation for daemon_controller-1.1.1...
Installing RDoc documentation for passenger-3.0.19...
[root@localhost redmine-2.1.6]# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v3.0.19.
This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.
Here's what you can expect from the installation process:
 1. The Apache 2 module will be installed for you.
 2. You'll learn how to configure Apache.
 3. You'll learn how to deploy a Ruby on Rails application.
Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.
Press Enter to continue, or Ctrl-C to abort.
--------------------------------------------
Checking for required software...
 * GNU C++ compiler... found at/usr/bin/g++
 * Curl development headers with SSL support...found
 * OpenSSL development headers... found
 * Zlib development headers... found
 * Ruby development headers... found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... found at /usr/bin/rake
 * rack... found
 * Apache 2... found at /usr/sbin/httpd
 * Apache 2 development headers... found at /usr/sbin/apxs
 * Apache Portable Runtime (APR) development headers...found at /usr/bin/apr-1-config
 * Apache Portable Runtime Utility (APU) development headers...found at /usr/bin/apu-1-config
--------------------------------------------
Compiling and installing Apache 2 module...

cd /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19
/usr/bin/ruby /usr/bin/rake apache2:clean apache2 RELEASE=yes
# /usr/bin/ruby /usr/bin/rake apache2:clean apache2 RELEASE=yes
rm -rf ext/common/libboost_oxt.a ext/common/libboost_oxt

-------------中间省略------------------------
--------------------------------------------
The Apache 2 module was successfully installed.

Please edit your Apache configuration file, and add these lines:

   LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19
   PassengerRuby /usr/bin/ruby

After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!

Press ENTER to continue.
--------------------------------------------
Deploying a Ruby on Rails application: an example

Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:

   <VirtualHost *:80>
      ServerName www.yourhost.com
      # !!! Be sure to point DocumentRoot to 'public'!
      DocumentRoot /somewhere/public
      <Directory /somewhere/public>
         # This relaxes Apache security settings.
         AllowOverride all
         # MultiViews must be turned off.
         Options -MultiViews
      </Directory>
   </VirtualHost>

And that's it! You may also want to check the Users Guide for security and
optimization tips, troubleshooting and other useful information:

  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/doc/Users guide Apache.html

Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
https://www.phusionpassenger.com
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
[root@localhost redmine-2.1.6]# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.old
[root@localhost redmine-2.1.6]# vi /etc/httpd/conf/httpd.conf
[root@localhost redmine-2.1.6]# tail -n 21 /etc/httpd/conf/httpd.conf
# Redmine Configure Start
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
    PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19
    PassengerRuby /usr/bin/ruby
    PassengerUser apache
<VirtualHost *:80>
    ServerName www.localhost.com
# !!! Be sure to point DocumentRoot to 'public'!
    DocumentRoot /var/www/html/
    ErrorLog logs/redmine_error_log
    AddHandler cgi-script .cgi
    <Directory "/var/www/html/">
      Options Indexes -MultiViews FollowSymLinks ExecCGI
      Order allow,deny
      Allow from all
      AllowOverride all
      RailsEnv production
      RailsBaseURI /redmine
    </Directory>
</VirtualHost>
# Redmine Configure End
[root@localhost redmine-2.1.6]# ln -s /usr/local/redmine-2.1.6/public/ /var/www/html/redmine
[root@localhost redmine-2.1.6]# chown -R apache:apache /usr/local/redmine-2.1.6
[root@localhost redmine-2.1.6]# chown -R apache:apache /var/www/html/redmine

[root@localhost redmine-2.1.6]#touch /etc/httpd/logs/redmine_error_log
[root@localhost redmine-2.1.6]# chown -R apache:apache /etc/httpd/logs/
[root@localhost redmine-2.1.6]# service httpd start
Starting httpd:                                            [  OK  ]

查看是否有80端口,以确定httpd是否成功启动:

[root@localhost redmine-2.1.6]# netstat -tln 
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:641                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
tcp        0      0 :::22                       :::*                        LISTEN
查看httpd启动时,是否有错误日志:

[root@localhost redmine-2.1.6]#cat /etc/httpd/logs/error_log
[Tue Jan 22 01:16:36 2013] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Tue Jan 22 01:16:36 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jan 22 01:16:36 2013] [error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog (/usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/agents/PassengerWatchdog): Permission denied (13)
[Tue Jan 22 01:16:36 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Jan 22 01:16:36 2013] [notice] Digest: done
[Tue Jan 22 01:16:36 2013] [error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog (/usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/agents/PassengerWatchdog): Permission denied (13)
[Tue Jan 22 01:16:36 2013] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
查看SELinux是否关闭:

[root@localhost redmine-2.1.6]#getenforce
Enforcing
[root@localhost redmine-2.1.6]# echo "/usr/sbin/setenforce 0" >> /etc/rc.local
[root@localhost redmine-2.1.6]# source /etc/rc.local
[root@localhost redmine-2.1.6]# getenforce
Permissive
[root@localhost redmine-2.1.6]# service httpd restart

Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

[root@localhost redmine-2.1.6]# netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:641                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
tcp        0      0 :::80                       :::*                        LISTEN
tcp        0      0 :::22                       :::*                        LISTEN

然后就可以对 http://IP_ADDR/redmine 对redmine进行配置了。

<<<<上传附件大小配置>>>>

这个可采用两种方式,一种是直接进入页面修改,另一种是可以直接编辑配置文件:

[root@localhost redmine-2.1.6]# vi config/settings.yml

<<<<上传附件的位置、SCM及邮件的配置>>>>

这个可采用两种方式,一种是直接进入页面修改,另一种是可以直接编辑配置文件:

[root@localhost redmine-2.1.6]# vi config/configuration.yml

<<<<默认及用户语言设置>>>>

登录时用户名和密码都为admin,进入之后可以对其进行设置。

默认语言为english, 在settings->display->Default language 里修改成“简体中文”就可以了。

对不同用户可以选择使用不同的显示语言,如果要修改自己的显示语言的话,只需要在个人账户里修改就可以了。

user-->general-->language修改即可。

<<<<插件的安装>>>>

这里我只说明一下,插件可以直接从 此地址下载http://www.redmine.org/plugins

对应版本的插件,然后放到redmine安装目录下的plugins本目录后,按照插件的说明安装即可。

关于redmine更高级的配置,请直接google或参见redmine官方HowTo文档。

CentOS安装redmine 2后的简单配置的更多相关文章

  1. Centos 6.5下一个SNMP简单配置(snmp protocol v3,监控宝)

    Centos 6.5下一个SNMP简单配置(snmp protocol v3.监控宝) jom_ch@2014/7/25 1,安装 >yum -y install net-snmp net-sn ...

  2. CentOS 7.0 使用 yum 安装 MariaDB 与 MariaDB 的简单配置

    1.安装MariaDB 安装命令 yum -y install mariadb mariadb-server 安装完成MariaDB,首先启动MariaDB,两条命令都可以 systemctl sta ...

  3. CentOS 7 使用 yum 安装 MariaDB 与 MariaDB 的简单配置

    闲置已久的空间环境配置忘得差不多了,今天得空整理,重置了磁盘重新搭建环境,首先安装MariaDB的数据库,在这里记录下安装过程,以便以后查看. 1.安装MariaDB 安装命令 yum -y inst ...

  4. centos 安装memcache服务后memcahce本机连接Permission

    自己手动在虚拟机下装了下memcache,整个过程真是充满波折,本身用php5.3安装memcache扩展就麻烦很多,无法通过yum直接安装,安装方法详见http://chenwei.me/blog/ ...

  5. [System] CentOS虚拟机系统克隆后的网络配置

    VMware Workstation 虚拟机在进行克隆 CentOS 系统之后,在克隆机上配置网卡时,会出现一些细节问题,讨论一二. 一.情景描述 克隆机上默认由 NetworkManager 服务管 ...

  6. 安装Office 2010后出现正在配置

    OFFICE 2010 MSDN版出来后,下载安装 ,启动后发现每次打开都会出现“正在配置”的进度,删除重装亦不成功,对SETUP.EXE改名也不行,最后找到这个方法,成功,备忘: 运行以下内容: r ...

  7. oracleLinux7上安装oracle11g r2(脚本简单配置环境)

    一 环境脚本简单配置 #!/bin/bashmv /etc/yum.repos.d/* /tmpmv iso.repo /etc/yum.repos.d/tar zxvf a.tar.gzmv 7Se ...

  8. 安装完SAP后BASIS的配置流程

    安装完SAP后BASIS配置流程 安装完SAP后,配置流程. 1.升级kernel. 2.TCD SLICENSE: License Administration install > Syste ...

  9. 使用 yum 安装 MariaDB 与 MariaDB 的简单配置

    1.安装MariaDB 安装命令 yum -y install mariadb mariadb-server 安装完成MariaDB,首先启动MariaDB,两条命令都可以 systemctl sta ...

随机推荐

  1. HDUOJ -----Color the ball

    Color the ball Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)To ...

  2. 【LeetCode】153. Find Minimum in Rotated Sorted Array (3 solutions)

    Find Minimum in Rotated Sorted Array Suppose a sorted array is rotated at some pivot unknown to you ...

  3. 安卓学习笔记:使用PopupWindow创建简单菜单

    PopupWindow是一个弹出式窗口,它可以展示任意View.他会浮在当前窗口的上方展示. 下面看代码: public class MyActivity extends Activity { pri ...

  4. 解决spring el表达式不起作用

    el表达式不起作用,如下图所示 现象: 在显示页面中加入: <%@ page isELIgnored="false" %>就OK了 参考:http://bbs.csdn ...

  5. 西邮Linux兴趣小组纳新笔试试题

    下面是西邮Linux小组今年纳新的笔试试题 1. 下面这个程序的输出结果是什么? int main() { int a = (1, 2); printf(“a = %d\n”, a); return ...

  6. System V 共享内存区

    1.概述 系统调用mmap通过映射一个普通文件实现共享内存.System V 则是通过映射特殊文件系统shm中的文件实现进程间的共享内存通信.也就是说,每个共享内存区域对应特殊文件系统shm中的一个文 ...

  7. Shell习题100例

    每日一文件 https://github.com/aminglinux/shell100/blob/master/ 要求:安照这样的日期格式(xxxx-xx-xx)每日生成一个文件,如生成的文件为20 ...

  8. 定制WinEdt 优化Latex输入

    定制WinEdt 优化Latex输入 ---原文转载地址:http://www.mamicode.com/info-detail-342716.html ---推荐winedt功能定制使用-说明文档: ...

  9. 自适应滤波:维纳滤波器——FIR及IIR设计

    作者:桂. 时间:2017-03-23  06:28:45 链接:http://www.cnblogs.com/xingshansi/p/6603263.html [读书笔记02] 前言 仍然是西蒙. ...

  10. About - CONNECT_BY_FILTERING

    再次碰到一个诡异的事情,同样的SQL在两个类似数据库中执行时间相差非常之多.直观反应就是执行计划不一样,果不其然. 在跑得很快的环境中的执行计划, 但是在另外一个环境中的执行计划却是, 从执行计划中可 ...