Redmine installation Configuration
Reference page
* http://www.pyiner.com/centos-6-3-nginx-%E6%90%AD%E5%BB%BA-redmine/
* http://www.redmine.org/boards/1/topics/37254
* http://www.redmine.org/boards/2/topics/30142
* Http://www.redmine.org/projects/redmine/wiki/Redmine_on_CentOS_installation_HOWTO#Set-environment-to-production
* {{: Good: Operations Center: System Group: Pcre-8.33.tar.gz}}
Redmine version update, 2.0.3-->2.3.3, reference page (note, update process to resolve Rubygem library dependencies, configuration file Gemfile Modify support Mysql2)
* http://www.doc88.com/p-018708303288.html
* Http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
* http://www.redmine.org/issues/14787 [Redmine file cannot be uploaded, the other nginx hint file is too large, need to modify Nginx configuration file. ]
Installing Redmine 2.0.3
Mkdir-p/data/web
Cd/data/web
wget http://rubyforge.org/frs/download.php/76259/redmine-2.0.3.tar.gz
TAR-ZXVF redmine-2.0.3.tar.gz
MV redmine-2.0.3 Redmine
Install the libraries you need to use
Yum-y Install zlib-devel curl-devel openssl-devel apr-devel apr-util-devel mysql-devel
Install Ruby for Redmine 2.0.3 we use Ruby 1.9.3
Note: Install yaml-0.1.4.tar.gz first and install Ruby.
Cd/data/soft
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
./configure
Make
Make install
wget http://ftp.ruby-lang.org/pub/ruby/stable/ruby-1.9.3-p0.tar.gz
TAR-ZXVF ruby-1.9.3-p0.tar.gz
CD ruby-1.9.3-p0/
./configure
Make
Make install
Ruby-v (view version number, if you see the version without other actions, such as running Ruby Error, please configure the environment variable, see the above reference page for details)
Installing RubyGems 1.8
Cd/data/soft
wget http://rubyforge.org/frs/download.php/74806/rubygems-1.8.0.tgz
Tar zxvf rubygems-1.8.0.tgz
CD rubygems-1.8.0
Ruby Setup.rb
Gem-v (Check the Gem version number to verify that the gem is installed)
Installing Phusion Passenger (Nginx module)
cd/usr/local/lib/ruby/gems/1.9.1/gems/
wget http://rubyforge.org/frs/download.php/76005/passenger-3.0.12.tar.gz
Tar zxvf passenger-3.0.12.tar.gz
CD passenger-3.0.12
./bin/passenger-install-nginx-module (If this part recompile Nginx error, prompt pcre errors, can-with-pcre= specify its directory, pcre see attachment)
Follow the prompts to do the next step, such as Select 1, for the new download install Nginx, such as Select 2 can be added to the previous Nginx module, custom compilation parameters
Since Nginx is installed (please refer to the deployment documentation for Nginx installation), this example chooses 2.
Such as
{{: Good: Operations Center: System Group: nginx-passenger.jpg?direct&200|}}
Nginx configuration (Support passenger module)
Cd/usr/local/nginx/conf
Vim nginx.conf
Added in HTTP field
passenger_root/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12;
Passenger_ruby/usr/local/bin/ruby;
New in server field
Passenger_enabled on;
Passenger_use_global_queue on;
For details, refer to Accessories
{{: Good: Operations Center: System Group: nginxconf2.rar|}}
Restart Nginx/usr/local/nginx/sbin/nginx-s Reload
Redmine Setup, installing bundler
Cd/data/web/redmine (Enter the Redmine directory)
Gem Install Bundler
Bundle install--without Development Test PostgreSQL SQLite Rmagick (we use MySQL and ignore postresql and SQLite ~)
If you notice an error, you cannot install MySQL.
{{: Good: Operations Center: System Group: mysqlerror.jpg?direct&200|}}
Workaround: First remove the default installed MySQL Rm-rf/usr/local/percona rm-f/etc/init.d/mysqld
Then yum install MySQL mysql-server mysql-devel
/etc/init.d/mysqld start
Then reinstall.
If you do not have ImageMagick installed, you can ignore Rmagick:bundle install–without development test PostgreSQL SQLite Rmagick
If you want to install ImageMagick,
Yum Install ImageMagick
Yum Install Imagemagick-devel
Vim/data/web/redmine/gemfile [Edit file supports MySQL (this example uses a character problem on the page after MySQL installation is complete), use MYSQL2]
Add in the appropriate location of the file
Gem "Mysql2
Mv/data/web/redmine/config/database.yml.example/data/web/redmine/config/database.yml
Vim/data/web/redmine/config/database.yml
Change the adapter in Database.yml to MYSQL2
Add to CONFIG/ENVIRONMENT.RB
Encoding.default_external = Encoding::utf_8
Encoding.default_internal = Encoding::utf_8
Database-related Operations
Mysql-uroot-p
Create database Redmine character set UTF8;
Create user ' redmine ' @ ' localhost ' identified by ' My_password ';
Grant all privileges on redmine.* to ' redmine ' @ ' localhost ';
cd/data/web/redmine/config/
Vim Database.yml
Change as follows
Production
Adapter:mysql2
Database:redmine
Host:localhost
Username:redmine
Password:my_password
Generate a session store secret
Cd/data/web/redmine
Rake Generate_secret_token
Create a Database basic information table Rails_env=production rake db:migrate
Please refer to the Header Reference page link in this article for an error.
Rails_env=production Rake Redmine:load_default_data
Installation is complete if no error is made
Troubleshooting log files
Tail-f/data/logs/nginx/error.log (nginx error log)
Tail-f/data/web/redmine/log/production.log (redmine log information)
Redmine installation Configuration