21 Jun 2019 @ 8:49 AM 

Partially taken from here, but some info is outdated, some missing, because I was unable to finish setup with those manual.

So, what we have?
Freshly installed Centos 7 and root access.
Steps need to be done:

  1. yum -y update
  2. yum localinstall -y https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
  3. yum --disablerepo=mysql80-community --enablerepo=mysql57-community install mysql-community-server mysql-devel
  4. systemctl start mysqld.service
  5. systemctl enable mysqld.service

  1. grep 'A temporary password is generated for root@localhost' /var/log/mysqld.log | tail -1
  2. /usr/bin/mysql_secure_installation  #set new secure password
  3. mysql -uroot -p -e "CREATE DATABASE redmine CHARACTER SET utf8; CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'yourpassword'; GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';" #don't forget set secure password
  4. systemctl restart mysqld.service
  5. yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel sqlite-devel ImageMagick ImageMagick-devel
  6. curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
  7. curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
  8. curl -L get.rvm.io | bash -s stable
  9. source /etc/profile.d/rvm.sh
  10. rvm reload
  11. rvm requirements run
  12. rvm install 2.4.6</li>
  13. export GEMS=/usr/local/rvm/gems/ruby-2.4.6/gems
  14. useradd redmine
  15. usermod -a -G redmine apache
  16. chmod 755 /home/redmine/
  17. cd /home/redmine/
  18. wget https://www.redmine.org/releases/redmine-3.4.6.tar.gz
  19. tar xvzf redmine-3.4.6.tar.gz
  20. chown redmine.redmine redmine-3.4.6 -R
  21. export REDMINE=/home/redmine/redmine-3.4.6
  22. cd $REDMINE
  23. cp config/database.yml.example config/database.yml
  24. cp public/dispatch.fcgi.example public/dispatch.fcgi
  25. cp public/htaccess.fcgi.example public/htaccess.fcgi
  26. vi config/database.yml #set your mysql db/user/pass here
  27. cd $REDMINE
  28. gem install bundler --version 1.3
  29. bundle install --without development test
  30. bundle exec rake generate_secret_token
  31. RAILS_ENV=production bundle exec rake db:migrate
  32. RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data
  33. bundle exec rails server webrick -e production #try start redmine, if everything is fine, you’ll be able to see it at localhost:3000
  34. gem install passenger
  35. $GEMS/passenger-6.0.2/bin/passenger-install-apache2-module #be careful here and check which passenger version was installed, path could be different
  36. #previous command will send you apache config like
    LoadModule passenger_module /usr/local/rvm/gems/ruby-2.4.6/gems/passenger-6.0.2/buildout/apache2/mod_passenger.so
    <IfModule mod_passenger.c>
    PassengerRoot /usr/local/rvm/gems/ruby-2.4.6/gems/passenger-6.0.2
    PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.4.6/wrappers/ruby
    </IfModule>it should be added in /etc/httpd/conf.modules.d/pasenger.conf
  37. #edit /etc/httpd/conf.d/redmine.conf and add following
    <VirtualHost *:80>
    ServerName youserver.domain.org
    DocumentRoot “/home/redmine/redmine-3.4.6/public”
    ErrorLog logs/redmine_error_log
    LogLevel warn
    <Directory “/home/redmine/redmine-3.4.6/public”>
    Options Indexes ExecCGI FollowSymLinks
    Require all granted
    AllowOverride all
    </Directory>
    </VirtualHost>
  38. systemctl restart httpd
  39. cd $REDMINE
  40. chmod 777 tmp -R
  41. bundle exec rails server webrick -e production

Now visit your youserver.domain.org and you should see welcome page, refault user/pass for redmine is admin admin

Posted By: lvlind
Last Edit: 21 Jun 2019 @ 09:31 AM

EmailPermalink
Tags
Tags: , , , ,
Categories: Uncategorized


 

Responses to this post » (None)

 
Post a Comment

You must be logged in to post a comment.

Tags
Comment Meta:
RSS Feed for comments

 Last 50 Posts
Change Theme...
  • Users » 1
  • Posts/Pages » 35
  • Comments » 0
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About



    No Child Pages.

Need Help?



    No Child Pages.

Check your IP



    No Child Pages.