在Linux系统中将Redmine和SVN整合入Nginx的方法

2019-10-17 20:17:38刘景俊

    upstream mongrel
    {
    server 127.0.0.1:8000;
    server 127.0.0.1:8001;
    server 127.0.0.1:8002;
    }
    server
    {
    listen 80;
    server_name 192.168.8.32;
    root   /data/www/redmine;
    index   index.html index.htm;
    location /
    {
    proxy_pass http://mongrel;
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    }

五: 访问redmine测试:

    http://192.168.8.32

2015629101649771.png (1284×804)

直接用ruby内置webrick也可启动redmine

  /usr/local/ruby/bin/ruby /data/www/redmine/script/server webrick -e production &

启动成功如下:

  [root@CentOS5 redmine]# /usr/local/ruby/bin/ruby /data/www/redmine/script/server webrick -e production &
  [1] 3526
  [root@CentOS5 redmine]# => Booting WEBrick
  => Rails 2.3.11 application starting on http://0.0.0.0:3000
  => Call with -d to detach
  => Ctrl-C to shutdown server
  [2011-06-2409:30:47] INFO WEBrick 1.3.1
  [2011-06-2409:30:47] INFO ruby 1.8.7 (2008-05-31) [i686-linux]
  [2011-06-2409:30:47] INFO WEBrick::HTTPServer#start: pid=3526 port=3000

访问redmine测试: http://192.168.8.32:3000

2015629101740704.png (1365×807)

六、配置SVN服务器
七、在redmine中配置svn
进入Redmine目录下Config,有文件“configuration.yml.example”,复制该文件重命名“configuration.yml”,修改其中的SVN配置

    scm_subversion_command: svn

注意:这里需要在环境变量PATH中添加svn所在的目录
再重启服务器,配置SCM
新建项目test,配置版本库 SCM-->选择Subversion
URL-->填写svn://192.168.8.32/test(根据自己svn配置自行修改)
登录名-->test(根据自己svn配置自行修改)
密码-->test(根据自己svn配置自行修改)
保存即可

2015629101821652.png (1365×807)