current position:Home>How to integrate Linux and redmine into the redmine system

How to integrate Linux and redmine into the redmine system

2022-04-29 19:27:00Billion cloud speed

stay Linux How will the system Redmine and SVN Integration into Nginx

This article mainly introduces “ stay Linux How will the system Redmine and SVN Integration into Nginx” Knowledge about , Xiaobian shows you the operation process through practical cases , The operation method is simple and fast , Practical , Hope this article “ stay Linux How will the system Redmine and SVN Integration into Nginx” The article can help you solve problems .

redmine: It's based on web Project management software , use ruby Developed . Is based on ror Framework development of a cross platform project management system , Is the rising star of project management system , It is said to have come from basecamp Of ror From the version , Support multiple databases , Except for and dotproject The function of the system is about the same , And a lot of its own unique features , For example, provide wiki、 News station 、 Time tracking 、feed polymerization 、 export pdf wait , You can also integrate other version management systems with bug Tracking system , for example svn、cvs、td wait . The configuration function is powerful and convenient , Custom properties and update notifications are also useful . Now let's deploy redmine+svn project management system ( You need to strictly follow the official installation documents to install the corresponding ruby package )

Environmental Science :centos-5.5 redmine-1.2.0 subversion-1.6.17

One 、 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

Two 、 First configure lnmp Environmental Science

Reference resources :centos 5.5 Lower installation mysql5.1.57+php5.2.17(fastcgi)+nginx1.0.1 High performance web The server

3、 ... and 、redmine install ( The requirements for the versions of each software package are very strict , Must correspond to the corresponding version , Otherwise, unpredictable errors will occur )

1、ruby install :

  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, take ruby Directory add root environment variable
    perhaps  

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

2、rubygems install

install rubygems , Notice that it must be 1.7.0 The following version , Otherwise, it cannot be started and used normally redmine. I just read a Chinese document written by others , Installed 1.7.0 edition , therefore redmine Has been unable to work properly , To this end, we took a big detour . Finally, the problem was found in the official documents . Here are some descriptions of version requirements on 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  # my mysql Is compiled and installed in /data/soft/mysql In the catalog   gem install passenger  gem install mongrel mongrel_cluster

Four 、 Installation 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、 Building 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

Be careful : There is a space after the colon ...

4、 Create and run the database :

Generate session storage key :

  cd /data/www/redmine  rake generate_session_store

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

  rails_env=production rake db:migrate

Read default configuration data , When it comes to choosing a language (select language) when , choice zh:

  rails_env=production rake redmine:load_default_data

5、 To 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, the following :

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

establish /data/www/redmine/tmp/pids directory

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

Start successfully as follows :

  [[email protected] redmine]# mongrel_rails cluster::start  starting port 8000  starting port 8001  starting port 8002

7、 To 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;
    }
    }

5、 ... and : visit redmine test :

 stay Linux How will the system Redmine and SVN Integration into Nginx

Direct use ruby built-in webrick Can also be started redmine

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

Start successfully as follows :

  [[email protected] redmine]# /usr/local/ruby/bin/ruby /data/www/redmine/script/server webrick -e production &  [1] 3526  [[email protected] 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

visit redmine test : http://192.168.8.32:3000

 stay Linux How will the system Redmine and SVN Integration into Nginx

6、 ... and 、 To configure svn The server
7、 ... and 、 stay redmine Middle configuration svn
Get into redmine Under the table of contents config, Documents “configuration.yml.example”, Copy the file and rename it “configuration.yml”, Modify the svn To configure

Copy code   The code is as follows :

scm_subversion_command: svn

Be careful : Here you need to set the environment variable path Add svn directory
Restart the server again , To configure scm
New projects test, Configure version Library scm--> choice subversion
url--> Fill in svn://192.168.8.32/test( According to oneself svn The configuration can be modified by itself )
Login name -->test( According to oneself svn The configuration can be modified by itself )
password -->test( According to oneself svn The configuration can be modified by itself )
Save it

 stay Linux How will the system Redmine and SVN Integration into Nginx

About “ stay Linux How will the system Redmine and SVN Integration into Nginx” That's all for , Thanks for reading . If you want to know more about the industry , You can pay attention to the Yisu cloud industry information channel , Xiaobian will update different knowledge points for you every day .

copyright notice
author[Billion cloud speed],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204291744570613.html

Random recommended