Centos6.5 redmine installation configuration, centos6.5redmine

Source: Internet
Author: User
Tags redmine

Centos6.5 redmine installation configuration, centos6.5redmine

First, we will introduce Baidu redmine:

Redmine is a web-based project management software developed using Ruby. It is a cross-platform project management system developed using the ROR framework. It is said that it comes from the ror version of Basecamp and supports multiple databases, it has many unique functions, such as providing wiki and news platforms. It can also integrate other version management systems and BUG tracking systems, such as Perforce, SVN, CVS, and TD. This Web-based Project management system organizes members, tasks (problems), documents, discussions, and various forms of resources in the form of "projects, everyone participates in updating tasks, documents, and other content to promote the project progress. At the same time, the system uses time clues and various dynamic reports to automatically report the project progress to members.

Before installing redmine, let's take a look at the version requirements of each component:

Redmine version Supported Ruby versions Rails version used
Current trunk Ruby 1.9.3, 2.0.01, 2.1, 2.2 Rails 4.2
Trunk <r13482 Ruby 1.8.72, 1.9.2, 1.9.3, 2.0.01, 2.1, jruby-1.7.6 Rails 3.2
3.0 Ruby 1.9.3, 2.0.01, 2.1, 2.2 Rails 4.2
2.6 Ruby 1.8.72, 1.9.2, 1.9.3, 2.0.01, 2.1, jruby-1.7.6 Rails 3.2
The latest version 2.6.3 is available on the official website 2.0 and later. You can see which version of the component you want to select.

1. Install the basic software environment

Yum-y install libyaml-devel zlib-devel curl-devel openssl-devel httpd-devel apr-util-devel gcc ruby-devel gcc-c ++ make postgresql-devel imageMagick-devel sqlite-devel perl-LDAP mod_perl perl-Digest-SHA

2. install apache and mysql and configure the redmine database.

rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpmyum install mysql-community-server httpd -y
After the installation is complete, service mysqld start and configure the relevant database

mysql> create database redmine_db character set utf8;Query OK, 1 row affected (0.00 sec)mysql> create user 'redmine'@'localhost' identified by 'redmine';Query OK, 0 rows affected (0.00 sec)mysql> grant all privileges on redmine.* to 'redmine'@'localhost';Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;    Query OK, 0 rows affected (0.00 sec)

3. iptables settings

If a firewall is enabled on the server, we need to set the firewall.

/Sbin/iptables-a input-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT
/Sbin/iptables-a input-m state -- state NEW-m tcp-p tcp -- dport 443-j ACCEPT

4. Install the php Environment

Yum-y install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap

5. Install the ruby Environment

\ Curl-L https://get.rvm.io | bash
Source/etc/profile. d/rvm. sh

[root@usvr-126 ~]# source /etc/profile.d/rvm.sh[root@usvr-126 ~]# rvm list known# MRI Rubies[ruby-]1.8.6[-p420][ruby-]1.8.7[-head] # security released on head[ruby-]1.9.1[-p431][ruby-]1.9.2[-p330][ruby-]1.9.3[-p551][ruby-]2.0.0[-p643][ruby-]2.1.4[ruby-]2.1[.5][ruby-]2.2[.1][ruby-]2.2-head

Version 2.6 requires versions supported by ruby. Here we choose stable version 1.9.3.

Rvm install 1.9.3

[root@usvr-126 ~]# ruby -vruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
6. Install rubygems

Yum-y install rubygems

7. install apache support for redmine, which can be accessed through apache

Gem install passenger
Passenger-install-apache2-module

After the command is executed, follow the prompts to configure http:

vim /etc/httpd/conf.d/passenger.conf   LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.5/buildout/apache2/mod_passenger.so   <IfModule mod_passenger.c>     PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.5     PassengerDefaultRuby /usr/local/rvm/gems/ruby-1.9.3-p551/wrappers/ruby   </IfModule>
vim /etc/http/conf.d/redmine.conf   <VirtualHost *:80>      ServerName www.yourhost.com      # !!! Be sure to point DocumentRoot to 'public'!      DocumentRoot /somewhere/public          <Directory /somewhere/public>         # This relaxes Apache security settings.         AllowOverride all         # MultiViews must be turned off.         Options -MultiViews         # Uncomment this if you're on Apache >= 2.4:         #Require all granted      </Directory>   </VirtualHost>
Because our redmine has not been installed, the path is not configured yet. After redmine is pressed, configure the specific path. Note that the root directory must be the public directory under redmine.

8. Install redmine

wget http://www.redmine.org/releases/redmine-2.6.3.tar.gztar -zxvf redmine-2.6.3.tar.gzmv redmine-2.6.3 /data

After the installation is complete, we need to modify it in redmine. conf of httpd:

  <VirtualHost *:80>      ServerName 192.168.3.126      # !!! Be sure to point DocumentRoot to 'public'!      DocumentRoot /data/redmine-2.6.3/public  ErrorLog logs/redmine_error_log      <Directory /data/redmine-2.6.3/public><span style="white-space:pre"></span> Options Indexes ExecCGI FollowSymLinks         Order allow,deny         Allow from all         # This relaxes Apache security settings.         AllowOverride all         # MultiViews must be turned off.         Options -MultiViews         # Uncomment this if you're on Apache >= 2.4:         #Require all granted      </Directory>   </VirtualHost>


