Monday, July 11, 2016

How to Configure Redmine-3.1.6 with WHM 11.56.25

First Login to WHM and create subdomain and after login Cpanel via phpmyadmin create database



from root

cd /usr/local/src
wget http://rubyforge.org/frs/download.php/XXXXX/redmine-version.tar.gz
tar -xzvf redmine-version.tar.gz
chown -R username:username /usr/local/src/redmine-version/*
mv /usr/local/src/redmine-version/* /home/username/

mv /home/username/public/* /home/username/public_html
rm -rf /home/username/public
ln -s /home/username/public_html /home/username/public

For rvm install 
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm requirements

rvm install 2.2.3

gem install rails

gem install passenger

yum -y install curl-devel sqlite-devel

passenger-install-apache2-module

vi /usr/local/apache/conf/passenger.conf

LoadModule passenger_module /usr/local/rvm/gems/ruby-2.2.3/gems/passenger-5.0.24/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-2.2.3/gems/passenger-5.0.24
PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.2.3/ruby

vi /usr/local/apache/conf/includes/pre_main_global.conf

Include /usr/local/apache/conf/passenger.conf

/scripts/rebuildhttpdconf
 service httpd restart

From User
cd /home/username
bundle install --without development test postgresql sqlite
cp /home/username/config/database.yml.example /home/username/config/database.yml


cd /home/username
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data


from root

mkdir -p /usr/local/apache/conf/userdata/std/2/username/domain.com


edit /usr/local/apache/conf/userdata/std/2/username/domain.com/redmine.conf

PassengerSpawnMethod smart
PassengerPoolIdleTime 300
PassengerMaxPreloaderIdleTime 0
PassengerMaxRequests 5000
PassengerStatThrottleRate 5
PassengerMinInstances 3

Options Indexes -ExecCGI FollowSymLinks -MultiViews
# AllowOverride None
Order allow,deny
Allow from all

# mod_rails
# PassengerUser redmine
#RailsEnv edoceo_live
RackBaseURI /

# environment.rb
# Redmine::Utils::relative_url_root = "/"  


Next, add this to /etc/httpd/conf/includes/post_virtualhost_global.conf

PassengerPreStart http://domain.com

Uncomment the include line, and restart Apache to verify it works fine. Once restarted OK, distill it to the distiller:
 #Include "/usr/local/apache/conf/userdata/std/2/username/domain.com/*.conf"

/usr/local/cpanel/bin/apache_conf_distiller --update
/usr/local/cpanel/bin/build_apache_conf

Your redmine application should now be accessible at http://domain.com

0 comments:

Post a Comment