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.

Files changed (70) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/CHANGELOG +9 -0
  5. data/INSTALL.md +1 -1
  6. data/LICENSE +1 -1
  7. data/README.md +1 -1
  8. data/bin/passenger-install-apache2-module +6 -10
  9. data/bin/passenger-install-nginx-module +6 -9
  10. data/doc/CloudLicensingConfiguration.html +1 -216
  11. data/doc/CloudLicensingConfiguration.txt.md +1 -192
  12. data/doc/Design and Architecture.html +4 -4
  13. data/doc/Design and Architecture.txt +4 -4
  14. data/doc/ServerOptimizationGuide.html +1 -489
  15. data/doc/ServerOptimizationGuide.txt.md +1 -399
  16. data/doc/Users guide Apache.html +594 -6720
  17. data/doc/Users guide Apache.idmap.txt +15 -12
  18. data/doc/Users guide Apache.txt +113 -2047
  19. data/doc/Users guide Nginx.html +565 -6720
  20. data/doc/Users guide Nginx.idmap.txt +15 -12
  21. data/doc/Users guide Nginx.txt +94 -1862
  22. data/doc/Users guide Standalone.html +53 -2183
  23. data/doc/Users guide Standalone.idmap.txt +9 -6
  24. data/doc/Users guide Standalone.txt +16 -360
  25. data/doc/Users guide.html +3 -145
  26. data/doc/Users guide.txt +2 -54
  27. data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +36 -175
  28. data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +9 -215
  29. data/doc/users_guide_snippets/environment_variables.txt +11 -243
  30. data/doc/users_guide_snippets/installation.txt +66 -946
  31. data/doc/users_guide_snippets/rackup_specifications.txt +1 -75
  32. data/doc/users_guide_snippets/support_information.txt +1 -48
  33. data/doc/users_guide_snippets/tips.txt +103 -704
  34. data/doc/users_guide_snippets/troubleshooting/default.txt +16 -130
  35. data/doc/users_guide_snippets/troubleshooting/rails.txt +15 -12
  36. data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +2 -113
  37. data/ext/apache2/Configuration.hpp +2 -2
  38. data/ext/apache2/Hooks.cpp +2 -2
  39. data/ext/common/AgentsStarter.h +18 -10
  40. data/ext/common/ApplicationPool2/ErrorRenderer.h +0 -3
  41. data/ext/common/ApplicationPool2/Options.h +8 -1
  42. data/ext/common/Constants.h +3 -9
  43. data/ext/common/agent/Core/RequestHandler/InitRequest.cpp +2 -0
  44. data/ext/common/agent/Watchdog/Main.cpp +1 -1
  45. data/ext/nginx/ContentHandler.c +2 -3
  46. data/ext/nginx/config +2 -2
  47. data/lib/phusion_passenger.rb +1 -22
  48. data/lib/phusion_passenger/abstract_installer.rb +10 -10
  49. data/lib/phusion_passenger/config/agent_compiler.rb +5 -5
  50. data/lib/phusion_passenger/config/nginx_engine_compiler.rb +4 -4
  51. data/lib/phusion_passenger/config/validate_install_command.rb +3 -3
  52. data/lib/phusion_passenger/constants.rb +1 -5
  53. data/lib/phusion_passenger/loader_shared_helpers.rb +16 -5
  54. data/lib/phusion_passenger/platform_info/apache_detector.rb +2 -2
  55. data/lib/phusion_passenger/public_api.rb +11 -2
  56. data/lib/phusion_passenger/request_handler/thread_handler.rb +2 -3
  57. data/lib/phusion_passenger/ruby_core_io_enhancements.rb +4 -1
  58. data/lib/phusion_passenger/standalone/start_command.rb +1 -1
  59. data/resources/oss-binaries.phusionpassenger.com.crt +124 -0
  60. data/resources/templates/apache2/deployment_example.txt.erb +5 -23
  61. data/resources/templates/apache2/installing_against_a_different_apache.txt.erb +3 -4
  62. data/resources/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb +3 -3
  63. data/resources/templates/apache2/rpm_installation_recommended.txt.erb +1 -1
  64. data/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb +4 -5
  65. data/resources/templates/nginx/deployment_example.txt.erb +5 -17
  66. data/resources/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +3 -3
  67. data/resources/templates/standalone/config.erb +1 -1
  68. data/resources/templates/undisclosed_error.html.template +4 -11
  69. metadata +2 -2
  70. metadata.gz.asc +7 -7
@@ -1,261 +1,33 @@
1
1
  === Synopsis
2
2
 
