The way to integrate Redmine and SVN into Nginx in a Linux system _nginx

Source: Internet
Author: User
Tags i18n svn redmine

Redmine: is a web-based project management software developed in Ruby. is based on the ROR framework development of a Cross-platform project management system, is the project management system of the Up-and-coming, is said to originate from the Ror version of Basecamp, supporting a variety of databases, in addition to and Dotproject functions roughly equivalent, there are many of their own unique functions, such as providing wikis, News stations, time tracking, feed aggregation, export PDFs, and so on, can also integrate other version management systems and bug tracking systems, such as SVN, CVS, TD, and so on. The configuration is powerful and convenient, and custom attributes and update notifications are also useful. Below we will deploy the REDMINE+SVN project management system (requires strict installation of the corresponding Ruby package according to the official installation documentation)

Environment: centos-5.5 redmine-1.2.0 subversion-1.6.17

A, download the required software package

  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, the first configuration LNMP environment

Reference: CentOS 5.5 install mysql5.1.57+php5.2.17 (FastCGI) +nginx1.0.1 high-performance Web server

third, 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 the ~/.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

Install RubyGems, note must be under 1.7.0 version, otherwise can not start to use redmine normally. I just saw someone else write a Chinese document, installed 1.7.0 version, so Redmine has been unable to work properly, for this took a big circle detour. Finally, the problem is found in the official document. The following is a description of the version requirements on the official website.

Copy Code code as follows:
Ruby 1.9 is not supported yet. You are 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 'll fail with RubyGems 1.5.0 or later, stick to previous versions of RubyGems!
Rails 2.3.11 'll fail with RubyGems 1.7.0 or later, stick to previous versions of RubyGems!
Rake 0.8.7 is required (rake 0.9.x isn't supported by Rails yet)
Rack 1.1.x is required, 1.1.0 has a bug with quotes (#8416). The Database migration would fail with the other version.
Mongrel 1.1.5 needs a patch attached to #7688 to work fine with Rails 2.3.11. In the case of upgrade, another issue could appear for some/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--
  gem install passenger
  No-ri----with-mysql-dir=/data/soft/mysql #我的mysql是编译安装在/data/soft/mysql Directory Gem Install mongrel Mongrel_cluster

Iv. Installation and Configuration Redmine

1, decompression Redmine

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

2, the establishment of a 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, running under the root directory of Redmine:

  Rails_env=production Rake Db:migrate

Read the default configuration data, and when you encounter the select language, select en:

  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

Start if error follows:

Copy Code code 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.
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.
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.

You can create a/data/www/redmine/tmp/pids directory

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

Startup success is as follows:

  [Root@centos5 redmine]# mongrel_rails Cluster::start starting Port 8000 starting port 8001 Port
  8002

7. Configure Nginx

Copy Code code 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;
}
}

V: Access to redmine test:

http://192.168.8.32

Directly with Ruby built-in Webrick can also start redmine

  /usr/local/ruby/bin/ruby/data/www/redmine/script/server WEBRICK-E Production &

Startup success 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: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

Access Redmine test: http://192.168.8.32:3000

VI. Configuring SVN servers
Seven, configure SVN in the Redmine
go to Redmine directory config, have file "Configuration.yml.example", copy the file rename "Configuration.yml", modify the SVN configuration

Copy Code code as follows:
Scm_subversion_command:svn

Note: Here you need to add the directory where SVN resides in the environment variable path
Reboot the server and configure the SCM
New project test, configure version gallery scm--> Select Subversion
Url--> Fill in Svn://192.168.8.32/test (Modify yourself according to your SVN configuration)
Login name-->test (modified according to your own SVN configuration)
Password-->test (modified according to your own SVN configuration)
Save you can


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.