Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to integrate Redmine and SVN into Nginx in Linux system

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the relevant knowledge of "how to integrate Redmine and SVN into Nginx in the Linux system". The editor shows you the operation process through an actual case. The method of operation is simple, fast and practical. I hope this article "how to integrate Redmine and SVN into Nginx in the Linux system" can help you solve the problem.

Redmine: is a project management software based on web, developed with ruby. Is a cross-platform project management system developed based on the ror framework, is a rising star of the project management system, is said to come from the ror version of basecamp, supports a variety of databases, in addition to roughly the same functions as dotproject, there are many unique features of their own, such as providing wiki, news stations, time tracking, feed aggregation, export pdf, etc., but also can integrate other version management systems and bug tracking system Such as svn, cvs, td, and so on. Configuration is powerful and convenient, and custom properties and update notifications are also useful. Let's deploy the redmine+svn project management system (we need to install the corresponding ruby package strictly according to the official installation documentation)

Environment: centos-5.5 redmine-1.2.0 subversion-1.6.17

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

Second, configure the lnmp environment first

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

3. Redmine installation (very strict requirements for each package version, must correspond to the corresponding version, otherwise there will be unpredictable errors)

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 to add the ruby directory to the root environment variable

Or

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

2. Rubygems installation

To install rubygems, be sure to be below version 1.7.0, otherwise you will not be able to start using redmine normally. It is because I read a Chinese document written by others and installed version 1.7.0, so redmine has not been able to work properly, so I took a detour. Finally, the problem was found in the official documents. Here are some descriptions of the version requirements on the official website.

The copy 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-vstocks 2.3.11 gem install rack-vails 1.1.1 gem install i18n-vails 0.4.2 gem install mysql--no-rdoc-no-ri-with-mysql-dir=/data/soft/mysql # my mysql is a gem install passenger gem install mongrel mongrel_cluster compiled and installed in the / data/soft/mysql directory

4. Install and configure redmine

1. Decompress redmine

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

2. Set up the 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 the configuration of redmine mysql database.

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 the session storage key:

Cd / data/www/redmine rake generate_session_store

Then start creating the database table structure and run it under the root directory of redmine:

Rails_env=production rake db:migrate

Read the default configuration data, and when you encounter the selected language (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 there is an error in startup as follows:

The copy 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.

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

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

The successful startup is as follows:

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

7. Configure nginx

The copy 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

}

}

Five: visit the redmine test:

You can also start redmine directly with ruby built-in webrick

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

The successful startup is as follows:

[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 d to detach 47] info webrick 1.3.1 [2011-06-2409 usr/local/ruby/bin/ruby 3047] info ruby 1 .8.7 (2008-05-31) [i686-linux] [2011-06-2409 30 pid=3526 port=3000] info webrick::httpserver#start:

Access the redmine test: http://192.168.8.32:3000

Configure the svn server

7. Configure svn in redmine

Enter the config in the redmine directory, and there is a file "configuration.yml.example". Copy the file and rename "configuration.yml", and modify the svn configuration in it.

The copy code is as follows:

Scm_subversion_command: svn

Note: here you need to add the directory where svn is located in the environment variable path

Restart the server and configure scm

Create a new project test, configure version library scm-- > Select subversion

Url-- > enter svn://192.168.8.32/test (modify according to your own svn configuration)

Login name-> test (modified according to your own svn configuration)

Password-- > test (modified according to your own svn configuration)

Just save it.

This is the end of the introduction on "how to integrate Redmine and SVN into Nginx in the Linux system". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report