Install Redmine on DreamHost VPS Server LinuxAdmin by blog_1buq8n - October 14, 2019June 29, 20200 Recently we moved to dreamhost VPS server and signed in for 3 year service. We were using redmine in our projects for handling project management activities. After successful installation of latest redmine release on local server, it was time to move on to install and test it on webservers. But when we contacted Dreamhost support they have standard reply, Thank you for writing into DreamHost Support!Unfortunately, we cannot assist with custom configs for that application, My apologies. If you need root access for the install then you would need to use a dedicated server or DreamCompute and that would not be allowed on your current VPS.Dreamhost Support Reply There are multiple resources available across the web about Redmine on Dreamhost, but they’re all quite outdated. Well redmine is flexible project management web application and is free to use opensource software. We did not stop here, as we were so much impressed with capabilities of redmine for project management and reporting. So we have started with installation of ruby on rails on VPS (virtual private server). Contents Step 0 – Pre-Build Enable Passenger (Ruby/NodeJS/Python apps only) under ‘domains’->’Manage Domains’ from dreamhost cpanelInstall RVM (Ruby version Manager) using steps mentioned in dreamhost help center Install ImageMagick current gem as redmine requires it and DreamHost servers don’t have it mkdir src && cd src Get latest source from imagemagic website using $ wget http://www.imagemagick.org/download/mkdir ~/libtar xfz ImageMagick-7.0*Now navigate to ImageMagick-7.0* folder and configure ./configure –prefix=/home/username/lib/ImageMagick-7.0.8-68make make installexport PKG_CONFIG_PATH=’/home/username/lib/ImageMagick-7.0.8-68/lib/pkgconfig’ export C_INCLUDE_PATH=’/home/username/lib/ImageMagick-7.0.8-68/include’source ~/.bash_profileDownload latest redmine archive and decompress it in /public folderwget http://www.redmine.org/releases/redmine-4.0.4.tar.gztar xfz redmine-4.0.4.tar.gz –strip-components=1Install dependencies – $ gem install bundler $ bundle install If you are still getting issue with ImageMagick then bypass rmagick and continue bundle install –without development test rmagickGenerate session store key $ bundle exec rake generate_secret_tokenAfter this command, if your VPS is Debian 9.12 (aka Stretch) you will get following error, but don’t worry, just run – $ bundle update $ bundle exec rake generate_secret_tokenCould not find gem 'mysql2 (~> 0.5.0)' in any of the gem sources listed in your Gemfile. All above steps are required if you are using Dreamhost VPS/Shared server, If you are using dedicated servers then above tricks are not required for you. Step 1 – Create Database Create empty database using ‘MySQL database’ section of cpanel from dreamhost. This will create database and hostname, Note down these details along with username and password, as these are required in next step. Step 2 – Configure Database Configure the database in config/database.yml file, first rename ‘database.yml.example’ to ‘database.yml’. Open this configuration file and enter details as noted in step 1. The ‘database.yml’ file should look as below, production: adapter: mysql2 database: <db_name from step1> host: <host_name from step1> username: <user_name from step1> password: <user_password from step1> Step 3 – Migrate Database and Load Defaults Create the database structure by running the redmine migrations $ RAILS_ENV=production rake db:migrate OR $ bundle exec rake db:migrate At this moment, if you see issue with Sprockets, use steps to upgrade sprockets and you are good to go for final rake command. rake aborted! Sprockets::Railtie::ManifestNeededError: Expected to find a manifest file in `app/assets/config/manifest.js` It is easy as mentioned in the error log also, just create ‘ app/assets/config/manifest.js’ and copy below three lines in manifest file //= link_tree ../images //= link_directory ../javascripts .js //= link_directory ../stylesheets .css Step 4 – Final Rake Command $RAILS_ENV=production bundle exec rake redmine:load_default_data Now test your redmine server using wbrick command. $bundle exec rails server webrick -e production http://<host_name>:3000/ Redmine on VPS server of Dreamhost Step 5 – (Optional) Run webrick service as background process With webrick running in background you need not to start the server again and it runs even after you close the session. $ruby script/server webrick -e production -du Or Try following $ruby script/server webrick -e development -d Step 6 – Configuration Steps For Apache Server 1. You need to modify two files for apache. The first is /etc/apache2/mods-available/passenger.conf which needs the text PassengerDefaultUser www-data added as seen below.<IfModule mod_passenger.c>PassengerDefaultUser www-dataPassengerRoot /usrPassengerRuby /usr/bin/ruby</IfModule> 2. Now create a symlink to connect Redmine into the web document space: $ sudo ln -s /home/ilmp_redmine/<PWD>/public /var/www/html/redmine3. And modify /etc/apache2/sites-available/000-default.conf as follows<Directory /var/www/html/redmine>RailsBaseURI /redminePassengerResolveSymlinksInDocumentRoot on</Directory>4. Create and set the ownership of a Gemfile.lock file so that apache’s www-data user can access it:$ sudo chown www-data:www-data /home/ilmp_redmine/<PWD>/public/Gemfile.lock 5. Now restart apache: $ sudo service apache2 restart Feel free to drop a comment or email @ info@blog.neudeep.com, if you get stuck somewhere, we will try to help you as much as possible. Check out our services and offerings at RedmineLab.com Thank you for reading this post about ‘install redmine on VPS’ happy redmining using dreamhost. Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)MoreClick to share on LinkedIn (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email a link to a friend (Opens in new window)Like this:Like Loading... Related