passenger 5.0.14 → 5.0.15
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/CHANGELOG +9 -0
- data/INSTALL.md +1 -1
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/bin/passenger-install-apache2-module +6 -10
- data/bin/passenger-install-nginx-module +6 -9
- data/doc/CloudLicensingConfiguration.html +1 -216
- data/doc/CloudLicensingConfiguration.txt.md +1 -192
- data/doc/Design and Architecture.html +4 -4
- data/doc/Design and Architecture.txt +4 -4
- data/doc/ServerOptimizationGuide.html +1 -489
- data/doc/ServerOptimizationGuide.txt.md +1 -399
- data/doc/Users guide Apache.html +594 -6720
- data/doc/Users guide Apache.idmap.txt +15 -12
- data/doc/Users guide Apache.txt +113 -2047
- data/doc/Users guide Nginx.html +565 -6720
- data/doc/Users guide Nginx.idmap.txt +15 -12
- data/doc/Users guide Nginx.txt +94 -1862
- data/doc/Users guide Standalone.html +53 -2183
- data/doc/Users guide Standalone.idmap.txt +9 -6
- data/doc/Users guide Standalone.txt +16 -360
- data/doc/Users guide.html +3 -145
- data/doc/Users guide.txt +2 -54
- data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +36 -175
- data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +9 -215
- data/doc/users_guide_snippets/environment_variables.txt +11 -243
- data/doc/users_guide_snippets/installation.txt +66 -946
- data/doc/users_guide_snippets/rackup_specifications.txt +1 -75
- data/doc/users_guide_snippets/support_information.txt +1 -48
- data/doc/users_guide_snippets/tips.txt +103 -704
- data/doc/users_guide_snippets/troubleshooting/default.txt +16 -130
- data/doc/users_guide_snippets/troubleshooting/rails.txt +15 -12
- data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +2 -113
- data/ext/apache2/Configuration.hpp +2 -2
- data/ext/apache2/Hooks.cpp +2 -2
- data/ext/common/AgentsStarter.h +18 -10
- data/ext/common/ApplicationPool2/ErrorRenderer.h +0 -3
- data/ext/common/ApplicationPool2/Options.h +8 -1
- data/ext/common/Constants.h +3 -9
- data/ext/common/agent/Core/RequestHandler/InitRequest.cpp +2 -0
- data/ext/common/agent/Watchdog/Main.cpp +1 -1
- data/ext/nginx/ContentHandler.c +2 -3
- data/ext/nginx/config +2 -2
- data/lib/phusion_passenger.rb +1 -22
- data/lib/phusion_passenger/abstract_installer.rb +10 -10
- data/lib/phusion_passenger/config/agent_compiler.rb +5 -5
- data/lib/phusion_passenger/config/nginx_engine_compiler.rb +4 -4
- data/lib/phusion_passenger/config/validate_install_command.rb +3 -3
- data/lib/phusion_passenger/constants.rb +1 -5
- data/lib/phusion_passenger/loader_shared_helpers.rb +16 -5
- data/lib/phusion_passenger/platform_info/apache_detector.rb +2 -2
- data/lib/phusion_passenger/public_api.rb +11 -2
- data/lib/phusion_passenger/request_handler/thread_handler.rb +2 -3
- data/lib/phusion_passenger/ruby_core_io_enhancements.rb +4 -1
- data/lib/phusion_passenger/standalone/start_command.rb +1 -1
- data/resources/oss-binaries.phusionpassenger.com.crt +124 -0
- data/resources/templates/apache2/deployment_example.txt.erb +5 -23
- data/resources/templates/apache2/installing_against_a_different_apache.txt.erb +3 -4
- data/resources/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb +3 -3
- data/resources/templates/apache2/rpm_installation_recommended.txt.erb +1 -1
- data/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb +4 -5
- data/resources/templates/nginx/deployment_example.txt.erb +5 -17
- data/resources/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +3 -3
- data/resources/templates/standalone/config.erb +1 -1
- data/resources/templates/undisclosed_error.html.template +4 -11
- metadata +2 -2
- metadata.gz.asc +7 -7
@@ -1,261 +1,33 @@
|
|
1
1
|
=== Synopsis
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
The steps for upgrading or downgrading Phusion Passenger is almost the same as the steps for installing. All the installation guides in this section will also teach you how to upgrade and downgrade.
|
3
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/
|
6
4
|
|
7
5
|
|
8
6
|
[[install_osx_homebrew]]
|
9
7
|
=== Installing or upgrading on Mac OS X with Homebrew
|
10
8
|
|
11
|
-
|
12
|
-
Every time we release a new Phusion Passenger version, we make it available through link:http://brew.sh/[Homebrew]. Please note that the Homebrew maintainers have to merge our pull requests manually, so it may take a day or two before a new version shows up in the official Homebrew repository.
|
13
|
-
+
|
14
|
-
1. Update the Homebrew recipes:
|
15
|
-
+
|
16
|
-
---------------------------
|
17
|
-
brew update
|
18
|
-
---------------------------
|
19
|
-
2. Run one of the following, and follow the instructions:
|
20
|
-
+
|
21
|
-
ifdef::nginx[]
|
22
|
-
---------------------------
|
23
|
-
brew install passenger nginx --with-passenger
|
24
|
-
-OR-
|
25
|
-
brew upgrade passenger nginx --with-passenger
|
26
|
-
---------------------------
|
27
|
-
+
|
28
|
-
.Upgrade note
|
29
|
-
[NOTE]
|
30
|
-
=======================================
|
31
|
-
If Phusion Passenger has been updated, but no new Nginx version has been released, then you must also reinstall Nginx against the latest version of Phusion Passenger:
|
32
|
-
|
33
|
-
---------------------------
|
34
|
-
brew reinstall nginx --with-passenger
|
35
|
-
---------------------------
|
36
|
-
=======================================
|
37
|
-
endif::[]
|
38
|
-
ifdef::apache[]
|
39
|
-
---------------------------
|
40
|
-
brew install passenger
|
41
|
-
-OR-
|
42
|
-
brew upgrade passenger
|
43
|
-
---------------------------
|
44
|
-
endif::[]
|
45
|
-
ifdef::standalone[]
|
46
|
-
---------------------------
|
47
|
-
brew install passenger
|
48
|
-
-OR-
|
49
|
-
brew upgrade passenger
|
50
|
-
---------------------------
|
51
|
-
endif::[]
|
52
|
-
|
53
|
-
**Enterprise**::
|
54
|
-
link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] is currently not available through Homebrew. Please try one of the other installation methods instead.
|
9
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/
|
55
10
|
|
56
11
|
|
57
12
|
[[install_on_debian_ubuntu]]
|
58
13
|
=== Installing or upgrading on Debian or Ubuntu
|
59
14
|
|
60
|
-
|
61
|
-
|
62
|
-
If you use these packages to install Phusion Passenger then you do not need to run `passenger-install-apache2-module` or `passenger-install-nginx-module`. These packages contain all the binaries that you need.
|
63
|
-
|
64
|
-
Packages are available for the x86 and x86_64 architectures. Our policy is to support all Ubuntu LTS releases that are still supported by Canonical, plus the latest Ubuntu release, plus all Debian releases that are still supported by Debian.
|
15
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apt_repo/
|
65
16
|
|
66
17
|
[[install_add_apt_repo]]
|
67
18
|
==== Adding our APT repository
|
68
19
|
|
69
|
-
|
70
|
-
+
|
71
|
-
--------------------------------------------------------------
|
72
|
-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
|
73
|
-
--------------------------------------------------------------
|
74
|
-
|
75
|
-
2. Add HTTPS support for APT. Our APT repository is stored on an HTTPS server.
|
76
|
-
+
|
77
|
-
--------------------------------------------------------------
|
78
|
-
sudo apt-get install apt-transport-https ca-certificates
|
79
|
-
--------------------------------------------------------------
|
80
|
-
|
81
|
-
3. Create a file `/etc/apt/sources.list.d/passenger.list` and insert **one of** the following lines, depending on your distribution.
|
82
|
-
+
|
83
|
-
**Open source**:::
|
84
|
-
+
|
85
|
-
[source,sh]
|
86
|
-
--------------------------------------------------------------
|
87
|
-
##### !!!! Only add ONE of these lines, not all of them !!!! #####
|
88
|
-
# Ubuntu 15.04
|
89
|
-
deb https://oss-binaries.phusionpassenger.com/apt/passenger vivid main
|
90
|
-
# Ubuntu 14.04
|
91
|
-
deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main
|
92
|
-
# Ubuntu 12.04
|
93
|
-
deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main
|
94
|
-
# Debian 8
|
95
|
-
deb https://oss-binaries.phusionpassenger.com/apt/passenger jessie main
|
96
|
-
# Debian 7
|
97
|
-
deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main
|
98
|
-
# Debian 6
|
99
|
-
deb https://oss-binaries.phusionpassenger.com/apt/passenger squeeze main
|
100
|
-
--------------------------------------------------------------
|
101
|
-
+
|
102
|
-
**Enterprise**:::
|
103
|
-
+
|
104
|
-
[source,sh]
|
105
|
-
--------------------------------------------------------------
|
106
|
-
##### !!!! Only add ONE of these lines, not all of them !!!! #####
|
107
|
-
# Ubuntu 15.04
|
108
|
-
deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt vivid main
|
109
|
-
# Ubuntu 14.04
|
110
|
-
deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt trusty main
|
111
|
-
# Ubuntu 12.04
|
112
|
-
deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt precise main
|
113
|
-
# Debian 8
|
114
|
-
deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt jessie main
|
115
|
-
# Debian 7
|
116
|
-
deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt wheezy main
|
117
|
-
# Debian 6
|
118
|
-
deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt squeeze main
|
119
|
-
--------------------------------------------------------------
|
120
|
-
+
|
121
|
-
You can find the correct value for 'YOUR_DOWNLOAD_TOKEN' in the link:https://www.phusionpassenger.com/orders[Customer Area].
|
122
|
-
|
123
|
-
4. Secure `passenger.list` and update your APT cache:
|
124
|
-
+
|
125
|
-
--------------------------------------------------------------
|
126
|
-
sudo chown root: /etc/apt/sources.list.d/passenger.list
|
127
|
-
sudo chmod 600 /etc/apt/sources.list.d/passenger.list
|
128
|
-
sudo apt-get update
|
129
|
-
--------------------------------------------------------------
|
130
|
-
|
131
|
-
5. (Optional) If using `unattended-upgrades`, add our APT repository to the list of `Allowed-Origins` for upgrades, `/etc/apt/apt.conf.d/50unattended-upgrades`:
|
132
|
-
+
|
133
|
-
[source,sh]
|
134
|
-
--------------------------------------------------------------
|
135
|
-
// Automatically upgrade packages from these (origin:archive) pairs
|
136
|
-
Unattended-Upgrade::Allowed-Origins {
|
137
|
-
// To check "Origin:" and "Suite:", you could use e.g.:
|
138
|
-
// grep "Origin\|Suite" /var/lib/apt/lists/oss-binaries.phusionpassenger.com*
|
139
|
-
"Phusion:stable";
|
140
|
-
};
|
141
|
-
--------------------------------------------------------------
|
20
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apt_repo/
|
142
21
|
|
143
22
|
==== Installing packages
|
144
23
|
|
145
|
-
|
146
|
-
NOTE: You should install `nginx-extras` even if you have already installed an Nginx package from the official Debian/Ubuntu repository. This is because the Nginx binary that our packages supply is compiled with the Passenger module.
|
147
|
-
endif::nginx[]
|
148
|
-
|
149
|
-
**Open source**::
|
150
|
-
+
|
151
|
-
1. <<install_add_apt_repo,Add our APT repository.>>
|
152
|
-
ifdef::nginx[]
|
153
|
-
2. Install the packages:
|
154
|
-
+
|
155
|
-
--------------------------------------------------------------
|
156
|
-
sudo apt-get install nginx-extras passenger
|
157
|
-
--------------------------------------------------------------
|
158
|
-
+
|
159
|
-
3. Edit `/etc/nginx/nginx.conf` and uncomment `passenger_root` and `passenger_ruby`.
|
160
|
-
+
|
161
|
-
Especially <<PassengerRoot,passenger_root>> is important: Phusion Passenger won't work without it! If you don't see a commented version of `passenger_root` inside nginx.conf, then you need to <<inserting_passenger_root_for_apt,insert it yourself>>.
|
162
|
-
+
|
163
|
-
4. Restart Nginx:
|
164
|
-
+
|
165
|
-
--------------------------------------------------------------
|
166
|
-
sudo service nginx restart
|
167
|
-
--------------------------------------------------------------
|
168
|
-
endif::[]
|
169
|
-
ifdef::apache[]
|
170
|
-
2. Install the package:
|
171
|
-
+
|
172
|
-
--------------------------------------------------------------
|
173
|
-
sudo apt-get install libapache2-mod-passenger
|
174
|
-
--------------------------------------------------------------
|
175
|
-
+
|
176
|
-
3. Enable the Phusion Passenger Apache module and stop/start Apache (reload or restart is not enough when upgrading):
|
177
|
-
+
|
178
|
-
--------------------------------------------------------------
|
179
|
-
sudo a2enmod passenger
|
180
|
-
sudo apache2ctl stop; sudo apache2ctl start
|
181
|
-
--------------------------------------------------------------
|
182
|
-
endif::[]
|
183
|
-
ifdef::standalone[]
|
184
|
-
2. Install the package:
|
185
|
-
+
|
186
|
-
--------------------------------------------------------------
|
187
|
-
sudo apt-get install passenger
|
188
|
-
--------------------------------------------------------------
|
189
|
-
endif::[]
|
190
|
-
|
191
|
-
**Enterprise**::
|
192
|
-
+
|
193
|
-
1. Download your license key from the link:https://www.phusionpassenger.com/orders[Customer Area] and save it as `/etc/passenger-enterprise-license`.
|
194
|
-
2. <<install_add_apt_repo,Add our APT repository.>>
|
195
|
-
3. Install the packages:
|
196
|
-
+
|
197
|
-
ifdef::nginx[]
|
198
|
-
--------------------------------------------------------------
|
199
|
-
sudo apt-get install nginx-extras passenger-enterprise
|
200
|
-
--------------------------------------------------------------
|
201
|
-
4. Edit `/etc/nginx/nginx.conf` and uncomment `passenger_root` and `passenger_ruby`.
|
202
|
-
+
|
203
|
-
Especially <<PassengerRoot,passenger_root>> is important: Phusion Passenger won't work without it! If you don't see a commented version of `passenger_root` inside nginx.conf, then you need to <<inserting_passenger_root_for_apt,insert it yourself>>.
|
204
|
-
+
|
205
|
-
5. Restart Nginx:
|
206
|
-
+
|
207
|
-
--------------------------------------------------------------
|
208
|
-
sudo service nginx restart
|
209
|
-
--------------------------------------------------------------
|
210
|
-
endif::[]
|
211
|
-
ifdef::apache[]
|
212
|
-
--------------------------------------------------------------
|
213
|
-
sudo apt-get install libapache2-mod-passenger-enterprise
|
214
|
-
--------------------------------------------------------------
|
215
|
-
+
|
216
|
-
4. Enable the Phusion Passenger Apache module and stop/start Apache (reload or restart is not enough when upgrading):
|
217
|
-
+
|
218
|
-
--------------------------------------------------------------
|
219
|
-
sudo a2enmod passenger
|
220
|
-
sudo apache2ctl stop; sudo apache2ctl start
|
221
|
-
--------------------------------------------------------------
|
222
|
-
endif::[]
|
223
|
-
ifdef::standalone[]
|
224
|
-
--------------------------------------------------------------
|
225
|
-
sudo apt-get install passenger-enterprise
|
226
|
-
--------------------------------------------------------------
|
227
|
-
endif::[]
|
228
|
-
|
229
|
-
You can now proceed with a chapter for Deploying your (specific type of) application.
|
24
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apt_repo/
|
230
25
|
|
231
26
|
ifdef::nginx[]
|
232
27
|
[[inserting_passenger_root_for_apt]]
|
233
28
|
==== Inserting `passenger_root` into nginx.conf
|
234
29
|
|
235
|
-
|
236
|
-
|
237
|
-
First, run the following command and take note of its output:
|
238
|
-
|
239
|
-
-----------------------------------
|
240
|
-
/usr/bin/passenger-config --root
|
241
|
-
-----------------------------------
|
242
|
-
|
243
|
-
Next, insert the following snippet into `/etc/nginx/nginx.conf`, under the `http` block:
|
244
|
-
|
245
|
-
-------------------------------------------------------------
|
246
|
-
passenger_root whatever_value_you_got_from_previous_command;
|
247
|
-
-------------------------------------------------------------
|
248
|
-
|
249
|
-
Here is an example:
|
250
|
-
|
251
|
-
-------------------------------------------------------------
|
252
|
-
...
|
253
|
-
http {
|
254
|
-
# path-to-locations.ini is given to you by `passenger-config --root`.
|
255
|
-
passenger_root /path-to-locations.ini;
|
256
|
-
...
|
257
|
-
}
|
258
|
-
-------------------------------------------------------------
|
30
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_root
|
259
31
|
|
260
32
|
endif::nginx[]
|
261
33
|
|
@@ -263,140 +35,16 @@ endif::nginx[]
|
|
263
35
|
[[installing_or_upgrading_on_red_hat]]
|
264
36
|
=== Installing or upgrading on Red Hat or CentOS
|
265
37
|
|
266
|
-
|
267
|
-
|
268
|
-
If you use these packages to install Phusion Passenger then you do not need to run `passenger-install-apache2-module` or `passenger-install-nginx-module`. These packages contain all the binaries that you need. These packages also come with SELinux policy modules so that Passenger works nicely with SELinux.
|
269
|
-
|
270
|
-
Packages are available for the x86 and x86_64 architectures. Our policy is to support all Red Hat and CentOS releases that still receive full updates by their vendors. The earliest Red Hat and CentOS version we support is version 5.
|
38
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/yum_repo/
|
271
39
|
|
272
40
|
[[install_add_yum_repo]]
|
273
41
|
==== Adding our YUM repository
|
274
42
|
|
275
|
-
|
276
|
-
+
|
277
|
-
--------------------------------------------------------------
|
278
|
-
sudo yum install epel-release pygpgme curl
|
279
|
-
--------------------------------------------------------------
|
280
|
-
|
281
|
-
2. Download the Passenger YUM repository definition.
|
282
|
-
+
|
283
|
-
**Open source**::
|
284
|
-
+
|
285
|
-
--------------------------------------------------------------
|
286
|
-
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
|
287
|
-
--------------------------------------------------------------
|
288
|
-
+
|
289
|
-
**Enterprise**::
|
290
|
-
+
|
291
|
-
--------------------------------------------------------------
|
292
|
-
unset HISTFILE
|
293
|
-
sudo curl --fail -sSL -u download:YOUR_DOWNLOAD_TOKEN -o /etc/yum.repos.d/passenger.repo https://www.phusionpassenger.com/enterprise_yum/el-passenger-enterprise.repo
|
294
|
-
--------------------------------------------------------------
|
295
|
-
+
|
296
|
-
The `unset HISTFILE` command ensures that your download token isn't saved to the Bash history file.
|
297
|
-
+
|
298
|
-
You can find the correct value for 'YOUR_DOWNLOAD_TOKEN' in the link:https://www.phusionpassenger.com/orders[Customer Area].
|
299
|
-
|
300
|
-
3. Secure `passenger.repo`:
|
301
|
-
+
|
302
|
-
--------------------------------------------------------------
|
303
|
-
sudo chown root: /etc/yum.repos.d/passenger.repo
|
304
|
-
sudo chmod 600 /etc/yum.repos.d/passenger.repo
|
305
|
-
--------------------------------------------------------------
|
43
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/yum_repo/
|
306
44
|
|
307
45
|
==== Installing packages
|
308
46
|
|
309
|
-
|
310
|
-
[NOTE]
|
311
|
-
====================================================
|
312
|
-
If you are on Red Hat 6 or CentOS 6, and you are also using SELinux in enforcing mode, then Passenger requires kernel >= 2.6.39.
|
313
|
-
|
314
|
-
If you want to install Passenger on Red Hat 6 or CentOS 6, without upgrading your kernel, then you must *disable* SELinux completely. Edit `/etc/selinux/config`, set `SELINUX=disabled` and reboot. Note that merely setting SELinux to permissive mode is not enough.
|
315
|
-
|
316
|
-
This issue does not apply to Red Hat >= 7 and CentOS >= 7, because these OS versions supply recent enough kernel versions.
|
317
|
-
====================================================
|
318
|
-
|
319
|
-
You can install the Passenger packages as follows.
|
320
|
-
|
321
|
-
**Open source**::
|
322
|
-
+
|
323
|
-
1. <<install_add_yum_repo,Add our YUM repository.>>
|
324
|
-
ifdef::nginx[]
|
325
|
-
2. Install the packages:
|
326
|
-
+
|
327
|
-
--------------------------------------------------------------
|
328
|
-
sudo yum install nginx passenger
|
329
|
-
--------------------------------------------------------------
|
330
|
-
+
|
331
|
-
3. Edit `/etc/nginx/conf.d/passenger.conf` and uncomment `passenger_root`, `passenger_ruby` and `passenger_instance_registry_dir`.
|
332
|
-
+
|
333
|
-
Especially <<PassengerRoot,passenger_root>> is important: Phusion Passenger won't work without it!
|
334
|
-
+
|
335
|
-
4. Restart Nginx:
|
336
|
-
+
|
337
|
-
--------------------------------------------------------------
|
338
|
-
sudo service nginx restart
|
339
|
-
--------------------------------------------------------------
|
340
|
-
endif::[]
|
341
|
-
ifdef::apache[]
|
342
|
-
2. Install the package:
|
343
|
-
+
|
344
|
-
--------------------------------------------------------------
|
345
|
-
sudo yum install mod_passenger
|
346
|
-
--------------------------------------------------------------
|
347
|
-
+
|
348
|
-
3. Stop/start Apache (reload or restart is not enough when upgrading):
|
349
|
-
+
|
350
|
-
--------------------------------------------------------------
|
351
|
-
sudo service httpd stop; sudo service httpd start
|
352
|
-
--------------------------------------------------------------
|
353
|
-
endif::[]
|
354
|
-
ifdef::standalone[]
|
355
|
-
2. Install the package:
|
356
|
-
+
|
357
|
-
--------------------------------------------------------------
|
358
|
-
sudo yum install passenger
|
359
|
-
--------------------------------------------------------------
|
360
|
-
endif::[]
|
361
|
-
|
362
|
-
**Enterprise**::
|
363
|
-
+
|
364
|
-
1. Download your license key from the link:https://www.phusionpassenger.com/orders[Customer Area] and save it as `/etc/passenger-enterprise-license`.
|
365
|
-
2. <<install_add_yum_repo,Add our YUM repository.>>
|
366
|
-
3. Install the packages:
|
367
|
-
+
|
368
|
-
ifdef::nginx[]
|
369
|
-
--------------------------------------------------------------
|
370
|
-
sudo yum install nginx passenger-enterprise
|
371
|
-
--------------------------------------------------------------
|
372
|
-
4. Edit `/etc/nginx/conf.d/passenger.conf` and uncomment `passenger_root`, `passenger_ruby` and `passenger_instance_registry_dir`.
|
373
|
-
+
|
374
|
-
Especially <<PassengerRoot,passenger_root>> is important: Phusion Passenger won't work without it!
|
375
|
-
+
|
376
|
-
5. Restart Nginx:
|
377
|
-
+
|
378
|
-
--------------------------------------------------------------
|
379
|
-
sudo service nginx restart
|
380
|
-
--------------------------------------------------------------
|
381
|
-
endif::[]
|
382
|
-
ifdef::apache[]
|
383
|
-
--------------------------------------------------------------
|
384
|
-
sudo yum install mod_passenger_enterprise
|
385
|
-
--------------------------------------------------------------
|
386
|
-
+
|
387
|
-
4. Stop/start Apache (reload or restart is not enough when upgrading):
|
388
|
-
+
|
389
|
-
--------------------------------------------------------------
|
390
|
-
sudo service httpd stop; sudo service httpd start
|
391
|
-
--------------------------------------------------------------
|
392
|
-
endif::[]
|
393
|
-
ifdef::standalone[]
|
394
|
-
--------------------------------------------------------------
|
395
|
-
sudo yum install passenger-enterprise
|
396
|
-
--------------------------------------------------------------
|
397
|
-
endif::[]
|
398
|
-
|
399
|
-
You can now proceed with a chapter for Deploying your (specific type of) application.
|
47
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/yum_repo/
|
400
48
|
|
401
49
|
|
402
50
|
=== Installing or upgrading on Heroku
|
@@ -407,702 +55,174 @@ Please refer to our link:https://github.com/phusion/passenger-ruby-heroku-demo#r
|
|
407
55
|
[[rubygems_generic_install]]
|
408
56
|
=== Generic installation, upgrade and downgrade method: via RubyGems
|
409
57
|
|
410
|
-
|
411
|
-
|
412
|
-
[[is_ruby_home_or_system_wide_installed]]
|
413
|
-
[float]
|
414
|
-
==== Step 1: figuring out whether your Ruby is installed in the home directory or system-wide
|
415
|
-
|
416
|
-
Ruby may either be installed in the home directory, or system-wide. If it's installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user.
|
417
|
-
|
418
|
-
To find out which case applies, run the following command to find out where the `ruby` command is:
|
419
|
-
|
420
|
-
--------------
|
421
|
-
which ruby
|
422
|
-
--------------
|
423
|
-
|
424
|
-
Do you see a filename that references '/home' or '/Users'? If so then your Ruby interpreter is installed in your home directory and you can proceed to step 2. Otherwise, you need to switch to a root prompt by running one of the following commands:
|
425
|
-
|
426
|
-
* Are you using RVM? Run `rvmsudo -H bash`
|
427
|
-
* Are you not using RVM, or do you not know what RVM is? Run `sudo -H -s`
|
428
|
-
* Is 'sudo' not installed on your system? Run `su -c bash`
|
429
|
-
|
430
|
-
You must maintain this root prompt throughout this installation guide.
|
431
|
-
|
432
|
-
[float]
|
433
|
-
==== Step 2: install the gem
|
434
|
-
|
435
|
-
**Open Source**::
|
436
|
-
Install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:
|
437
|
-
+
|
438
|
-
----------------------
|
439
|
-
gem install passenger
|
440
|
-
----------------------
|
441
|
-
+
|
442
|
-
.Previous versions and beta versions
|
443
|
-
********************************************************
|
444
|
-
Sometimes you will want to obtain the latest beta version of Phusion Passenger. Beta versions are not normally selected by `gem install`, so to opt-in for beta versions you have to add the `--pre` argument:
|
445
|
-
|
446
|
-
-----------------------------------
|
447
|
-
gem install passenger --pre
|
448
|
-
-----------------------------------
|
449
|
-
|
450
|
-
If you want to obtain a specific version of Phusion Passenger, e.g. because you are downgrading, then specify the version number with `--version`:
|
451
|
-
|
452
|
-
-----------------------------------
|
453
|
-
gem install passenger --version 3.0.0
|
454
|
-
-----------------------------------
|
455
|
-
|
456
|
-
If you want to obtain a specific *beta* version of Phusion Passenger then you must also pass `--pre`:
|
457
|
-
|
458
|
-
----------------------------------------------------
|
459
|
-
gem install passenger --version 3.9.1.beta --pre
|
460
|
-
----------------------------------------------------
|
461
|
-
********************************************************
|
462
|
-
|
463
|
-
**Enterprise**::
|
464
|
-
First, download the *license key* from the link:https://www.phusionpassenger.com/orders[Customer Area] and save it as `/etc/passenger-enterprise-license`.
|
465
|
-
+
|
466
|
-
Next, add the Phusion Passenger Enterprise gem server to your RubyGems source list:
|
467
|
-
+
|
468
|
-
------------------------------------------
|
469
|
-
gem source --add https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_gems/
|
470
|
-
------------------------------------------
|
471
|
-
+
|
472
|
-
Substitute 'YOUR_DOWNLOAD_TOKEN' with the one you find in the link:https://www.phusionpassenger.com/orders[Customer Area]. And notice the **trailing slash** in the URL! It is very important.
|
473
|
-
+
|
474
|
-
Finally, install the latest gem to obtain the files for the latest stable version of Passenger Enterprise:
|
475
|
-
+
|
476
|
-
----------------------
|
477
|
-
gem install passenger-enterprise-server
|
478
|
-
----------------------
|
479
|
-
+
|
480
|
-
.Previous versions and beta versions
|
481
|
-
********************************************************
|
482
|
-
Sometimes you will want to obtain the latest beta version of Phusion Passenger Enterprise. Beta versions are not normally selected by `gem install`, so to opt-in for beta versions you have to add the `--pre` argument:
|
483
|
-
|
484
|
-
-----------------------------------
|
485
|
-
gem install passenger-enterprise-server --pre
|
486
|
-
-----------------------------------
|
487
|
-
|
488
|
-
If you want to obtain a specific version of Phusion Passenger Enterprise, e.g. because you are downgrading, then specify the version number with `--version`:
|
489
|
-
|
490
|
-
-----------------------------------
|
491
|
-
gem install passenger-enterprise-server --version 3.0.0
|
492
|
-
-----------------------------------
|
493
|
-
|
494
|
-
If you want to obtain a specific *beta* version of Phusion Passenger then you must also pass `--pre`:
|
495
|
-
|
496
|
-
----------------------------------------------------
|
497
|
-
gem install passenger-enterprise-server --version 3.9.1.beta --pre
|
498
|
-
----------------------------------------------------
|
499
|
-
********************************************************
|
500
|
-
|
501
|
-
ifndef::standalone[]
|
502
|
-
[[run_passenger_installer]]
|
503
|
-
[float]
|
504
|
-
==== Step 3: run the Phusion Passenger installer
|
505
|
-
|
506
|
-
:gem: true
|
507
|
-
include::installation/run_installer.txt[]
|
508
|
-
|
509
|
-
:gem!:
|
510
|
-
|
511
|
-
[float]
|
512
|
-
==== Step 4: restarting the Flying Passenger daemon
|
513
|
-
|
514
|
-
If you are using <<flying_passenger,Flying Passenger>> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:
|
515
|
-
|
516
|
-
-------------------------------
|
517
|
-
kill `cat /path-to/flying-passenger.pid`
|
518
|
-
-------------------------------
|
519
|
-
|
520
|
-
Or, if Flying Passenger is not running with a PID file, look up its PID us `ps` and then send it SIGTERM:
|
521
|
-
|
522
|
-
-------------------------------
|
523
|
-
ps aux | grep flying-passenger
|
524
|
-
kill PID_OF_FLYING_PASSENGER
|
525
|
-
-------------------------------
|
526
|
-
|
527
|
-
[[verify_passenger_running]]
|
528
|
-
[float]
|
529
|
-
==== Step 5: verifying that Phusion Passenger is running
|
530
|
-
|
531
|
-
Restart your web server and run:
|
532
|
-
|
533
|
-
---------------------------
|
534
|
-
passenger-memory-stats
|
535
|
-
---------------------------
|
536
|
-
|
537
|
-
include::installation/verify_running_epilogue.txt[]
|
538
|
-
|
539
|
-
endif::[]
|
58
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/
|
540
59
|
|
541
60
|
|
542
61
|
[[tarball_generic_install]]
|
543
62
|
=== Generic installation, upgrade and downgrade method: via tarball
|
544
63
|
|
545
|
-
|
546
|
-
==== Step 1: installing Ruby
|
547
|
-
|
548
|
-
Phusion Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install Ruby.
|
549
|
-
|
550
|
-
Even though Ruby is required, Ruby will normally not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger. Phusion Passenger's dependency on Ruby is very minimal. See <<relationship_with_ruby,Phusion Passenger and its relationship with Ruby>> for details.
|
551
|
-
|
552
|
-
|==========================================================
|
553
|
-
| Debian, Ubuntu | `sudo apt-get update` +
|
554
|
-
`sudo apt-get install ruby rake`
|
555
|
-
| Red Hat, CentOS, ScientificLinux, Amazon Linux | Enable link:http://fedoraproject.org/wiki/EPEL[EPEL], then run as root: +
|
556
|
-
`yum install ruby rubygem-rake`
|
557
|
-
| Mac OS X | No action needed. Ruby is installed by default.
|
558
|
-
| Other operating systems | Install Ruby from link:http://www.ruby-lang.org/[the Ruby website].
|
559
|
-
|==========================================================
|
560
|
-
|
561
|
-
[float]
|
562
|
-
==== Step 2: download and extract the tarball
|
64
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/
|
563
65
|
|
564
|
-
**Open Source**::
|
565
|
-
Download the open source Phusion Passenger tarball from link:https://www.phusionpassenger.com/download#open_source[the Phusion Passenger website].
|
566
|
-
+
|
567
|
-
Older versions can be found in link:https://www.phusionpassenger.com/file_releases[the release archive].
|
568
66
|
|
569
|
-
|
570
|
-
link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customers can download the Phusion Passenger Enterprise tarball from the link:https://www.phusionpassenger.com/orders[Customer Area].
|
571
|
-
+
|
572
|
-
Also be sure to download the *license key* and save it as `/etc/passenger-enterprise-license`.
|
573
|
-
|
574
|
-
Once you have downloaded the tarball, pick a location to extract it to. You can pick any location. A good location is '/opt/passenger'. Create this directory and extract the tarball as follows:
|
575
|
-
|
576
|
-
--------------------------------------------------
|
577
|
-
mkdir /opt/passenger
|
578
|
-
cd /opt/passenger
|
579
|
-
tar xzvf /location-to/passenger-x.x.x.tar.gz
|
580
|
-
cd /opt/passenger/passenger-x.x.x
|
581
|
-
--------------------------------------------------
|
582
|
-
|
583
|
-
Note that `passenger-x.x.x` should be `passenger-enterprise-server-x.x.x` if you're using Phusion Passenger Enterprise.
|
584
|
-
|
585
|
-
ifdef::standalone[]
|
586
|
-
[float]
|
587
|
-
==== Step 3: adding the Phusion Passenger tools to PATH
|
588
|
-
|
589
|
-
Edit `/etc/bashrc` (or `/etc/bash.bashrc` on some systems) and append the following to the end of the file:
|
590
|
-
|
591
|
-
---------------------
|
592
|
-
export PATH=/opt/passenger/passenger-x.x.x/bin:$PATH
|
593
|
-
---------------------
|
594
|
-
|
595
|
-
Finally, restart all your shell sessions in order to activate this change. The installation is now complete.
|
596
|
-
|
597
|
-
endif::[]
|
598
|
-
|
599
|
-
ifndef::standalone[]
|
600
|
-
[float]
|
601
|
-
==== Step 3: run the Phusion Passenger installer
|
602
|
-
|
603
|
-
:tarball: true
|
604
|
-
include::installation/run_installer.txt[]
|
605
|
-
|
606
|
-
:tarball!:
|
607
|
-
|
608
|
-
ifdef::nginx[]
|
609
|
-
[float]
|
610
|
-
==== Step 4: restarting the Flying Passenger daemon
|
611
|
-
|
612
|
-
If you are using <<flying_passenger,Flying Passenger>> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:
|
613
|
-
|
614
|
-
-------------------------------
|
615
|
-
kill `cat /path-to/flying-passenger.pid`
|
616
|
-
-------------------------------
|
617
|
-
|
618
|
-
Or, if Flying Passenger is not running with a PID file, look up its PID us `ps` and then send it SIGTERM:
|
619
|
-
|
620
|
-
-------------------------------
|
621
|
-
ps aux | grep flying-passenger
|
622
|
-
kill PID_OF_FLYING_PASSENGER
|
623
|
-
-------------------------------
|
624
|
-
endif::[]
|
67
|
+
=== Upgrading from open source to Enterprise
|
625
68
|
|
626
|
-
[float]
|
627
69
|
ifdef::apache[]
|
628
|
-
|
70
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/upgrading_from_oss_to_enterprise.html
|
629
71
|
endif::[]
|
630
72
|
ifdef::nginx[]
|
631
|
-
|
73
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/upgrading_from_oss_to_enterprise.html
|
632
74
|
endif::[]
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
---------------------------
|
637
|
-
./bin/passenger-memory-stats
|
638
|
-
---------------------------
|
639
|
-
|
640
|
-
include::installation/verify_running_epilogue.txt[]
|
641
|
-
|
75
|
+
ifdef::standalone[]
|
76
|
+
This documentation has moved. https://www.phusionpassenger.com/library/install/standalone/upgrading_from_oss_to_enterprise.html
|
642
77
|
endif::[]
|
643
78
|
|
644
79
|
|
645
|
-
=== Upgrading from open source to Enterprise
|
646
|
-
|
647
|
-
Phusion Passenger comes in two variants: an open source version, as well as an link:https://www.phusionpassenger.com/enterprise[Enterprise version] which introduces a myriad of useful features that can improve stability and performance and efficiency.
|
648
|
-
|
649
|
-
Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows:
|
650
|
-
|
651
|
-
1. <<uninstalling,Uninstall the open source Phusion Passenger>>.
|
652
|
-
2. Install the Enterprise version by following one of the installation guides in this section (e.g. <<rubygems_generic_install,RubyGems generic installation>> or <<tarball_generic_install,tarball generic installation>>).
|
653
|
-
|
654
|
-
The uninstallation is necessary because the Enterprise Ruby gem has a different gem name ('passenger-enterprise-server' instead of 'passenger'), but the same administration command names (e.g. `passenger-status`). Uninstalling the open source version avoids any conflicts.
|
655
|
-
|
656
|
-
|
657
80
|
=== Cryptographic verification of installation files
|
658
81
|
|
659
82
|
==== Synopsis
|
660
83
|
|
661
|
-
|
84
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/crypto_verify_install.html
|
662
85
|
|
663
86
|
==== Importing the Phusion Software Signing key
|
664
87
|
|
665
|
-
|
666
|
-
|
667
|
-
Phusion Software Signing (software-signing@phusion.nl)
|
668
|
-
Short key ID: 0x0A212A8C
|
669
|
-
Long key ID: 0x2AC745A50A212A8C
|
670
|
-
Fingerprint: D5F0 8514 2693 9232 F437 AB72 2AC7 45A5 0A21 2A8C
|
671
|
-
|
672
|
-
This key is stored at link:http://www.phusion.nl/about/gpg[the Phusion website] and at the key servers link:http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x2AC745A50A212A8C[sks-keyservers.net] and link:http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2AC745A50A212A8C[keyserver.ubuntu.com]. You can import it to your keyring with one of these command:
|
673
|
-
|
674
|
-
-------------------------------------------------------------------------
|
675
|
-
gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C
|
676
|
-
# -OR-
|
677
|
-
gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C
|
678
|
-
-------------------------------------------------------------------------
|
679
|
-
|
680
|
-
The Phusion Software Signing key is only used for signing software. It's never used for signing emails or for encrypting files, so please be suspicious if you encounter usage of this key outside the context of signing software, and alert us at support@phusion.nl. Include "notspam" in the message to bypass our spam filter.
|
681
|
-
|
682
|
-
The email address software-signing@phusion.nl redirects to info@phusion.nl so it's safe to send email there.
|
88
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/crypto_verify_install.html
|
683
89
|
|
684
90
|
==== Verifying the Phusion Software Signing key
|
685
91
|
|
686
|
-
|
687
|
-
|
688
|
-
Hongli Lai (hongli@phusion.nl)
|
689
|
-
Short key ID: 8C59158F
|
690
|
-
Long key ID: CD70085E8C59158F
|
691
|
-
Fingerprint: 218A 7255 83D0 2ECE F3A9 C2A7 CD70 085E 8C59 158F
|
692
|
-
|
693
|
-
Ninh Bui (ninh@phusion.nl)
|
694
|
-
Short key ID: 69481265
|
695
|
-
Long key ID: AE405F7869481265
|
696
|
-
Fingerprint: A77C 9CEF 766D 0E7D A95B 8778 AE40 5F78 6948 1265
|
697
|
-
|
698
|
-
Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with:
|
699
|
-
|
700
|
-
------------------------------------------
|
701
|
-
gpg --keyserver pool.sks-servers.net --search-keys 0xCD70085E8C59158F
|
702
|
-
gpg --keyserver pool.sks-servers.net --search-keys 0xAE405F7869481265
|
703
|
-
# -OR-
|
704
|
-
gpg --keyserver keyserver.ubuntu.com --search-keys 0xCD70085E8C59158F
|
705
|
-
gpg --keyserver keyserver.ubuntu.com --search-keys 0xAE405F7869481265
|
706
|
-
------------------------------------------
|
92
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/crypto_verify_install.html
|
707
93
|
|
708
94
|
==== Verifying the gem and tarball
|
709
95
|
|
710
|
-
|
711
|
-
|
712
|
-
-----------------------------------------
|
713
|
-
$ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz
|
714
|
-
gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C
|
715
|
-
gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"
|
716
|
-
-----------------------------------------
|
96
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/crypto_verify_install.html
|
717
97
|
|
718
98
|
==== Verifying Git signatures
|
719
99
|
|
720
|
-
|
721
|
-
|
722
|
-
-------------------------------------------------------
|
723
|
-
$ git tag --verify release-x.x.x
|
724
|
-
object d886f34b5705e4314feccaf0d77b9a38416e15e0
|
725
|
-
type commit
|
726
|
-
tag release-4.0.0.rc5
|
727
|
-
tagger Hongli Lai (Phusion) <hongli@phusion.nl> 1362993117 +0100
|
728
|
-
|
729
|
-
This is a tag message.
|
730
|
-
gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C
|
731
|
-
gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"
|
732
|
-
-------------------------------------------------------
|
100
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/crypto_verify_install.html
|
733
101
|
|
734
102
|
==== Verifying Debian packages
|
735
103
|
|
736
|
-
|
104
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/crypto_verify_install.html
|
737
105
|
|
738
106
|
==== Verifying RPM packages
|
739
107
|
|
740
|
-
|
108
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/crypto_verify_install.html
|
741
109
|
|
742
110
|
==== Revocation
|
743
111
|
|
744
|
-
|
745
|
-
|
746
|
-
-------------------------------------------------------
|
747
|
-
gpg --refresh-keys --keyserver pool.sks-servers.net
|
748
|
-
# -OR-
|
749
|
-
gpg --refresh-keys --keyserver keyserver.ubuntu.com
|
750
|
-
-------------------------------------------------------
|
751
|
-
|
752
|
-
If you installed Phusion Passenger through our APT repository, then you should update APT's keyring from time to time as well:
|
753
|
-
|
754
|
-
-------------------------------------------------------
|
755
|
-
sudo apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com
|
756
|
-
-------------------------------------------------------
|
112
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/crypto_verify_install.html
|
757
113
|
|
758
114
|
|
759
115
|
ifndef::standalone[]
|
760
116
|
=== Non-interactive, automatic, headless installs or upgrades
|
761
117
|
|
762
118
|
ifdef::apache[]
|
763
|
-
|
119
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/noninteractive_install.html
|
764
120
|
endif::[]
|
765
121
|
ifdef::nginx[]
|
766
|
-
|
122
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/noninteractive_install.html
|
767
123
|
endif::[]
|
768
124
|
endif::[]
|
769
125
|
|
770
126
|
|
771
127
|
=== Customizing the compilation process
|
772
128
|
|
773
|
-
|
129
|
+
ifdef::apache[]
|
130
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/customizing_compilation_process.html
|
131
|
+
endif::[]
|
132
|
+
ifdef::nginx[]
|
133
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/customizing_compilation_process.html
|
134
|
+
endif::[]
|
774
135
|
|
775
136
|
==== Setting the compiler
|
776
137
|
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
export CC='ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
|
784
|
-
export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
|
785
|
-
----------------------
|
786
|
-
|
787
|
-
NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <<env_vars_and_sudo,Environment variables and sudo>>.
|
138
|
+
ifdef::apache[]
|
139
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/customizing_compilation_process.html
|
140
|
+
endif::[]
|
141
|
+
ifdef::nginx[]
|
142
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/customizing_compilation_process.html
|
143
|
+
endif::[]
|
788
144
|
|
789
145
|
==== Adding additional compiler or linker flags
|
790
146
|
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
`EXTRA_PRE_CXXFLAGS`::
|
798
|
-
Similar to `EXTRA_PRE_CFLAGS`, but for C++ compiler invocations.
|
799
|
-
`EXTRA_CXXFLAGS`::
|
800
|
-
Similar to `EXTRA_CFLAGS`, but for C++ compiler invocations.
|
801
|
-
`EXTRA_PRE_LDFLAGS`::
|
802
|
-
These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, but after `EXTRA_PRE_CFLAGS`/`EXTRA_PRE_CXXFLAGS`.
|
803
|
-
`EXTRA_PRE_C_LDFLAGS`::
|
804
|
-
These flags are injected into all C compiler invocations that involve linking, right after `EXTRA_PRE_LDFLAGS`.
|
805
|
-
`EXTRA_PRE_CXX_LDFLAGS`::
|
806
|
-
Similar to `EXTRA_PRE_CXX_LDFLAGS`, but for C++ compiler invocations.
|
807
|
-
`EXTRA_LDFLAGS`::
|
808
|
-
Similar to `EXTRA_PRE_LDFLAGS`, but injected at the very end of the command string, even after `EXTRA_CFLAGS` and `EXTRA_CXXFLAGS`.
|
809
|
-
`EXTRA_C_LDFLAGS`::
|
810
|
-
Similar to `EXTRA_LDFLAGS`, but only injected for C executable linking commands. Injected right after `EXTRA_LDFLAGS`.
|
811
|
-
`EXTRA_CXX_LDFLAGS`::
|
812
|
-
Similar to `EXTRA_LDFLAGS`, but only injected for C++ executable linking commands. Injected right after `EXTRA_LDFLAGS`.
|
813
|
-
`PASSENGER_THREAD_LOCAL_STORAGE`::
|
814
|
-
Setting this to 1 will enable the `PASSENGER_THREAD_LOCAL_STORAGE` macro, which forcefully disables the use of thread-local storage inside the Phusion Passenger codebase. Setting this environment variable is useful on systems that have broken support for thread-local storage, despite passing our build system's check for proper thread-local storage support. At the time of writing, one user has reported that Ubuntu 12.04 32-bit has broken thread-local storage report although neither the reporter nor us were able to reproduce the problem on any other systems running Ubuntu 12.04 32-bit. Note that this flag has no effect on non-Phusion Passenger code.
|
815
|
-
|
816
|
-
NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <<env_vars_and_sudo,Environment variables and sudo>>.
|
147
|
+
ifdef::apache[]
|
148
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/customizing_compilation_process.html
|
149
|
+
endif::[]
|
150
|
+
ifdef::nginx[]
|
151
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/customizing_compilation_process.html
|
152
|
+
endif::[]
|
817
153
|
|
818
154
|
[[forcing_location_of_command_line_tools_and_dependencies]]
|
819
155
|
==== Forcing location of command line tools and dependencies
|
820
156
|
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
`APXS2`::
|
828
|
-
The location of the `apxs2` executable (the Apache module developer tool). Only used by `passenger-install-apache2-module`.
|
829
|
-
+
|
830
|
-
This environment variable, together with `HTTPD`, are what you need to customize if you have multiple Apache installations on your system, or if your Apache is located in a non-standard location which Phusion Passenger cannot detect. By setting `APXS2` and `HTTP` to the right paths, you can force Phusion Passenger to be compiled against that specific Apache installation.
|
831
|
-
+
|
832
|
-
For example, if your Apache installation is located in `/opt/lamp/apache2`, then you can run the installer as follows:
|
833
|
-
+
|
834
|
-
---------------------------------------
|
835
|
-
$ sudo bash
|
836
|
-
# export HTTPD=/opt/lampp/apache2/bin/apache
|
837
|
-
# export APXS2=/opt/lampp/apache2/bin/apxs
|
838
|
-
# passenger-install-apache2-module
|
839
|
-
---------------------------------------
|
840
|
-
`APR_CONFIG`::
|
841
|
-
The location of the `apr-config` executable (the Apache Portable Runtime developer tool).
|
842
|
-
`APU_CONFIG`::
|
843
|
-
The location of the `apu-config` executable (the Apache Portable Runtime Utility developer tool).
|
844
|
-
`MAKE`::
|
845
|
-
The location of a `make` tool. It does not matter which implementation of `make` this is.
|
846
|
-
`GMAKE`::
|
847
|
-
The location of the GNU-compatible `make` tool.
|
848
|
-
|
849
|
-
TIP: If you do not know what environment variables are, or how to use them, then please read <<env_vars_and_sudo,Environment variables and sudo>>.
|
850
|
-
|
851
|
-
NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <<env_vars_and_sudo,Environment variables and sudo>>.
|
157
|
+
ifdef::apache[]
|
158
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/customizing_compilation_process.html
|
159
|
+
endif::[]
|
160
|
+
ifdef::nginx[]
|
161
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/customizing_compilation_process.html
|
162
|
+
endif::[]
|
852
163
|
|
853
164
|
|
854
165
|
ifdef::apache[]
|
855
166
|
[[multiple_apache_installs]]
|
856
167
|
=== Dealing with multiple Apache installations
|
857
|
-
Some systems have multiple Apache installations. Maybe you already know about that, and you installed multiple Apaches for a reason. Or maybe you did so in the past but then forgot about the other installs. Or maybe someone else -- or some other software -- installed another Apache for you without your knowledge.
|
858
|
-
|
859
|
-
Whatever the reason might be, it is important that you know about the existance of multiple Apache installations, and that you decide *which one* you want to use. **Unless you know exactly what you are doing, we recommend that you remove all the Apache installations that you don't intend to use, in order to avoid confusion and problems**. You should end up with only a single Apache installation. Unfortunately, this manual cannot tell you how to remove the other Apache installs: it depends on how you originally installed them. Usually it's a matter of removing the directories that they're located in, and removing their configuration files. But some Apache distributions might bundle an uninstaller. You need to do the proper research on how they ended up there in the first place.
|
860
|
-
|
861
|
-
Phusion Passenger provides a tool to check whether you have multiple Apache installations on your system. You can invoke the tool by running `passenger-config --detect-apache2`.
|
862
|
-
|
863
|
-
If the existance of multiple Apache installations is intentional, then Phusion Passenger can happily go along with your choice: you simply have to tell `passenger-install-apache2-module` which Apache to install against. There are several ways to specify which Apache you want to install against:
|
864
|
-
|
865
|
-
* By passing the `--apxs2-path` parameter. The `passenger-config --detect-apache2` command will tell you how to use this parameter.
|
866
|
-
* By setting `APXS2`, `HTTPD` and other kinds of environment variables. Please refer to <<forcing_location_of_command_line_tools_and_dependencies,Forcing location of command line tools and dependencies>> for more information.
|
867
168
|
|
169
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/multiple_apache_installs.html
|
868
170
|
|
869
171
|
[[working_with_apache_conf]]
|
870
172
|
=== Working with the Apache configuration file
|
871
173
|
|
872
|
-
|
873
|
-
|
874
|
-
'mods-enabled' contains symlinks to files in 'mods-available'. This latter subdirectory contains config files for all available modules, while 'mods-enabled' contains only a subset, namely the modules that should actually be enabled. The symlinks are created using the `a2enmod` tool. '*.load' files contain `LoadModule` directives, while '*.conf' files contain all other configuration directives.
|
875
|
-
|
876
|
-
Use 'mods-enabled'/'mods-available' to store Phusion Passenger configuration if you can:
|
877
|
-
|
878
|
-
- Create '/etc/apache2/mods-available/passenger.load' and paste the `LoadModule ...` directive that `passenger-install-apache2-module` outputs.
|
879
|
-
- Create '/etc/apache2/mods-available/passenger.conf' and paste the `PassengerRoot` and other Phusion Passenger options.
|
880
|
-
- Enable by running `sudo a2enmod passenger`.
|
881
|
-
|
882
|
-
If the 'mods-enabled' mechanism is not available then you can paste configuration snippets into 'httpd.conf' or 'apache2.conf' directly.
|
883
|
-
|
884
|
-
On OS X Server >= 10.8 Mountain Lion the location of the Apache configuration file depends on whether you use Web Services or not. If you do, then the configuration file is in '/Library/Server/Web/Config/apache2/httpd_server_app.conf'. If you do not, then the configuration file is in '/etc/apache2/httpd.conf'.
|
174
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/working_with_the_apache_config_file.html
|
885
175
|
endif::[]
|
886
176
|
|
887
177
|
|
888
178
|
ifdef::nginx[]
|
889
179
|
=== Installing as a normal Nginx module without using the installer
|
890
180
|
|
891
|
-
|
892
|
-
|
893
|
-
You need to run Nginx's configure script with `--add-module=/path-to-passenger-nginx-addon-dir`. The right value for `/path-to-passenger-nginx-addon-dir` can be obtained with the command:
|
894
|
-
|
895
|
-
-------------------------------------
|
896
|
-
passenger-config --nginx-addon-dir
|
897
|
-
-------------------------------------
|
898
|
-
|
899
|
-
After having installed Nginx with Phusion Passenger support, you must paste the following
|
900
|
-
line into your Nginx configuration file:
|
901
|
-
|
902
|
-
------------------------------------------
|
903
|
-
passenger_root /path-to-passenger-root;
|
904
|
-
------------------------------------------
|
905
|
-
|
906
|
-
The right value for `/path-to-passenger-root` can be obtained by running the following command:
|
907
|
-
|
908
|
-
-------------------------------------
|
909
|
-
passenger-config --root
|
910
|
-
-------------------------------------
|
911
|
-
|
912
|
-
After having modified the Nginx configuration file, restart Nginx.
|
181
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/install_as_nginx_module.html
|
913
182
|
|
914
183
|
|
915
184
|
[[nginx_init_script]]
|
916
185
|
=== Creating an Nginx init script
|
917
186
|
|
918
|
-
|
919
|
-
|
920
|
-
If you prefer to use an init script then please refer to the following resources:
|
921
|
-
|
922
|
-
- link:http://wiki.nginx.org/Nginx-init-ubuntu[Init script for Ubuntu 8.04-9.10]
|
923
|
-
- link:http://library.linode.com/web-servers/nginx/installation/ubuntu-12.04-precise-pangolin#sph_create-an-init-script-to-manage-nginx[Init script for Ubuntu 12.04]
|
924
|
-
- link:http://wiki.nginx.org/RedHatNginxInitScript[Init script for Red Hat, Fedora and CentOS]
|
925
|
-
|
926
|
-
When using one of those init scripts, please make sure that the paths inside the init script are correct. In particular, the paths to the Nginx binary, to the PID file and to the configuration file must match the actual locations of your Nginx installation.
|
187
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/nginx_init_script.html
|
927
188
|
endif::[]
|
928
189
|
|
929
190
|
|
930
191
|
ifndef::standalone[]
|
931
192
|
=== Disabling without uninstalling
|
932
193
|
|
933
|
-
You can temporarily unload (disable) Phusion Passenger from the web server, without
|
934
|
-
uninstalling the Phusion Passenger files, so that the web server behaves as if Phusion
|
935
|
-
Passenger was never installed in the first place. This might be useful to you if -
|
936
|
-
for example - you seem to be experiencing a problem caused by Phusion Passenger,
|
937
|
-
but you want to make sure whether that's actually the case without having
|
938
|
-
to go through the hassle of uninstalling Phusion Passenger completely. When disabled,
|
939
|
-
Phusion Passenger will not occupy any memory or CPU or otherwise interfere with
|
940
|
-
the web server.
|
941
|
-
|
942
194
|
ifdef::apache[]
|
943
|
-
|
944
|
-
and comment out:
|
945
|
-
|
946
|
-
- all Phusion Passenger configuration directives.
|
947
|
-
- the `LoadModule passenger_module` directive.
|
948
|
-
|
949
|
-
For example, if your configuration file looks like this...
|
950
|
-
|
951
|
-
-----------------------------------
|
952
|
-
Listen *:80
|
953
|
-
NameVirtualHosts *:80
|
954
|
-
....
|
955
|
-
|
956
|
-
LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
|
957
|
-
|
958
|
-
PassengerRoot /somewhere/passenger/x.x.x
|
959
|
-
PassengerDefaultRuby /usr/bin/ruby
|
960
|
-
PassengerMaxPoolSize 10
|
961
|
-
|
962
|
-
<VirtualHost *:80>
|
963
|
-
ServerName www.foo.com
|
964
|
-
DocumentRoot /webapps/foo/public
|
965
|
-
RailsBaseURI /rails
|
966
|
-
</VirtualHost>
|
967
|
-
-----------------------------------
|
968
|
-
|
969
|
-
...then comment out the relevant directives, so that it looks like this:
|
970
|
-
|
971
|
-
-----------------------------------
|
972
|
-
Listen *:80
|
973
|
-
NameVirtualHosts *:80
|
974
|
-
....
|
975
|
-
|
976
|
-
# LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
|
977
|
-
|
978
|
-
# PassengerRoot /somewhere/passenger/x.x.x
|
979
|
-
# PassengerDefaultRuby /usr/bin/ruby
|
980
|
-
# PassengerMaxPoolSize 10
|
981
|
-
|
982
|
-
<VirtualHost *:80>
|
983
|
-
ServerName www.foo.com
|
984
|
-
DocumentRoot /webapps/foo/public
|
985
|
-
# RailsBaseURI /rails
|
986
|
-
</VirtualHost>
|
987
|
-
-----------------------------------
|
195
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/disable.html
|
988
196
|
endif::[]
|
989
197
|
ifdef::nginx[]
|
990
|
-
|
991
|
-
and comment out all Phusion Passenger configuration directives.
|
992
|
-
|
993
|
-
For example, if your configuration file looks like this...
|
994
|
-
|
995
|
-
-----------------------------------
|
996
|
-
...
|
997
|
-
|
998
|
-
http {
|
999
|
-
passenger_root /somewhere/passenger-x.x.x;
|
1000
|
-
passenger_ruby /usr/bin/ruby;
|
1001
|
-
passenger_max_pool_size 10;
|
1002
|
-
|
1003
|
-
gzip on;
|
1004
|
-
|
1005
|
-
server {
|
1006
|
-
server_name www.foo.com;
|
1007
|
-
listen 80;
|
1008
|
-
root /webapps/foo/public;
|
1009
|
-
passenger_enabled on;
|
1010
|
-
}
|
1011
|
-
}
|
1012
|
-
-----------------------------------
|
1013
|
-
|
1014
|
-
...then comment out the relevant directives, so that it looks like this:
|
1015
|
-
|
1016
|
-
-----------------------------------
|
1017
|
-
...
|
1018
|
-
|
1019
|
-
http {
|
1020
|
-
# passenger_root /somewhere/passenger-x.x.x;
|
1021
|
-
# passenger_ruby /usr/bin/ruby;
|
1022
|
-
# passenger_max_pool_size 10;
|
1023
|
-
|
1024
|
-
gzip on;
|
1025
|
-
|
1026
|
-
server {
|
1027
|
-
server_name www.foo.com;
|
1028
|
-
listen 80;
|
1029
|
-
root /webapps/foo/public;
|
1030
|
-
# passenger_enabled on;
|
1031
|
-
}
|
1032
|
-
}
|
1033
|
-
-----------------------------------
|
198
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/disable.html
|
1034
199
|
endif::[]
|
1035
|
-
|
1036
|
-
After you've done this, save the configuration file and restart the web server.
|
1037
200
|
endif::[]
|
1038
201
|
|
1039
202
|
[[uninstalling]]
|
1040
203
|
=== Uninstalling
|
1041
204
|
|
1042
|
-
ifndef::standalone[]
|
1043
|
-
To uninstall Phusion Passenger, please first remove all Phusion Passenger
|
1044
|
-
configuration directives from your web server configuration file(s). After you've
|
1045
|
-
done this, you need to remove the Phusion Passenger files.
|
1046
|
-
endif::[]
|
1047
|
-
|
1048
|
-
- If you installed Phusion Passenger through Homebrew, then run `brew uninstall passenger`.
|
1049
205
|
ifdef::apache[]
|
1050
|
-
|
206
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/uninstall/
|
1051
207
|
endif::[]
|
1052
|
-
- If you installed Phusion Passenger via a Ruby gem, then run `gem uninstall passenger` (or, if you're a link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] user, `gem uninstall passenger-enterprise-server`).
|
1053
|
-
You <<is_ruby_home_or_system_wide_installed,might have to run this as root>>.
|
1054
|
-
- If you installed Phusion Passenger via a source tarball, then remove the directory
|
1055
|
-
in which you placed the extracted Phusion Passenger files. This directory is the
|
1056
|
-
same as the one pointed to the by `PassengerRoot`/`passenger_root` configuration directive.
|
1057
|
-
- If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.
|
1058
|
-
|
1059
208
|
ifdef::nginx[]
|
1060
|
-
|
209
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/uninstall/
|
210
|
+
endif::[]
|
211
|
+
ifdef::standalone[]
|
212
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/standalone/uninstall/
|
1061
213
|
endif::[]
|
1062
214
|
|
1063
215
|
|
1064
216
|
[[moving_phusion_passenger]]
|
1065
217
|
=== Moving to a different directory
|
1066
218
|
|
1067
|
-
If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods.
|
1068
|
-
|
1069
|
-
First, move the directory to whereever you like:
|
1070
|
-
|
1071
|
-
--------------------------------------------------------------
|
1072
|
-
mv /opt/passenger/passenger-4.0.0 /usr/local/passenger-4.0.0
|
1073
|
-
--------------------------------------------------------------
|
1074
219
|
|
1075
220
|
ifdef::apache[]
|
1076
|
-
|
1077
|
-
Open your <<working_with_apache_conf,Apache configuration file>> and set the 'PassengerRoot' directive to the new location:
|
1078
|
-
|
1079
|
-
---------------------------------------------
|
1080
|
-
PassengerRoot /usr/local/passenger-4.0.0
|
1081
|
-
---------------------------------------------
|
1082
|
-
|
1083
|
-
Restart your web server to finalize the change.
|
221
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/apache/moving.html
|
1084
222
|
endif::[]
|
1085
223
|
ifdef::nginx[]
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
passenger_root /usr/local/passenger-4.0.0;
|
1091
|
-
---------------------------------------------
|
1092
|
-
|
1093
|
-
Restart your web server to finalize the change.
|
224
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/nginx/moving.html
|
225
|
+
endif::[]
|
226
|
+
ifdef::standalone[]
|
227
|
+
This documentation has moved. Please visit https://www.phusionpassenger.com/library/install/standalone/moving.html
|
1094
228
|
endif::[]
|
1095
|
-
|
1096
|
-
If you used <<tarball_generic_install,the tarball installation method>> and you added Phusion Passenger's `bin` subdirectory to `PATH`, then you must update your PATH with the new location. Open `/etc/bashrc` (or `/etc/bash.bashrc` on some systems) and change:
|
1097
|
-
|
1098
|
-
---------------------
|
1099
|
-
export PATH=/opt/passenger/passenger-4.0.0/bin:$PATH
|
1100
|
-
---------------------
|
1101
|
-
|
1102
|
-
to:
|
1103
|
-
|
1104
|
-
---------------------
|
1105
|
-
export PATH=/usr/local/passenger-4.0.0/bin:$PATH
|
1106
|
-
---------------------
|
1107
|
-
|
1108
|
-
Finally, restart all your shell sessions to activate the PATH change.
|