Installation Of Redmine With SVN On A cPanel/CentOS 5.6 Server - Page 2
|
After SVN is set up correctly let's deal with Redmine. Go home: # cd Get latest Redmine stable source: # svn co http://redmine.rubyforge.org/svn/branches/2.0-stable redmine-2.0 Install prerequisities: # gem install bundler Install bundle: # cd redmine-2.0 ^^^^^^^^^^^^ Create a database and user for Redmine (in this case MySQL): # mysql -u [USERNAME] -p mysql> create database redmine character set utf8; +--------------------------+ # cp config/database.yml.example config/database.yml Modify the file according to your needs with previously set up database, e.g.: production:
adapter: mysql
database: [USERNAME]_redmine
host: localhost
username: [USERNAME]
password: [PASSWORD]
encoding: utf8
development:
adapter: mysql
database: [USERNAME]_redmine_development
host: localhost
username: [USERNAME]
password: {PASSWORD}
encoding: utf8
Create secret token, fill in the database, etc... # rake generate_secret_token Now test if it works using WEBrick web server: # ruby script/rails server webrick -e production Point your webbrowser to http://[DOMAINNAME]:3000 Once checked and all seems working go back to terminal session and kill the WEBrick (e.g.: CTLR+C). Redmine is set up - now we need to make it working with 'Phusion Passenger', aka 'mod_rails'. Go back home (again :) and install Passenger: # cd If everything goes well, installer will tell you what to do, e.g.: -------------------------------------------- The Apache 2 module was successfully installed. Please edit your Apache configuration file, and add these lines: LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.15/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.15 PassengerRuby /usr/bin/ruby After you restart Apache, you are ready to deploy any number of Ruby on Rails applications on Apache, without any further Ruby on Rails-specific configuration! Press ENTER to continue. -------------------------------------------- Deploying a Ruby on Rails application: an example Suppose you have a Rails application in /somewhere. Add a virtual host to your Apache configuration file and set its DocumentRoot to /somewhere/public: <VirtualHost *:80> ServerName www.yourhost.com # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot /somewhere/public <Directory /somewhere/public> # This relaxes Apache security settings. AllowOverride all # MultiViews must be turned off. Options -MultiViews </Directory> </VirtualHost> And that's it! You may also want to check the Users Guide for security and optimization tips, troubleshooting and other useful information: /usr/lib/ruby/gems/1.8/gems/passenger-3.0.15/doc/Users guide Apache.html Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-) https://www.phusionpassenger.com Phusion Passenger is a trademark of Hongli Lai & Ninh Bui. Let's do it then! # vi /usr/local/apache/conf/includes/pre_main_global.conf Add following lines (according to output from Passenger installation): # Load passenger module LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.15/ext/apache2/mod_passenger.so Now modify EA3 includes file: # vi /etc/httpd/conf/userdata/std/2/[USERNAME]/[DOMAINNAME]/redmine.conf Add following lines (again, according to previous output): <IfModule mod_passenger.c> PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.15 PassengerRuby /usr/bin/ruby # Optional - delete HTTP header which would be added by Passenger # Header always unset "X-Powered-By" # Header always unset "X-Rack-Cache" # Header always unset "X-Content-Digest" # Header always unset "X-Runtime" # Optional - for passenger tuning # PassengerLogLevel 0 # RailsAutoDetect On # PassengerMaxPoolSize 20 # PassengerMaxInstancesPerApp 4 # PassengerPoolIdleTime 3600 # PassengerUseGlobalQueue on # #PassengerHighPerformance on !!! conflict with DAV svn # PassengerStatThrottleRate 10 # RailsSpawnMethod smart # RailsAppSpawnerIdleTime 86400 # RailsFrameworkSpawnerIdleTime 0 # PassengerUserSwitching On # PassengerDefaultUser apache # PassengerMaxRequests 3000 # PassengerMinInstances 3 RailsBaseURI /redmine <Directory /home/[USERNAME]/public_html/redmine> Options -MultiViews </Directory> </IfModule> Create a softlink and check: # ln -s /home/[USERNAME]/redmine-2.0/public /home/[USERNAME]/public_html/redmine lrwxrwxrwx 1 root root 33 Aug 12 04:05 /home/[USERNAME]/public_html/redmine -> /home/[USERNAME]/redmine-2.0/public/ Now open another terminal session and keep checking for errors: # tail -f /usr/local/apache/logs/error_log Back in the first terminal session: # /scripts/verify_vhost_includes Testing /usr/local/apache/conf/userdata/std/2/[USERNAME]/[DOMAINNAME]/redmine.conf...ok If OK, then: # /scripts/ensure_vhost_includes --user=[USERNAME] And that should be it! :)
References:
|



Recent comments
11 hours 34 min ago
16 hours 39 min ago
21 hours 3 min ago
22 hours 52 min ago
1 day 13 hours ago
1 day 13 hours ago
1 day 18 hours ago
2 days 47 min ago
2 days 1 hour ago
2 days 2 hours ago