Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Redmine deployment

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

System environment (minimize installation):

LSB Version:: base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch

Distributor ID: CentOS

Description: CentOS release 6.8 (Final)

Release: 6.8

Codename: Final

System update

Yum update

Install dependency packages

Yum install-y make apr-devel apr-util-devel\

Zlib-devel curl-devel expat-devel gettext-devel\

Openssl-devel httpd httpd-devel mysql mysql-server\

Mysql-devel libxml2-devel libxslt-devel ImageMagick-devel

Deploy ruby

Wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/ruby/ruby-2.3.3.tar.gz

Tar zxvf ruby-2.3.3.tar.gz

Cd ruby-2.3.3

Yum install-y gcc*

. / configure-- prefix=/usr/local/ruby

Make

Make install

Add environment variables:

Vi / etc/profile adds the following line at the end:

Export PATH=/usr/local/ruby/bin:$PATH

Make the environment variable effective

Source / etc/profile

Check whether the installation is successful, ruby version number

Ruby-v

Install zlib and openssl extensions

Cd ruby-2.3.3/ext/zlib/

Ruby extconf.rb & & make & & make install

Cd ruby-2.3.3/ext/openssl/

Ruby extconf.rb

Vim Makefile

Add on line 64

Top_srcdir =.. /..

Make

Make install

Deploy rubygems

Wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/ruby/rubygems-2.6.8.tgz

Tar zxvf rubygems-2.6.8.tgz

Cd rubygems-2.6.8

Ruby setup.rb

Deploy redmine

Wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/redmine/redmine-3.3.1.tar.gz

Tar zxvf redmine-3.3.1.tar.gz

Mv redmine-3.3.1 / usr/local/redmine

Chown-R apache: / usr/local/redmine/

Modify database.yml configuration file

Cp / usr/local/redmine/config/database.yml.example / usr/local/redmine/config/database.yml

Vim / usr/local/redmine/config/database.yml

Production:

Adapter:mysql2

Database:redmine_default / / this is the redmine_default database we created later in mysql.

Host:localhost

Username:redmine / / this is the user we created for the redmine database

Password: "redmine" / / this is the password required by the user to access the redmine database

Encoding: utf8

See what kind of mirror image it is. The default is rubygems.org.

Gem sources-l

Delete the original image

Gem sources-- remove https://rubygems.org/

Change the source mirror to ruby-china

Gem sources-a https://gems.ruby-china.org/

Install bundler

Gem install bindler

Install rdoc

Gem install rdoc rdoc-data

Install rbpdf-font

Gem install rbpdf-font

Install rails

Gem install rails

Edit Gemfile, modify gem source

Vim / usr/local/redmine/Gemfile

Source 'https://gems.ruby-china.org/'

Run buldle install to check for dependencies

Cd / usr/local/redmine/

Bundle install

Set up databases and users

Start the database and enter the database

Service mysqld start

Mysql

Create database, user

Mysql > create database redmine_default character set utf8

Mysql > create user 'redmine'@'localhost' identified by' redmine'

Mysql > grant all privileges on redmine_default.* to 'redmine'@'localhost'

Mysql > flush privileges

Cd / usr/local/redmine/

Delete / usr/local/ruby/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb line 466

Rake generate_secret_token

RAILS_ENV=production rake db:migrate

RAILS_ENV=production rake redmine:load_default_data

Start redmine

Ruby / usr/local/redmine/bin/rails server webrick-e production-d

Apache configuration Agent redmine

Apache supports redmine

Gem install passenger

Passenger-install-apache2-module returns all the way.

1. Comment out the information of the original ServerName,ServerAdmin,DocumentRoot

2. Enable virtual host support and remove the # in front of NameVirtualHost *: 80

3. Add: at the end of the configuration file:

Add in httpd.conf

LoadModule passenger_module / usr/local/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so

PassengerRoot / usr/local/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.0.30

PassengerDefaultRuby / usr/local/ruby/bin/ruby

Add redmine profile

Vim / etc/httpd/conf.d/redmine.conf

ServerName www.redmine.com

DocumentRoot / usr/local/redmine/public

ErrorLog logs/redmine_error_log

Allow from all

AllowOverride all

Options-MultiViews

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report