Project

General

Profile

how install the 3.3.0 version on Nginx-1.10.0 of Debian 8 with customization ?

Added by NULL Ziv over 8 years ago

1.Check the development version
1.1 Nginx

root@p:/# nginx -v
nginx version: nginx/1.10.0
root@p:/# which nginx
/usr/bin/nginx

1.2 Ruby

root@p:/# ruby -v
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
root@p:/# which ruby
/usr/bin/ruby

1.3 Rails

root@p:/# rails -v
Rails 4.2.6
root@p:/# which rails
/usr/local/bin/rails

1.4 Mysql

root@p:/# mysql --version
mysql Ver 14.14 Distrib 5.5.48, for Linux (x86_64) using readline 5.1
root@p:/# which mysql
/usr/bin/mysql

2.Create an empty database

root@p:/# mysql -uroot -p
Enter password:

mysql> CREATE DATABASE pm CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)

3.setting my database.yml

like that: *
production:
adapter: mysql2
database: pm
host: localhost
username: redmine
password: my_password *

4.Dependencies installation

root@p:~# cd /home/wwwroot/pm
root@p:/home/wwwroot/pm# gem install bundler

root@p:/home/wwwroot/pm# bundle install --without development test rmagick
Bundle complete! 31 Gemfile dependencies, 55 gems now installed.
Gems in the groups development, test, rmagick, production and prodicetion were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

5.Session store secret generation

root@p:/home/wwwroot/pm# bundle exec rake generate_secret_token

and it is nothing.

6.Database schema objects creation

root@p:/home/wwwroot/pm# RAILS_ENV=production bundle exec rake db:migrate

@...
...
...

20160416072926 RemovePositionDefaults: migrated (0.0139s) ================ 20160529063352 AddRolesSettings: migrating ===============================
-- add_column(:roles, :settings, :text)
-> 0.0029s
20160529063352 AddRolesSettings: migrated (0.0030s) ======================@

7.Database default data set

root@p:/home/wwwroot/pm# RAILS_ENV=production REDMINE_LANG=zh bundle exec rake redmine:load_default_data
Default configuration data loaded.


8.File system permissions

root@p:/home/wwwroot/pm# mkdir -p tmp tmp/pdf public/plugin_assets
root@p:/home/wwwroot/pm# sudo chmod -R 755 files log tmp public/plugin_assets
root@p:/home/wwwroot/pm# sudo chown -R www:www files log tmp public/plugin_assets

9.Test the installation

@root@p:/home/wwwroot/pm# bundle exec rails server webrick -e production

=> Booting WEBrick
=> Rails 4.2.6 application starting in production on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-09-14 11:52:21] INFO WEBrick 1.3.1
[2016-09-14 11:52:21] INFO ruby 2.1.5 (2014-11-13) [x86_64-linux-gnu]
[2016-09-14 11:52:21] INFO WEBrick::HTTPServer#start: pid=4385 port=3000@

But it doesn`t work! what is problem about my installation?


Replies (1)

RE: how install the 3.3.0 version on Nginx-1.10.0 of Debian 8 with customization ? - Added by Djordjije Crni over 8 years ago

You are missing some SQL commands in your trascript, after line "CREATE DATABASE pm CHARACTER SET utf8;":

CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'pm'@'localhost';

Missing "encoding: utf8" line in config/database.yml:

production:
  adapter: mysql2
  database: pm
  host: localhost
  username: redmine
  password: "my_password" 
  encoding: utf8
You have defined environment "prodicetion" in config/database.yml ?
"Gems in the groups development, test, rmagick, production and prodicetion were not installed."

Don't run webrick as root. You should switch to user www:

su - www -s /bin/bash
Check if all environment variables, e.g. $PATH are OK.
If you want to directly access webrick from other host, you should start it using option "-b 0.0.0.0":
bundle exec rails server webrick -b 0.0.0.0 -e production
Check the firewall state on Redmine server. If the firewall is active, check whether it is opened for tcp port 3000 (used by webrick by default).

    (1-1/1)