Parent

Class/Module Index [+]

Quicksearch

PhusionPassenger::Standalone::RuntimeInstaller

Installs the Phusion Passenger Standalone runtime by downloading and compiling Nginx, compiling the Phusion Passenger support binaries, and storing the results in the designated directories. This installer is entirely non-interactive.

The following option must be given:

If you want RuntimeInstaller to compile and install Nginx, then you must specify these options:

If you want RuntimeInstaller to compile and install the Phusion Passenger support files, then you must specify these:

Other optional options:

Please note that RuntimeInstaller will try to avoid compiling/installing things that don't need to be compiled/installed. This is done by checking whether some key files exist, and concluding that something doesn't need to be compiled/installed if they do. This quick check is of course not perfect; if you want to force a recompilation/reinstall then you should remove nginx_dir and support_dir before starting this installer.

Protected Instance Methods

after_install() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 172
def after_install
        super
        FileUtils.rm_rf(@working_dir)
        @plugin.call_hook(:runtime_installer_cleanup) if @plugin
end
before_install() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 162
def before_install
        super
        @plugin.call_hook(:runtime_installer_start, self) if @plugin
        @working_dir = "/tmp/#{myself}-passenger-standalone-#{Process.pid}"
        FileUtils.rm_rf(@working_dir)
        FileUtils.mkdir_p(@working_dir)
        @download_binaries = true if !defined?(@download_binaries)
        @binaries_url_root ||= STANDALONE_BINARIES_URL_ROOT
end
dependencies() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 76
def dependencies
        result = [
                Dependencies::GCC,
                Dependencies::GnuMake,
                Dependencies::DownloadTool,
                Dependencies::Ruby_DevHeaders,
                Dependencies::Ruby_OpenSSL,
                Dependencies::RubyGems,
                Dependencies::Rake,
                Dependencies::Rack,
                Dependencies::Curl_Dev,
                Dependencies::OpenSSL_Dev,
                Dependencies::Zlib_Dev,
                Dependencies::Daemon_Controller,
        ]
        if Dependencies.fastthread_required?
                result << Dependencies::FastThread
        end
        if Dependencies.asciidoc_required?
                result << Dependencies::AsciiDoc
        end
        return result
end
install!() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 104
def install!
        if @support_dir && @nginx_dir
                show_welcome_screen
        end
        check_dependencies(false) || exit(1)
        puts
        if passenger_support_files_need_to_be_installed?
                check_whether_we_can_write_to(@support_dir) || exit(1)
        end
        if nginx_needs_to_be_installed?
                check_whether_we_can_write_to(@nginx_dir) || exit(1)
        end
        
        if passenger_support_files_need_to_be_installed? && should_download_binaries?
                download_and_extract_passenger_binaries(@support_dir) do |progress, total|
                        show_progress(progress, total, 1, 1, "Extracting Passenger binaries...")
                end
                puts
                puts
        end
        if nginx_needs_to_be_installed? && should_download_binaries?
                download_and_extract_nginx_binaries(@nginx_dir) do |progress, total|
                        show_progress(progress, total, 1, 1, "Extracting Nginx binaries...")
                end
                puts
                puts
        end
        
        if nginx_needs_to_be_installed?
                nginx_source_dir = download_and_extract_nginx_sources do |progress, total|
                        show_progress(progress, total, 1, 7, "Extracting...")
                end
                if nginx_source_dir.nil?
                        puts
                        show_possible_solutions_for_download_and_extraction_problems
                        exit(1)
                end
        end
        if passenger_support_files_need_to_be_installed?
                install_passenger_support_files do |progress, total, phase, status_text|
                        if phase == 1
                                show_progress(progress, total, 2, 7, status_text)
                        else
                                show_progress(progress, total, 3..5, 7, status_text)
                        end
                end
        end
        if nginx_needs_to_be_installed?
                install_nginx_from_source(nginx_source_dir) do |progress, total, status_text|
                        show_progress(progress, total, 6..7, 7, status_text)
                end
        end
        
        puts
        color_puts "<green><b>All done!</b></green>"
        puts
end
users_guide() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 100
def users_guide
        return "#{DOCDIR}/Users guide Standalone.html"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.