3
- Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, there are multiple ways to install it. Most users -- especially first-time users -- will prefer _OS-specific installation instructions_. These are not only the easiest, but also allow Phusion Passenger to integrate into the operating system in the best way possible. Other users should consult the _generic installation instructions_.
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
- **Open source**::
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
- We provide an official Phusion Passenger APT repository. This APT repository contains Phusion Passenger packages for multiple versions of Debian and Ubuntu. These packages are automatically built by our build server after we push out a source release, and thus are always up to date with the official source releases.
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
- 1. Install our PGP key. Packages are signed by "Phusion Automated Software Signing (auto-software-signing@phusion.nl)", fingerprint 1637 8A33 A6EF 1676 2922 526E 561F 9B9C AC40 B2F7.
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
- ifdef::nginx[]
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
- If there is no <<PassengerRoot,passenger_root>> directive in `/etc/nginx/nginx.conf`, you can insert it yourself as follows:
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
- We provide an official Phusion Passenger YUM repository with packages for Red Hat Enterprise Linux and CentOS. These packages are automatically built by our build server after we push out a source release, and thus are always up to date with the official source releases.
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
- 1. Install link:https://fedoraproject.org/wiki/EPEL[EPEL] and a few other prerequisites.
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
- .Notes about SELinux on Red Hat 6 and CentOS 6
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
- RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby's RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system. This is explained in <<relationship_with_ruby,Phusion Passenger and its relationship with Ruby>>.
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
- [float]
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
- **Enterprise**::
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
- ==== Step 4: verifying that Phusion Passenger is running
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
- ==== Step 5: verifying that Phusion Passenger is running
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
- Restart your web server and run:
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
- We digitally sign various files with our GPG key so that you can check whether they're legit, i.e. whether they really came from Phusion and haven't been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1.
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
- Phusion's GPG key for signing software is as follows:
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
- The Phusion Software Signing key is also *signed by the Phusion founders*. Their keys are as follows:
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
- You can find the open source version's gem and tarball GPG signatures at https://www.phusionpassenger.com/file_releases. The Enterprise version's GPG signatures can be found in the link:https://www.phusionpassenger.com/orders[Customer Area]. All signatures have the '.asc' extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:
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
- Tags in the link:https://github.com/phusion/passenger[Git repository for the open source version] are also tagged. You can verify a Git tag as follows:
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
- Our <<install_on_debian_ubuntu,APT repository>> is signed by Phusion Automated Software Signing (auto-software-signing@phusion.nl). Packages are automatically checked upon installation.
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
- Our <<installing_or_upgrading_on_red_hat,YUM repository>> is signed by link:https://packagecloud.io[PackageCloud] (ops@packagecloud.io). PackageCloud is the RPM package hosting service that we use. You can find their key link:https://packagecloud.io/gpg.key[here]. Packages are automatically checked upon installation.
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
- In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking:
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
- By default, the installer (`passenger-install-apache2-module`) is interactive. If you want to automate installation then you can do so by passing `--auto` to the installer. See also `passenger-install-apache2-module --help` for more options.
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
- By default, the installer (`passenger-install-nginx-module`) is interactive. If you want to automate installation then you can do so by passing various answers to the installer through command line options. Please run the installer with `--help` for a list of available command line options.
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
- The Phusion Passenger compilation process can be customized with environment variables. You can learn more about environment variables in <<about_environment_variables,About environment variables>>.
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
- You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the `CC` and `CXX` environment variables. These may be set to any arbitrary shell commands.
778
-
779
- For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and link:http://ccache.samba.org/[ccache] for faster recompilation, and may want to enable more error-catching compilation flags:
780
-
781
- [source,sh]
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
- On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:
792
-
793
- `EXTRA_PRE_CFLAGS`::
794
- These flags are injected into all C compiler invocations that involve compiling C source files. This also covers compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, even before `EXTRA_PRE_LDFLAGS`.
795
- `EXTRA_CFLAGS`::
796
- Similar to `EXTRA_PRE_CFLAGS`, but injected at the end of the command string, before `EXTRA_LDFLAGS`.
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
- The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the `apxs2` command and queries it. To find out which compiler flags it should use for libcurl, it queries the `curl-config` command. These commands may not be in `$PATH`, or even when they are you may want to use a different one.
822
-
823
- You can force the build to find certain command line tools at certain locations by using the following environment variables:
824
-
825
- `HTTPD`::
826
- The location of the `httpd` executable (the Apache server executable).
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
- On most systems the Apache configuration file is located in either '/etc/apache2/httpd.conf' or '/etc/apache2/apache2.conf'. However, to allow better organization, many operating systems and Apache distributions also read configuration files in the 'conf.d', 'mods-enabled' and 'sites-enabled' subdirectories.
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
- You can also install Phusion Passenger the way you install any other Nginx module, e.g. with `--add-module`. This installation mode is useful if you already have an Nginx tarball somewhere.
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
- If you installed Nginx with one of the generic installation methods then you won't have an init script to start, stop and restart Nginx with. A bare Nginx installation works with signals: you start it by invoking it from the command line, you stop it by sending SIGTERM to it and you gracefully restart it by sending SIGHUP to it.
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
- To unload Phusion Passenger from the web server, edit your Apache configuration file(s)
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
- To unload Phusion Passenger, edit your Nginx configuration file(s)
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
- Then run `rm -f /etc/apache2/other/passenger.conf`.
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
- Nginx does not have to be recompiled after uninstalling Phusion Passenger. Altough Nginx will contain the Phusion Passenger Nginx module, the module will not do anything when all Phusion Passenger configuration directives are removed.
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
- Next you must tell Apache that Phusion Passenger has moved.
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
- Next you must tell Nginx that Phusion Passenger has moved.
1087
- Open your Nginx configuration file and set the 'passenger_root' directive to the new location:
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.