1
|
tar xzf ./redmine-
|
2
|
|
3
|
3)mysql -u root –p
|
4
|
4)
|
5
|
CREATE DATABASE redmine CHARACTER SET utf8;
|
6
|
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
|
7
|
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
|
8
|
exit
|
9
|
|
10
|
if probleme of create user do this :
|
11
|
drop user redmine@localhost;
|
12
|
flush privileges;
|
13
|
TRY CREATE USER AGAIN
|
14
|
5)
|
15
|
nano /opt/redmine/redmine- tab tab/config/database.yml
|
16
|
|
17
|
production:
|
18
|
adapter: mysql2
|
19
|
database: redmine
|
20
|
host: localhost
|
21
|
username: redmine
|
22
|
password: pass
|
23
|
|
24
|
|
25
|
6) cd remine tab tab
|
26
|
7)bundle install
|
27
|
|
28
|
if probleme of bundler do this :
|
29
|
gem uninstall bundler -v ">= 2.0"
|
30
|
gem install bundler -v "< 2.0"
|
31
|
|
32
|
# Now you can use bundler as before
|
33
|
bundle install
|
34
|
8)
|
35
|
bundle exec rake generate_secret_token
|
36
|
9)
|
37
|
RAILS_ENV=production bundle exec rake db:migrate
|
38
|
|
39
|
if you get migration aborted error with mysql2
|
40
|
|
41
|
it's probably because of Mysql v8
|
42
|
|
43
|
SOLUTION :
|
44
|
- mysql -u root -p
|
45
|
- enter pass
|
46
|
- ALTER USER 'redmine'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YOUPASS';
|
47
|
- exit
|
48
|
NOTE : this works but it's less secure
|
49
|
|
50
|
Probleme and solution https://stackoverflow.com/questions/58339607/why-does-rails-fails-to-boot-with-expected-to-find-a-manifest-file-in-app-asse
|
51
|
10)
|
52
|
RAILS_ENV=production bundle exec rake redmine:load_default_data
|
53
|
11)
|
54
|
bundle exec ruby /usr/bin/rails server -b 127.0.0.1 webrick -e production
|
55
|
|
56
|
to expose the server
|
57
|
-bind port 3000 in virtual box
|
58
|
-bundle exec ruby /usr/bin/rails server -b 0.0.0.0 webrick -e production
|
59
|
|
60
|
access hostip:3000/redmine
|
61
|
12)
|
62
|
- cd /opt/
|
63
|
- chown -R www-data:www-data /opt/redmine
|
64
|
- cd /opt/redmine/redmine- tab tab
|
65
|
- chmod -R 755 files log tmp public/plugin_assets
|
66
|
- chown www-data:www-data Gemfile.lock
|
67
|
- ln -s /opt/redmine/redmine- tab tab/public/ /var/www/html/redmine
|
68
|
|
69
|
if public file exists :
|
70
|
mv /var/www/html/redmine/public/ /var/www/html/redmine/public_old
|
71
|
and try again
|
72
|
|
73
|
13) here
|
74
|
nano /etc/apache2/sites-available/master.conf
|
75
|
|
76
|
14)
|
77
|
<VirtualHost *:80>
|
78
|
ServerAdmin admin@example.com
|
79
|
Servername 0.0.0.0
|
80
|
DocumentRoot /var/www/html/
|
81
|
<Location /redmine>
|
82
|
RailsEnv production
|
83
|
RackBaseURL /redmine
|
84
|
Options -MultiViews
|
85
|
</Location>
|
86
|
</VirtualHost>
|
87
|
|
88
|
15)
|
89
|
a2dissite 000-default.conf ; a2ensite master.conf ; gedit /etc/apache2/mods-available/passenger.confg &>/dev/null
|
90
|
|
91
|
graphique
|
92
|
<IfModule mod_passenger.c>
|
93
|
PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
|
94
|
PassengerDefaultRuby /usr/bin/ruby
|
95
|
PassengerUser www-data
|
96
|
</IfModule>
|
97
|
|
98
|
|
99
|
16)
|
100
|
-service apache2 restart
|