search
HomeOperation and MaintenanceNginxHow to integrate Redmine and SVN into Nginx in Linux system

redmine: It is a web-based project management software developed in ruby. It is a cross-platform project management system developed based on the ror framework. It is a rising star in project management systems. It is said to be derived from the ror version of basecamp. It supports a variety of databases. In addition to roughly the same functions as dotproject, there are many more It has its own unique functions, such as providing wiki, news station, time tracking, feed aggregation, exporting pdf, etc. It can also integrate other version management systems and bug tracking systems, such as svn, cvs, td, etc. The configuration function is powerful and convenient, and custom properties and update notifications are also very practical. We need to follow the official installation documentation and strictly install the corresponding ruby ​​package to deploy the redmine svn project management system

Environment: centos-5.5 redmine-1.2.0 subversion-1.6.17

1. Download the required software packages

  wget ftp://ftp.ruby-lang.org//pub/ruby/1.8/ruby-1.8.7.tar.gz
  wget http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz
  wget http://rubyforge.org/frs/download.php/74944/redmine-1.2.0.tar.gz
  wget http://subversion.tigris.org/downloads/subversion-1.6.17.tar.gz
  wget http://subversion.tigris.org/downloads/subversion-deps-1.6.17.tar.gz

2. Configure the lnmp environment first

Reference: Install mysql5.1.57 php5.2.17 (fastcgi under centos 5.5 ) nginx1.0.1 high-performance web server

3. Redmine installation(The version requirements for each software package are very strict and must correspond to the corresponding version, otherwise unpredictable errors will occur)

1. Ruby installation:

  tar zxvf ruby-1.8.7.tar.gz
  cd ruby-1.8.7
  ./configure --prefix=/usr/local/ruby
  make && make install
  cd ..

Modify ~/.bash_profile and add the ruby ​​directory to the root environment variable
Or

echo "export path=$path:/usr/local/ruby/bin/" >> /etc/profile

2. rubygems installation

Install rubygems, please note that it must be a version below 1.7.0, otherwise redmine cannot be started normally. Just because I read a Chinese document written by someone else and installed version 1.7.0, redmine has been unable to work properly, and I have taken a big detour. Finally, I found the problem in the official documentation. Below are some descriptions of version requirements from the official website.

Copy code The code is as follows:

ruby 1.9 is not supported yet. you have to use ruby ​​1.8.x as stated above.
rubygems 1.3.7 or higher is required with following limitations:
rails 2.3.5 will fail with rubygems 1.5.0 or later, stick to previous versions of rubygems !
rails 2.3.11 will fail with rubygems 1.7.0 or later, stick to previous versions of rubygems !
rake 0.8.7 is required (rake 0.9.x is not supported by rails yet)
rack 1.1.x is required, 1.1.0 has a bug with quotes (#8416). database migration would fail with other version.
mongrel 1.1.5 needs a patch attached to #7688 to work fine with rails 2.3.11. in case of upgrade, another issue may appear for some time after migration (#7857).
i18n 0.4.2 is required for redmine >= 1.0.5

  tar zxvf rubygems-1.6.2.tgz
  cd rubygems-1.6.2
  ruby setup.rb
  cd ..

3. Install rails rack i18n mysql passenger

  gem install rails -v=2.3.11
  gem install rack -v=1.1.1
  gem install i18n -v=0.4.2
  gem install mysql --no-rdoc --no-ri -- --with-mysql-dir=/data/soft/mysql  #我的mysql是编译安装在/data/soft/mysql目录下的
  gem install passenger
  gem install mongrel mongrel_cluster

4. Install and configure redmine

1. Unzip redmine

  tar zxvf redmine-1.2.0.tar.gz
  mv redmine-1.2.0 /data/www/redmine
  chown -r www. /data/www/redmine

2. Create database

  /data/soft/mysql/bin/mysql -uroot -p
  mysql> createdatabase redmine characterset utf8;
  mysql> grantallon redmine.* to 'redmine'@'localhost' identified by 'redmine';
  mysql> flush privileges;

3. Modify redmine mysql Database configuration.

  cd /data/www/redmine/config
  cp database.yml.example database.yml
  vi database.yml
  production:
  adapter: mysql
  database: redmine
  host: localhost
  username: redmine
  password: redmine
  encoding: utf8

Note: There is a space after the colon. . .

4. Create a running database:

Generate session storage key:

  cd /data/www/redmine
  rake generate_session_store

Then start creating the database table structure in the root directory of redmine Run:

  rails_env=production rake db:migrate

Read the default configuration data. When encountering the select language, select zh:

  rails_env=production rake redmine:load_default_data

5, configure mongrel_cluster

  cd /data/www/redmine
  mongrel_rails cluster::configure -e production -p 8000 -a 127.0.0.1 -n 3

6. Enable mongrel_cluster

  cd /data/www/redmine
  mongrel_rails cluster::start

If the startup error is as follows:

Copy the code The code is as follows:

starting port 8000
!! ! path to pid file not valid: tmp/pids/mongrel.8000.pid
mongrel::start reported an error. use mongrel_rails mongrel::start -h to get help.
starting port 8001
! !! path to pid file not valid: tmp/pids/mongrel.8001.pid
mongrel::start reported an error. use mongrel_rails mongrel::start -h to get help.
starting port 8002
!!! path to pid file not valid: tmp/pids/mongrel.8002.pid
mongrel::start reported an error. use mongrel_rails mongrel::start -h to get help.

create/ data/www/redmine/tmp/pids directory

  mkdir -p /data/www/redmine/tmp/pids

Start successfully as follows:

  [root@centos5 redmine]# mongrel_rails cluster::start
  starting port 8000
  starting port 8001
  starting port 8002

7. Configure nginx

Copy code The code is as follows :

vi /data/soft/nginx/conf/nginx.conf
    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测试:

How to integrate Redmine and SVN into Nginx in Linux system

直接用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

How to integrate Redmine and SVN into Nginx in Linux system

六、配置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配置自行修改)
保存即可

