Install Redmine Project Management tool on Ubuntu 16.04
First of all we need to update our system ( run these as root )
1 2 | apt update apt upgrade |
Install the passenger and the Nginx web server
1 2 3 4 5 | sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7 sudo apt-get install -y apt-transport-https ca-certificates sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger xenial main > /etc/apt/sources.list.d/passenger.list' sudo apt-get update sudo apt-get install -y nginx-extras passenger |
Setup MySql Server
1 2 3 4 5 6 | sudo apt-get install mysql-server mysql -p #Enter the root password that you have entered at the setup of the mysql server create database redmine; #Type in the mysql console grant all privileges on redmine.* to 'red'@'%' identified by "123"; #Type in the mysql console flush privileges; #Type in the mysql console exit; #Type in the mysql console |
Install prerequisites
1 | apt install libmysqlclient-dev imagemagick libmagickwand-dev libcurl4-openssl-dev git-core subversion libssl-dev libreadline-dev
|
Creating a non sudo user to run the ruby project
1 2 | useradd -m redmine -g www-data passwd redmine |
login to the redmine user account
1 | su --login redmine
|
Install Ruby version 2.3.0
1 2 3 4 5 6 7 8 | git clone https://github.com/sstephenson/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile echo 'eval "$(rbenv init -)"' >> ~/.profile source ~/.profile git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv install 2.3.0 rbenv rehash rbenv global 2.3.0 |
Get the redmine current stable version ( 2017-04-20 ) from the SVN
1 2 3 4 | svn co https://svn.redmine.org/redmine/branches/3.3-stable redmine-3.3 cd redmine-3.3 cp config/configuration.yml.example config/configuration.yml cp config/database.yml.example config/database.yml |
Edit the database configuration file (Change production settings username,databasename,password,host)
1 | vi config/database.yml
|
Configure the redmine
1 2 3 4 5 | gem install bundler bundle install --without development test bundle exec rake generate_secret_token RAILS_ENV=production bundle exec rake db:migrate RAILS_ENV=production bundle exec rake redmine:load_default_data |
Configure the nginx
1 2 | exit vi /etc/nginx/sites-available/default |
change your vhost configuration like this ( change or add the highlighted fields remove any other unnecessary fields )
1 | vi /etc/nginx/nginx.conf
|
and uncomment
include /etc/nginx/passenger.conf;
1 | service nginx reload
|
Now browse the web server using web browser,
default username and password is admin admin