Do not forget service httpd restart

9. redmine Configuration

Cd/data/redmine-2.6.3/public

Cp database. yml. example database. yml

Note: MySQL database using ruby 1.9 (adapter must be set to mysql2) is said on the official website)

vim database.ymlproduction:  adapter: mysql2  database: redmine  host: localhost  username: redmine  password: "redmine"  encoding: utf8

10. Install rails. There will be many problems during the installation process. Let's solve them one by one.

Cd/data/redmine-2.6.3

Gem install bundler

Bundle install


Here an error is reported:

An error occurred while installing rack-cache (1.2), and Bundler cannot continue.Make sure that `gem install rack-cache -v '1.2'` succeeds before bundling.
Follow the prompts to install the required components.

Gem install rack-cache-v '1. 2'

Then bundle install again, and an error is returned:

An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.
Make sure that 'gem install nokogiri-V' 1. 6.6.2 ''succeeds before bundling.

Follow the prompts in gem install nokogiri-v '1. 6.6.2 'and run bundle install again. An error is returned:

ERROR:  Error installing nokogiri:ERROR: Failed to build gem native extension.
Follow the prompts:

If you are using Bundler, tell it to use the option:

Bundle config build. nokogiri -- use-system-libraries
Bundle install

Run the following command:

Bundle config build. nokogiri -- use-system-libraries
Bundle install

Again:

An error occurred while installing json (1.8.2), and Bundler cannot continue.Make sure that `gem install json -v '1.8.2'` succeeds before bundling.

Install gem install json-v '1. 8.2 'as prompted, and then bundle install again

An error is reported:

An error occurred while installing railties (3.2.21), and Bundler cannot continue.Make sure that `gem install railties -v '3.2.21'` succeeds before bundling.
Install gem install railties-v '3. 2.21 'as prompted, and then bundle install again

An error is reported:

An error occurred while installing mysql2 (0.3.18), and Bundler cannot continue.Make sure that `gem install mysql2 -v '0.3.18'` succeeds before bundling.
Run the gem install mysql2-v '0. 3.18 'command to report the following error:
checking for mysql.h... nochecking for mysql/mysql.h... no-----mysql.h is missing

Run yum install mysql-devel and install it. Then run bundle install.

Error:

An error occurred while installing redcarpet (2.3.0), and Bundler cannot continue.Make sure that `gem install redcarpet -v '2.3.0'` succeeds before bundling.
Install gem install redcarpet-v '2. 3.0 'as prompted, and then bundle install again

Please report any bugs. See https://github.com/gemhome/rmagick/compare/RMagick_2-13-2...master and https://github.com/rmagick/rmagick/issues/18

OK. The installation is successful.

Rake generate_secret_token

Initialize the redmine database table name

RAILS_ENV = production rake db: migrate
RAILS_ENV = production rake redmine: load_default_data


11. Modify fastcgi

cd /data/redmine-2.6.3/publicmkdir plugin_assetscp dispatch.fcgi.example dispatch.fcgicp htaccess.fcgi.example .htaccess
12. Install mod_fcgi

rpm --import https://fedoraproject.org/static/0608B895.txtwget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm -ivh epel-release-6-8.noarch.rpmyum -y install mod_fcgid
13. Create a file directory

mkdir -p /data/redmine-2.6.3/filescd /data/redmine-2.6.3/configcp configuration.yml.example configuration.yml
Because our files directory is under the redmine root directory, configuration does not need to be configured. If the files directory is somewhere else, we need

Vim configuration. yml
Attachments_storage_path:/var/redmine/files

14. Finally, start redmine.

cd /data/redmine-2chown -R apache:apache redmine-2.6.3chmod -R 755 redmine-2.6.3service httpd restart


Test it. Let's see it.


The default username and password are admin.


In addition, if apache cannot be accessed, We can first start it in redmine's own startup mode, and then access the ip: 3000 port. If the access is successful, redmine configuration is correct, it may be due to apache configuration problems or missing configuration changes.

The following is the redmine startup method,

[root@usvr-126 redmine-2.6.3]# cd /data/redmine-2.6.3  [root@usvr-126 redmine-2.6.3]# ruby script/rails server webrick -e production=> Booting WEBrick=> Rails 3.2.21 application starting in production on http://0.0.0.0:3000=> Call with -d to detach=> Ctrl-C to shutdown server[2015-03-28 01:09:30] INFO  WEBrick 1.3.1[2015-03-28 01:09:30] INFO  ruby 1.9.3 (2014-11-13) [x86_64-linux][2015-03-28 01:09:30] INFO  WEBrick::HTTPServer#start: pid=14577 port=3000



Now am, let's introduce it here. This is the second configuration, which is much easier than the first one. I hope it can help you with the error prompt.



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.