How to integrate Redmine and SVN into Nginx in Linux system

The above is the detailed content of How to integrate Redmine and SVN into Nginx in Linux system. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:亿速云. If there is any infringement, please contact admin@php.cn delete
The Advantages of NGINX: Speed, Efficiency, and ControlThe Advantages of NGINX: Speed, Efficiency, and ControlMay 12, 2025 am 12:13 AM

The reason why NGINX is popular is its advantages in speed, efficiency and control. 1) Speed: Adopt asynchronous and non-blocking processing, supports high concurrent connections, and has strong static file service capabilities. 2) Efficiency: Low memory usage and powerful load balancing function. 3) Control: Through flexible configuration file management behavior, modular design facilitates expansion.

NGINX vs. Apache: Community, Support, and ResourcesNGINX vs. Apache: Community, Support, and ResourcesMay 11, 2025 am 12:19 AM

The differences between NGINX and Apache in terms of community, support and resources are as follows: 1. Although the NGINX community is small, it is active and professional, and official support provides advanced features and professional services through NGINXPlus. 2.Apache has a huge and active community, and official support is mainly provided through rich documentation and community resources.

NGINX Unit: An Introduction to the Application ServerNGINX Unit: An Introduction to the Application ServerMay 10, 2025 am 12:17 AM

NGINXUnit is an open source application server that supports a variety of programming languages ​​and frameworks, such as Python, PHP, Java, Go, etc. 1. It supports dynamic configuration and can adjust application configuration without restarting the server. 2.NGINXUnit supports multi-language applications, simplifying the management of multi-language environments. 3. With configuration files, you can easily deploy and manage applications, such as running Python and PHP applications. 4. It also supports advanced configurations such as routing and load balancing to help manage and scale applications.

Using NGINX: Optimizing Website Performance and ReliabilityUsing NGINX: Optimizing Website Performance and ReliabilityMay 09, 2025 am 12:19 AM

NGINX can improve website performance and reliability by: 1. Process static content as a web server; 2. forward requests as a reverse proxy server; 3. allocate requests as a load balancer; 4. Reduce backend pressure as a cache server. NGINX can significantly improve website performance through configuration optimizations such as enabling Gzip compression and adjusting connection pooling.

NGINX's Purpose: Serving Web Content and MoreNGINX's Purpose: Serving Web Content and MoreMay 08, 2025 am 12:07 AM

NGINXserveswebcontentandactsasareverseproxy,loadbalancer,andmore.1)ItefficientlyservesstaticcontentlikeHTMLandimages.2)Itfunctionsasareverseproxyandloadbalancer,distributingtrafficacrossservers.3)NGINXenhancesperformancethroughcaching.4)Itofferssecur

NGINX Unit: Streamlining Application DeploymentNGINX Unit: Streamlining Application DeploymentMay 07, 2025 am 12:08 AM

NGINXUnit simplifies application deployment with dynamic configuration and multilingual support. 1) Dynamic configuration can be modified without restarting the server. 2) Supports multiple programming languages, such as Python, PHP, and Java. 3) Adopt asynchronous non-blocking I/O model to improve high concurrency processing performance.

NGINX's Impact: Web Servers and BeyondNGINX's Impact: Web Servers and BeyondMay 06, 2025 am 12:05 AM

NGINX initially solved the C10K problem and has now developed into an all-rounder who handles load balancing, reverse proxying and API gateways. 1) It is well-known for event-driven and non-blocking architectures and is suitable for high concurrency. 2) NGINX can be used as an HTTP and reverse proxy server, supporting IMAP/POP3. 3) Its working principle is based on event-driven and asynchronous I/O models, improving performance. 4) Basic usage includes configuring virtual hosts and load balancing, and advanced usage involves complex load balancing and caching strategies. 5) Common errors include configuration syntax errors and permission issues, and debugging skills include using nginx-t command and stub_status module. 6) Performance optimization suggestions include adjusting worker parameters, using gzip compression and

Nginx Troubleshooting: Diagnosing and Resolving Common ErrorsNginx Troubleshooting: Diagnosing and Resolving Common ErrorsMay 05, 2025 am 12:09 AM

Diagnosis and solutions for common errors of Nginx include: 1. View log files, 2. Adjust configuration files, 3. Optimize performance. By analyzing logs, adjusting timeout settings and optimizing cache and load balancing, errors such as 404, 502, 504 can be effectively resolved to improve website stability and performance.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools