This step by step tutorial guides you through the detail process of installing Redmine 4.1.0 on Ubuntu 19.10. During installation there are few build errors related to nokogiri and mysql2, this post describes how to install redmine on Disco Dingo Ubuntu 19.10 with solved build errors.
To get working Redmine 4.1.0 we need to follow following steps (total 8 steps) :
Contents
Step 1 :Install redmine on Disco Dingo Ubuntu 19.10
First step is to check and install apache server. Open your terminal by pressing Alt+Ctrl +T and enter following command to install Apache2 server
sudo apt install apache2 libapache2-mod-passenger
after execution of above command , visit http://localhost/ on your browser to check proper installation
Step 2: Install Redmine Application
To install redmine application , visit https://www.redmine.org/projects/redmine/wiki/Download and download redmine tar.gz package.
After Downloading Enter following commands in terminal (first make sure you are in Downloads Directory ) to place Downloaded application to /usr/share/ directory
Copy redmine tar.gz file to /usr/share/
sudo cp redmine-4.1.0.tar.gz /usr/share/
Extract This compressed file
sudo tar -xvzf redmine-4.1.0.tar.gz
Now , remove tar.gz file as it is not needed afterwords
sudo rm redmine-4.1.0.tar.gz
we can see following directory structure in redmine folder
Step 3 : Install MySql and Create an Empty Redmine Database
Enter following command to install MySql server as well as client
sudo apt-get install mysql-server mysql-client
Now , check MySql Version
mysql – -version
Now , create Empty database as root/super user
sudo -i
Now that we have all the privilages to change the system , create empty database
mysql
Enter following command to create database
CREATE DATABASE redmine CHARACTER SET utf8mb4;
create user redmine with password ‘my_password’
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
Grant all access to user
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
Now , exit MySql
Step 4 : DATABASE configuration
Copy Following details to config/database.yml file
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "my_password"
gedit config/database.yml
above command will open gedit editor (you can use vim ,nano, emacs or any other editor also) . Now paste above configuration in this opened file , save and close it.
Note: make sure you are in Redmine directory and You are standard user . If you edit database.yml as a super user (# prompt ) , standard user can only read this file and cannot edit it ) . so make sure there is $ prompt not #.
Step 5 : Dependency Installation
In this step we will install lots of ruby gems (59 total ) and other dependencies (total 31)
Enter following commands as standard user ($ prompt)
sudo gem install bundler
sudo bundle install --without development test
Here , you may face the Nokogiri dependency error, “an error occurred while installing nokogiri (1.10.9) and bundler cannot continue”
This occur due to multi level dependencies .
To resolve this , we need to manually install nokogiri gem.
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
sudo gem install nokogiri -v 1.10.3
Again run above command to continue on how to Install Redmine on Disco Dingo Ubuntu 19.10.
sudo bundle install --without development test
This time we get error for myslq2 ” an error occured while installing mysql2 (0.5.3) and bundler cannot continue, Make sure that ‘get install mysql2 -v ‘0.5.3’ –source ‘https://rubygems.org/’ succeeds before bundling.
We need to install MySql client to proceed, follow below steps to install it.
sudo apt-get install libmysqlclient-dev
again enter bundle command
sudo bundle install –without development test
Step 6: Database Schema Objects Creation
Generate a random key used by Rails to encode cookies storing session data thus preventing their tampering.
bundle exec rake generate_secret_token
Create the database structure, by running the following command under the application root directory i.e./usr/share/redmine-4.1.0
RAILS_ENV=production bundle exec rake db:migrate
If Rake abort appears , check database.yml file and confirm the accuracy of username and password and try again.
Then insert default configuration data in database, by running the following command
This step will ask to select language.
Select en for english.
RAILS_ENV=production bundle exec rake redmine:load_default_data
Step 7: Test Installation
Test the installation by running WEBrick web server:
bundle exec rails server webrick -e production
Now , open url http://0.0.0.0:3000 in your browser to launch redmine .( The URL is given in above pitcher . It may vary .)
Click on sign In and log in using default credentials i.e. Username : admin , password : admin
You will be asked to change your password to custom one . Now set the password of your choice .and save it.
Also you change account details from My account .
Click on administration -> information to check Redmine details.
Step 8 : Plugin Installation
Redmine 4.1.0 is installed on Ubuntu 19.10 Now lets install a plugin to check its working .
enter following command ( first check you are in plugin sub directory in redmine directory). to install pivot table plugin
git clone git://github.com/deecay/redmine_pivot_table
If Git is not installed on your system, above command will not execute . So, first Install Git by executing following command and try again
sudo apt-get install git
after successfull execution of git clone command, run following command
sudo RAILS_ENV=production rake redmine:plugins:migrate
Now , restart redmine to see the plugin added .
In this way, we have completed how to install redmine on Disco Dingo Ubuntu 19.10 with solved build errors and also added pivot table plugin to it for testing its working.
One Response