yum install -y httpd
yum -y install mariadb-server mariadb
*database 생성
CREATE DATABASE redmine CHARACTER SET utf8 COLLATE utf8_general_ci;
yum -y install gcc g++ cpp gcc-c++ openssl-devel readline-devel zlib-devel curl-devel libyaml-devel mariadb-devel ImageMagick ImageMagick-devel
yum -y install bison byacc cscope ctags diffstat doxygen flex indent intltool libtool patchutils rcs redhat-rpm-config rpm-build swig
yum -y install systemtap gettext-devel gettext-libs kernel-devel systemtap-client systemtap-devel binutils elfutils gettext subversion
yum -y install elfutils-libelf elfutils-libs rpm rpm-libs rpm-python systemtap-runtime
yum -y install libxslt-devel libxml2-devel mysql-devel openssl openssl-devel httpd-devel apr-devel apr-util-devel
wget https://github.com/feedforce/ruby-rpm/releases/download/2.6.3/ruby-2.6.3-1.el7.centos.x86_64.rpm
yum -y localinstall ruby-2.6.3-1.el7.centos.x86_64.rpm
# yum -y install ruby ruby-devel ruby-irb ruby-rdoc ruby-ri
# yum -y install rubygems
gem update
# 안되면 --system 붙여서 진행
# proxy가 필요할 경우 getm --http-proxy http://localhost:8888 update
gem update --system
gem install bundler
gem install rails
ruby -v
gem -v
yum -y install gcc gcc-c++ make
wget http://www.redmine.org/releases/redmine-4.0.3.tar.gz
tar -xvzf redmine-4.0.3.tar.gz
mv redmine-4.0.3 /var/www/redmine
cd /var/www/redmine/config
cp database.yml.example database.yml
vi database.yml
# 다음 줄부터
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "fpemakdls"
encoding: utf8
# 윗줄까지만 남기고 모두 주석처리
bundle config build.nokogiri --use-system-libraries
bundle install
bundle exec rake generate_secret_token
mkdir -p /var/www/redmine/app/assets/config
touch /var/www/redmine/app/assets/config/manifest.js
vi /var/www/redmine/app/assets/config/manifest.js
# 다음 세줄만 붙여넣기한다.
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
``shell
bundle exec rake db:migrate RAILS_ENV=production
gem install passenger
``shell
passenger-install-apache2-module
...중략...
(*) Ruby
) (*) Python
( ) Node.js
( ) Meteor
...중략...
LoadModule passenger_module /usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.12/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.12
PassengerDefaultRuby /usr/bin/ruby
</IfModule>
vi /etc/httpd/conf.d/redmine.conf
LoadModule passenger_module /usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.12/buildout/apache2/mod_passenger.so
</notextile>IfModule mod_passenger.c>
PassengerRoot /usr/lib64/ruby/gems/2.6.0/gems/passenger-6.0.12
PassengerDefaultRuby /usr/bin/ruby
</IfModule>
<VirtualHost *:80>
ServerName redmine
DocumentRoot /var/www/redmine/public
<Directory /var/www/redmine/public>
AllowOverride all
Options -Multiviews
Require all granted
</Directory>
<</notextile>/VirtualHost>
chown -R apache:apache /var/www/redmine/public
service httpd restart