CentOS 6.7 x64 APACHE/PHP/MARIADB Environment Installation Redmine3.2.1

Source: Internet
Author: User
Tags imagemagick sqlite redmine

System installed according to # CentOS 6.7 x64 minimized installation

APACHE/PHP/MARIADB Environment in accordance with the 6.7 CentOS x64 APACHE/PHP/MARIADB Environment Construction



Create a database

[Email protected] ~]# mysql-u root-pmariadb.2016p <<eof 2>/dev/null CREATE database redmine default character Set utf8;create user ' redmineuser ' @ '% ' identified by ' redmine.2016p '; grant all privileges on redmine.* to ' redmineuser ' @ ' % ' identified by ' redmine.2016p '; flush privileges; Eof


Download, install ruby2.3/rubygems2.6.3

[[email protected] src]# wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz[[ email protected] src]# wget http://production.cf.rubygems.org/rubygems/rubygems-2.6.3.tgz[ [Email protected] src]# wget http://www.redmine.org/releases/redmine-3.2.1.tar.gz[[email  protected] src]# tar zxf ruby-2.3.0.tar.gz[[email protected] ruby-2.3.0]#  cd ruby-2.3.0[[email protected] ruby-2.3.0]# ./configure --prefix=/usr/local/ ruby && make && make install[[email protected] ruby-2.3.0]#  echo  "Export path=/usr/local/ruby/bin: $PATH"  > /etc/profile.d/ruby.sh[[email  protected] ruby-2.3.0]# source /etc/profile.d/ruby.sh[[email protected]  RUBY-2.3.0]#&NBSP;CD&NBSP, .... [[email protected] src]# tar xf rubygems-2.6.3.tgz[[email protected] src]# cd rubygems-2.6.3[[email protected] rubygems-2.6.3]# ruby setup.rb 


Modifying a gem source

[[Email protected] src]# gem source--remove https://rubygems.org/[[email protected] src]# gem sources-a Https://ruby.tao bao.org/


Configure Redmine

[[Email protected] src]# tar zxf redmine-3.2.1.tar.gz[[email protected] src ]# mv redmine-3.2.1 /data/redmine[[email protected] src]# sed -i  "s/ source  ' https:\/\/rubygems.org '/source  ' https:\/\/ruby.taobao.org '/'  /data/redmine/gemfile[[ email protected] src]# cp /data/redmine/config/configuration.yml.example /data/ redmine/config/configuration.yml[[email protected] src]# cp /data/redmine/public/ dispatch.fcgi.example /data/redmine/public/dispatch.fcgi[[email protected] src]# cp / data/redmine/public/htaccess.fcgi.example /data/redmine/public/htaccess.fcgi[[email protected]  src]# sed -i  ' s/#imagemagick_convert_command:/imagemagick_convert_command:\ \/usr\/local\/ imagemagick\/bin\/convert/'  /data/redmine/config/configuration.yml[[email protected] src]#  sed -i  ' S/attachmenTs_storage_path:/attachments_storage_path\: \/data\/redmine\/files/'  /data/redmine/config/ configuration.yml#  configuration database [[email protected] src]# cat > /data/redmine/config/ database.yml << eofproduction:  adapter: mysql2  database:  redmine  host: localhost  username: redmineuser  password:  " redmine.2016p "  encoding: utf8EOF[[email protected] src]# chown -R  Www.www /data/redmine[[email protected] src]# mkdir /data/wwwlogs/redmine[[email  protected] src]# chown -r www:www /data/wwwlogs/redmine/[[email protected]  src]# rm -rf /data/redmine/files/delete.me


Configure Apache

[[email protected] src]# mv /usr/local/apache/conf/vhost/0.conf{,\.bak}[[email  Protected] src]# cat > /usr/local/apache/conf/vhost/redmine.conf << eof <VirtualHost *:80>    ServerName redmine.test.com     serveradmin [email protected]    documentroot /data/redmine/public/     ErrorLog /data/wwwlogs/redmine/error_redmine_apache.log     customlog /data/wwwlogs/redmine/access_redmine_apache.log common    < Directory /data/redmine/public/>        options +indexes         Order allow,deny         Allow from all        Require all  Granted    </directory></virtualhost>eof 


Install the Gem dependency package

[[email protected] src]# gem install bundle[[email protected] src]#  Gem install rbpdf-font[[email protected] src]# gem install htmlentities  -v=4.3.1[[email protected] src]# gem install rmagick --verbose --  --with-opt-dir=/usr/local/imagemagick --with-opt-include=/usr/local/imagemagick/include -- With-opt-lib=/usr/local/imagemagick/lib --ruby=/usr/local/ruby[[email protected] src]# gem  install mysql2 -- --with-mysql-include=/usr/local/mariadb/include/mysql/ -- with-mysql-lib=/usr/local/mariadb/lib/ --with-mysql-dir=/usr/local/mariadb/[[email protected]  Src]# gem install passenger -v=5.0.28[[email protected] src]# cat > > /usr/local/apache/conf/httpd.conf << EOF    LoadModule  passenger_module /usr/local/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.0.28/buildout/apache2/mod_passenger.so    < ifmodule mod_passenger.c>      passengerroot /usr/local/ruby/lib/ ruby/gems/2.3.0/gems/passenger-5.0.28      passengerdefaultruby /usr/local/ ruby/bin/ruby    </ifmodule>eof[[email protected] src]#  Passenger-install-apache2-module --apxs2-path /usr/local/apache/bin/apxs --apr-config-path  /usr/local/apache/bin/apr-1-config#  Press ENTER HERE


Installing Redmine

[[email protected] redmine]# cd /data/redmine[[email protected] redmine]#  bundle install --without development test postgresql sqlite[[email  protected] redmine]# sed -i  "/inodot/{ n; s/' Inodot '/# ' Inodot '/; }"  / usr/local/ruby/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb[[email  Protected] redmine]# mv /data/redmine/lib/tasks/testing.rake{,\.bak}[[email protected]  redmine]# rm -rf /data/redmine/Gemfile.lock[[email protected] redmine]#  Gem install rbpdf-font[[email protected] redmine]# bundle install --without  development test postgresql sqlite[[email protected] redmine]# bundle  exec rake generate_secret_token[[email protected] redmine]# bundle exec  rake db:migrate raiLs_env=production[[email protected] redmine]# rails_env=production rake redmine:load_ default_data#  enter "zh" here, then press ENTER


Restart Apache

[Email protected] redmine]# service httpd restart


Visit redmine

Browser access to server 80 port



This article is from the "Junlins" blog, make sure to keep this source http://junlins.blog.51cto.com/7601672/1789781

CentOS 6.7 x64 APACHE/PHP/MARIADB Environment Installation Redmine3.2.1

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.