### Setup GOPATH and install gorilla/mux Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html Set the GOPATH environment variable, install the gorilla/mux package, and verify the installation. ```bash export GOPATH=/path/to/your/go/project/root go get -u github.com/gorilla/mux ls $GOPATH/src/github.com/gorilla/mux/ ``` -------------------------------- ### Start Nginx with /opt/nginx/sbin/nginx Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/rubygems_norvm.html Starts the Nginx server installed by passenger-install-nginx-module. The command uses the default prefix /opt/nginx; substitute the actual prefix if a different one was chosen. ```shell $ sudo /opt/nginx/sbin/nginx ``` -------------------------------- ### Install Nginx with Passenger as static module Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install_as_nginx_module.html Full example showing how to configure and compile Nginx with Passenger and another module. Run from the Nginx source directory. ```bash cd /path-to-nginx-source-dir ./configure --prefix=/opt/nginx \ --add-module=$(passenger-config --nginx-addon-dir) \ --add-module=/path-to-some-other-nginx-module make sudo make install ``` -------------------------------- ### Start Nginx with sudo /opt/nginx/sbin/nginx Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/rubygems_rvm.html Starts the Nginx server installed by passenger-install-nginx-module. The command assumes the default prefix /opt/nginx; substitute the actual prefix if a different one was chosen. ```shell copy$ sudo /opt/nginx/sbin/nginx ``` -------------------------------- ### Install Go on macOS with Homebrew (interactive) Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html Install command line tools and Homebrew interactively, then install Go. ```bash xcode-select --install /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install go ``` -------------------------------- ### Check Passenger installation instructions with brew info Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/osx.html Run 'brew info passenger' to display the Caveats section with instructions for activating Passenger in Nginx. The output is truncated with '...' in the example. ```bash $ brew info passenger ... ==> Caveats ... To activate Passenger, ... (...more instructions that you should follow...) ``` -------------------------------- ### Run Passenger Nginx module installer Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/rubygems_rvm.html Starts the interactive Passenger Nginx module installer. Follow the on-screen instructions to complete the installation. ```bash $ passenger-install-nginx-module ``` -------------------------------- ### Clone the Sinatra demo app Source: https://www.phusionpassenger.com/docs/tutorials/quickstart Clones the Sinatra demo application and changes into its directory. Use this as the starting point for the quickstart tutorial. ```shell $ git clone https://github.com/phusion/passenger-ruby-sinatra-demo.git $ cd passenger-ruby-sinatra-demo ``` -------------------------------- ### Install Go on RHEL Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html Register the system, enable required repositories, and install go-toolset-7 on RHEL. ```bash subscription-manager register --username $USERNAME_EMAIL --password $PASSWORD --auto-attach subscription-manager repos --enable rhel-7-server-devtools-rpms yum-config-manager --enable rhel-server-rhscl-7-rpms dnf install -y go-toolset-7 scl enable go-toolset-7 bash ``` -------------------------------- ### Install gems and initialize Capistrano Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/automating_app_updates/ruby Run bundle install to install the gem bundle, then run bundle exec cap install to initialize Capistrano. The output shows the created files: config/deploy.rb, config/deploy/staging.rb, config/deploy/production.rb, and Capfile. ```shell $ bundle install ... $ bundle exec cap install mkdir -p config/deploy create config/deploy.rb create config/deploy/staging.rb create config/deploy/production.rb mkdir -p lib/capistrano/tasks create Capfile Capified ``` -------------------------------- ### Validate installation and check processes Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations/oss/aws Validate the installation with sudo passenger-config validate-install; all checks should pass. Then run sudo passenger-memory-stats to confirm Nginx and Passenger processes are running. If no Nginx or Passenger processes appear, consult the troubleshooting guide. ```bash $ sudo passenger-config validate-install * Checking whether this Phusion Passenger install is in PATH... ✓ * Checking whether there are no other Phusion Passenger installations... ✓ ``` ```bash $ sudo passenger-memory-stats Version: 5.0.8 Date : 2015-05-28 08:46:20 +0200 ... ---------- Nginx processes ---------- PID PPID VMSize Private Name ------------------------------------- 12443 4814 60.8 MB 0.2 MB nginx: master process /usr/sbin/nginx 12538 12443 64.9 MB 5.0 MB nginx: worker process ### Processes: 3 ### Total private RSS: 5.56 MB ----- Passenger processes ------ PID VMSize Private Name -------------------------------- 12517 83.2 MB 0.6 MB PassengerAgent watchdog 12520 266.0 MB 3.4 MB PassengerAgent server 12531 149.5 MB 1.4 MB PassengerAgent logger ... ``` -------------------------------- ### Release build and start with Passenger Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/swift.html Build a release version, start the app with the passenger start command, and verify it with curl. Uses the PORT environment variable and the executable from the release build. ```bash vapor build --release passenger start --app-start-command "env PORT=\$PORT $(swift build --configuration release --show-bin-path)/Run serve --env prod --hostname 0.0.0.0"`. # in another terminal curl http://localhost:3000 ``` -------------------------------- ### Clone the Ruby on Rails demo app Source: https://www.phusionpassenger.com/docs/tutorials/quickstart Clones the Ruby on Rails demo application and changes into its directory. Use this as the starting point for the quickstart tutorial. ```shell $ git clone https://github.com/phusion/passenger-ruby-rails-demo.git $ cd passenger-ruby-rails-demo ``` -------------------------------- ### Build and start with Passenger Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html Build a release binary, start it with Passenger using the --app-start-command flag, and verify with curl on port 3000. ```bash go build main.go passenger start --app-start-command 'env PORT=$PORT ./main' # in another terminal curl http://localhost:3000 ``` -------------------------------- ### Start app with Passenger and verify Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/generic_guide.html Start the app with Passenger using the app-start-command, then verify with curl on port 3000. Stop with Ctrl+C. ```bash passenger start --app-start-command myApp --foreground --port $PORT' # in another terminal curl http://localhost:3000 ``` -------------------------------- ### Start Passenger server with bundle exec passenger start Source: https://www.phusionpassenger.com/docs/tutorials/quickstart Starts the Passenger Standalone server in development mode. The output shows the server's PID file, log file, environment, and the URL it is accessible at. ```shell $ bundle exec passenger start ======= Phusion Passenger Standalone web server started ======= PID file: /Users/phusion/myapp/tmp/pids/passenger.3000.pid Log file: /Users/phusion/myapp/log/passenger.3000.log Environment: development Accessible via: http://0.0.0.0:3000/ You can stop Phusion Passenger Standalone by pressing Ctrl-C. =============================================================== ``` -------------------------------- ### passenger_app_start_command example with $PORT placeholder Source: https://www.phusionpassenger.com/docs/references/config_reference Specifies the command Passenger uses to start the app on a chosen port. The $PORT placeholder is replaced with an actual port number, e.g., /usr/local/bin/myapp --foreground --port 5000. This is the minimum configuration for Generic Language Support (GLS). ```nginx passenger_app_start_command "/usr/local/bin/myapp --foreground --port $PORT"; ``` -------------------------------- ### Install Go on macOS with Homebrew (non-interactive) Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html Install command line tools and Homebrew entirely from the CLI, suitable for SSH sessions. ```bash touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress softwareupdate -i $(softwareupdate -l | grep "\*.*Command Line" | grep $(sw_vers -productVersion) | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n') --verbose rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install go ``` -------------------------------- ### Install Nginx with apt-get Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Installs Nginx from the system repository. Required before installing the Passenger Nginx module if Nginx is not already present. ```bash sudo apt-get install nginx ``` -------------------------------- ### passenger start --help Source: https://www.phusionpassenger.com/docs/tutorials/the_help_option/ruby Run this to see the help for the passenger start subcommand. The output shows the usage line and the server options, including the default address (0.0.0.0) and default port (3000). ```shell $ cd /path-to-your-app $ bundle exec passenger start --help Usage: passenger start [DIRECTORY] [OPTIONS] Starts Passenger Standalone and serve one or more web applications. Server options: -a, --address HOST Bind to the given address. Default: 0.0.0.0 -p, --port NUMBER Use the given port number. Default: 3000 ... ``` -------------------------------- ### Install Go on Debian & Ubuntu Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html Install Go using the apt package manager on Debian and Ubuntu systems. ```bash apt install -y golang-go ``` -------------------------------- ### Install chrony and enable NTP Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Install and enable chrony, open the NTP firewall port, and restart chronyd to correct the system date. ```bash sudo dnf -y install chrony sudo systemctl enable chronyd sudo firewall-cmd --permanent --add-service=ntp sudo firewall-cmd --reload sudo systemctl restart chronyd ``` -------------------------------- ### Install bundle and run cap install Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/automating_app_updates Installs the gem bundle and initializes Capistrano. The cap install command creates the config/deploy directory, deploy.rb, staging.rb, production.rb, lib/capistrano/tasks, and Capfile. ```shell copy$ bundle install ... $ bundle exec cap install mkdir -p config/deploy create config/deploy.rb create config/deploy/staging.rb create config/deploy/production.rb mkdir -p lib/capistrano/tasks create Capfile Capified ``` -------------------------------- ### Install Rust on RHEL Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/rust.html Register the system, enable the required repositories, and install rust-toolset-7 on RHEL. ```bash subscription-manager register --username $USERNAME_EMAIL --password $PASSWORD --auto-attach subscription-manager repos --enable rhel-7-server-devtools-rpms yum-config-manager --enable rhel-server-rhscl-7-rpms dnf install -y rust-toolset-7 scl enable rust-toolset-7 bash ``` -------------------------------- ### Install gem bundle with bundle install Source: https://www.phusionpassenger.com/docs/tutorials/quickstart Installs the gem bundle after adding Passenger to the Gemfile. The output shows the expected installation messages. ```shell $ cd /path-to-your-app $ bundle install ... Installing passenger x.x.x ... Your bundle is complete! ``` -------------------------------- ### Install Go on CentOS/Rocky/Alma Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html Install Go using dnf on CentOS, Rocky, or Alma Linux. ```bash dnf install -y go-toolset ``` -------------------------------- ### passenger_app_group_name: wrong vs correct configuration for multiple app versions Source: https://www.phusionpassenger.com/docs/references/config_reference/nginx Shows the incorrect and correct configurations for running two versions of the same app with different environment variables. The first block is labeled 'WRONG example! Doesn't work!' because Passenger treats both server blocks as the same application, causing requests to be routed to the first started process. The second block assigns unique passenger_app_group_name values (foo_customer1 and foo_customer2) so each version gets its own environment variables. ```nginx copy# WRONG example! Doesn't work! server { listen 80; server_name customer1.foo.com; root /webapps/foo/public; passenger_enabled on; passenger_env_var CUSTOMER_NAME customer1; } server { listen 80; server_name customer2.foo.com; root /webapps/foo/public; passenger_enabled on; passenger_env_var CUSTOMER_NAME customer2; } ``` ```nginx copyserver { listen 80; server_name customer1.foo.com; root /webapps/foo/public; passenger_enabled on; passenger_env_var CUSTOMER_NAME customer1; passenger_app_group_name foo_customer1; } server { listen 80; server_name customer2.foo.com; root /webapps/foo/public; passenger_enabled on; passenger_env_var CUSTOMER_NAME customer2; passenger_app_group_name foo_customer2; } ``` -------------------------------- ### Install Passenger and Nginx via Homebrew Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/osx.html Installs both Nginx and Passenger using Homebrew. This is the first step in the installation process. ```bash $ brew install nginx passenger ``` -------------------------------- ### passenger_pre_start wrong example: missing sub-URI Source: https://www.phusionpassenger.com/docs/references/config_reference Incorrect example: omitting the sub-URI in passenger_pre_start causes the option to have no effect. The sub-URI must be included. ```nginx passenger_pre_start http://myblog.com/; # <----- WRONG! Missing "/store" part. ``` -------------------------------- ### Run Passenger commands with rvm-exec Source: https://www.phusionpassenger.com/docs/advanced_guides/in_depth/ruby/multiple_rubies.html Shows how to run Passenger commands using `rvm-exec` with the Ruby and gemset that Passenger was installed with. The second example prepends `rvmsudo` for commands that need root privileges. ```bash rvm-exec 1.9.3@business ruby -S passenger --version rvmsudo rvm-exec 1.9.3@business ruby -S passenger-install-apache2-module ``` -------------------------------- ### Capistrano config/deploy.rb example Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/automating_app_updates/ruby Default Capistrano 3.3.5 configuration file with commented defaults and a sample namespace block defining a clear_cache task after restart. Edit variables like application and repo_url to match your setup. ```ruby # config valid only for current version of Capistrano lock '3.3.5' set :application, 'my_app_name' set :repo_url, 'git@example.com:me/my_repo.git' # Default branch is :master # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call # Default deploy_to directory is /var/www/my_app_name # set :deploy_to, '/var/www/my_app_name' # Default value for :scm is :git # set :scm, :git # Default value for :format is :pretty # set :format, :pretty # Default value for :log_level is :debug # set :log_level, :debug # Default value for :pty is false # set :pty, true # Default value for :linked_files is [] # set :linked_files, fetch(:linked_files, []).push('config/database.yml') # Default value for linked_dirs is [] # set :linked_dirs, fetch(:linked_dirs, []).push('bin', 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system') # Default value for default_env is {} # set :default_env, { path: "/opt/ruby/bin:$PATH" } # Default value for keep_releases is 5 # set :keep_releases, 5 namespace :deploy do after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do # Here we can do anything such as: # within release_path do # execute :rake, 'cache:clear' # end end end end ``` -------------------------------- ### Install Git on Debian/Ubuntu Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/automating_app_updates/ruby Install Git on Debian or Ubuntu servers using apt-get. ```bash sudo apt-get install -y git ``` -------------------------------- ### Check Passenger processes with rvmsudo passenger-memory-stats Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations/oss/aws/ruby/nginx Check whether Nginx has started the Passenger core processes. The output shows Nginx and Passenger processes; the example output includes version and date information. ```bash rvmsudo passenger-memory-stats Version: 5.0.8 Date : 2015-05-28 08:46:20 +0200 ... ``` -------------------------------- ### Install Node.js on Ubuntu Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Install Node.js on Ubuntu using apt-get and symlink the node binary to /usr/local/bin/node. ```bash $ sudo apt-get install -y nodejs && $ sudo ln -sf /usr/bin/nodejs /usr/local/bin/node ``` -------------------------------- ### Correct example: two server blocks with passenger_app_group_name Source: https://www.phusionpassenger.com/docs/references Correct configuration that assigns unique passenger_app_group_name values so each customer gets its own application process and environment variables. Use this when running multiple versions of the same app for different customers. ```nginx copyserver { listen 80; server_name customer1.foo.com; root /webapps/foo/public; passenger_enabled on; passenger_env_var CUSTOMER_NAME customer1; passenger_app_group_name foo_customer1; } server { listen 80; server_name customer2.foo.com; root /webapps/foo/public; passenger_enabled on; passenger_env_var CUSTOMER_NAME customer2; passenger_app_group_name foo_customer2; } ``` -------------------------------- ### Nginx compatibility string example Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install_as_nginx_module.html Example compatibility string extracted from the Nginx executable with `strings $(which nginx) | grep '^.,.,.,'`. Use this string to determine which configure flags must be set when building the dynamic module. ```text 8,4,8,0011111111010111001111111111111111 ``` -------------------------------- ### Install Java on CentOS Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/java.html Install Java 8 development kit on CentOS using dnf. ```bash dnf install -y java-1.8.0-openjdk-devel ``` -------------------------------- ### Install Java on RHEL Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/java.html Register the system with Red Hat Subscription Manager and install Java 8 development kit on RHEL. ```bash subscription-manager register --username $USERNAME_EMAIL --password $PASSWORD --auto-attach dnf install -y java-1.8.0-openjdk-devel ``` -------------------------------- ### Install DotNet Core on macOS Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/dotnetcore.html Installs the latest DotNet Core SDK on macOS using the official installation script and adds it to the PATH. ```bash curl https://dot.net/v1/dotnet-install.sh | bash -s -- -Channel Current PATH=$PATH:~/.dotnet/ dotnet --help ``` -------------------------------- ### Install the bulk send tool Source: https://www.phusionpassenger.com/docs/advanced_guides/config_and_optimization/nginx/cloud_licensing_configuration.html Download and extract the passenger-enterprise-bulk-send-cloud-usage tool from GitHub. ```bash cd ~ curl -L -O https://github.com/phusion/passenger-enterprise-bulk-send-cloud-usage/archive/master.tar.gz tar xzvf master.tar.gz && rm master.tar.gz ``` -------------------------------- ### Build and start a .NET Core app with Passenger Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/dotnetcore.html Builds the app in Release mode, starts it with Passenger using a startup command that converts the port to an environment variable, and verifies with curl. Press Ctrl+C to stop Passenger. ```bash copydotnet build -c Release passenger start --app-start-command 'env ASPNETCORE_URLS=http://localhost:$PORT dotnet ./hello_world.dll' # in another terminal curl http://localhost:3000 ``` -------------------------------- ### Install Maven on macOS with Homebrew Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/java.html Install Maven on macOS via Homebrew. The first block is for a physically present user; the second is for remote/SSH installation. Both install Command Line Tools and Homebrew, then run brew install maven. ```bash copyxcode-select --install /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install maven ``` ```bash copytouch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress softwareupdate -i $(softwareupdate -l | grep "\*.*Command Line" | grep $(sw_vers -productVersion) | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n') --verbose rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install maven ``` -------------------------------- ### Install Passenger dynamic Nginx module via dnf Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Install prerequisites, add the Phusion Passenger RPM repository, and install the Passenger dynamic Nginx module. If the first install fails, it enables the CR repository and retries. ```bash copy# Install various prerequisites sudo dnf install -y curl # Add our el10 RPM repository sudo dnf config-manager --add-repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo # Install Passenger dynamic Nginx module sudo dnf install -y nginx-mod-http-passenger || { sudo dnf config-manager --enable cr && sudo dnf install -y nginx-mod-http-passenger ; } ``` -------------------------------- ### Install Java on Debian/Ubuntu Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/java.html Install the default Java headless JDK on Debian or Ubuntu systems. ```bash apt install -y default-jdk-headless ``` -------------------------------- ### Start Passenger with passenger start Source: https://www.phusionpassenger.com/docs/tutorials/the_passenger_command/ruby Starts Passenger Standalone again so that the 'passenger stop' command can be tested in a separate terminal. ```text copy$ passenger start ``` -------------------------------- ### Install system packages on Debian/Ubuntu Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations/oss/aws/ruby/nginx Installs curl, gnupg, and build-essential on Debian or Ubuntu systems. Required for further installation steps and for installing common Ruby gems. ```bash $ sudo apt-get update $ sudo apt-get install -y curl gnupg build-essential ``` -------------------------------- ### Install Swift on Ubuntu Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/swift.html Commands to install Swift and the Vapor framework on Ubuntu via the Vapor apt repository. Requires wget, gnupg, lsb-release, and other dependencies. ```bash apt install -y wget gnupg lsb-release libtinfo5 libcurl4 libncurses5 wget -q https://repo.vapor.codes/apt/keyring.gpg -O- | apt-key add - echo "deb https://repo.vapor.codes/apt $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/vapor.list apt-get update apt install -y vapor ``` -------------------------------- ### Install Rust on macOS with Homebrew (simplified) Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/rust.html Install command line tools, Homebrew, and Rust when physically present at the Mac. ```bash xcode-select --install /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install rust ``` -------------------------------- ### Open a superuser shell with sudo Source: https://www.phusionpassenger.com/docs/advanced_guides/config_and_optimization/nginx/cloud_licensing_configuration.html Start a superuser shell to perform the configuration steps. Use this when you have sudo access. ```bash $ sudo -H bash ``` -------------------------------- ### Install Git on Red Hat/CentOS/Rocky/Alma/Fedora/Scientific/Amazon Linux Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/automating_app_updates/ruby Install Git on Red Hat-based distributions using dnf. ```bash sudo dnf install -y git ``` -------------------------------- ### Install app dependencies with Bundler Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/deploying_your_app Install the app's gem dependencies with Bundler. The commands change to the app directory, configure Bundler for deployment mode (ignoring development and test groups), and then install the gems. ```shell $ cd /var/www/myapp/code ``` ```shell $ bundle config set --local deployment 'true' ``` ```shell $ bundle config set --local without 'development test' ``` ```shell $ bundle install ``` -------------------------------- ### Create project directories and main.go Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/go.html Create the project directory structure and an empty main.go file. ```bash mkdir -p $GOPATH/src/localhost/testing/helloworld/ cd $GOPATH/src/localhost/testing/helloworld/ touch $GOPATH/src/localhost/testing/helloworld/main.go ``` -------------------------------- ### nginx -V output example Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install_as_nginx_module.html Example output of `nginx -V` for Nginx 1.18.0. Use the version and configure arguments to build a compatible dynamic module. ```text nginx version: nginx/1.18.0 built by gcc 8.3.0 (Debian 8.3.0-6) built with OpenSSL 1.1.1d 10 Sep 2019 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.18.0/debian/debuild-base/nginx-1.18.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie' ``` -------------------------------- ### Single server role example Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/automating_app_updates Example of simple role syntax for a single server. Replace the host names and OS user account (e.g., myappuser) with your own values. ```ruby copy# Single server example role :app, %w{myappuser@myserver.com} role :web, %w{myappuser@myserver.com} role :db, %w{myappuser@myserver.com} ``` -------------------------------- ### Install Vapor on macOS over SSH Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/swift.html Alternative commands to install command line tools and Vapor from the CLI, useful when running over SSH. Sets up a temporary file to trigger the automated Command Line Tools installation. ```bash touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress softwareupdate -i $(softwareupdate -l | grep "\*.*Command Line" | grep $(sw_vers -productVersion) | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n') --verbose rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install vapor/tap/vapor ``` -------------------------------- ### Install Vapor on macOS with Homebrew Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/swift.html Commands to install the macOS command line tools, Homebrew, and Vapor. Requires physical access to the mac to run xcode-select and the Homebrew install script. ```bash xcode-select --install /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install vapor/tap/vapor ``` -------------------------------- ### Start Passenger Standalone with --port and --log-file Source: https://www.phusionpassenger.com/docs/tutorials/the_passenger_command/ruby Starts Passenger Standalone with a custom port and log file. The output shows the server startup details, including the PID file, log file path, environment, and access URL. Press Ctrl-C to stop the server. ```text copy$ passenger start --port 4000 --log-file awesome.log ======= Phusion Passenger Standalone web server started ======= PID file: /Users/phusion/myapp/tmp/pids/passenger.4000.pid Log file: /Users/phusion/myapp/awesome.log Environment: development Accessible via: http://0.0.0.0:4000/ You can stop Phusion Passenger Standalone by pressing Ctrl-C. =============================================================== ``` -------------------------------- ### Install system packages on Red Hat/CentOS/Rocky/Alma/Fedora/Amazon Linux/Scientific Linux Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations/oss/aws/ruby/nginx Installs curl, gpg, gcc, gcc-c++, make, which, and tar on Red Hat-based systems. Required for further installation steps and for installing common Ruby gems. ```bash $ sudo dnf install -y curl gpg gcc gcc-c++ make which tar ``` -------------------------------- ### Validate Passenger installation with passenger-config Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/osx.html Runs the validation script to check for common installation issues. The example output shows checks for PATH and duplicate installations passing. ```bash $ sudo /usr/local/bin/passenger-config validate-install * Checking whether this Phusion Passenger install is in PATH... ✓ * Checking whether there are no other Phusion Passenger installations... ✓ ``` -------------------------------- ### Create project directory with curl and unzip Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/java.html Creates the project directory by downloading and extracting the Spring guide archive, moving the initial project into place, and cleaning up unneeded files. Run these commands in the directory where you want the project to live. ```bash copycurl -LO https://github.com/spring-guides/gs-serving-web-content/archive/master.zip unzip master.zip rm master.zip mv gs-serving-web-content-master/initial/ ./ rm -rf gs-serving-web-content-master cd initial rm -rf *gradle* mvnw.cmd src/main/resources ``` -------------------------------- ### Enable EPEL repository Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Installs EPEL repository and enables it on Enterprise Linux. ```bash sudo dnf install -y dnf-utils sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm sudo dnf config-manager --enable epel sudo dnf clean all && sudo dnf update -y ``` -------------------------------- ### Install Maven on Linux Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/java.html Download and install Maven on Linux. The script fetches the latest binary tarball, extracts it, moves it to /opt/apache-maven, and adds it to PATH. ```bash copyURL=$(curl -s https://maven.apache.org/download.cgi | egrep -o 'http[^""]+apache.org[^""]+bin\.tar\.gz' | head -1) curl -O $URL tar xzvf apache-maven-*-bin.tar.gz rm apache-maven-*-bin.tar.gz mv apache-maven-* /opt/apache-maven export PATH=$PATH:/opt/apache-maven/bin ``` -------------------------------- ### Start Passenger Standalone server with 'passenger start' Source: https://www.phusionpassenger.com/docs/tutorials/the_passenger_command/ruby Starts a Passenger Standalone server. During startup, Passenger prints runtime parameters including the PID file, log file, environment, and accessible URL. The server runs in the 'development' environment, setting RAILS_ENV and RACK_ENV to 'development'. ```bash $ passenger start ======= Phusion Passenger Standalone web server started ======= PID file: /Users/phusion/myapp/tmp/pids/passenger.3000.pid 1 Log file: /Users/phusion/myapp/log/passenger.3000.log 2 Environment: development 3 Accessible via: http://0.0.0.0:3000/ 4 You can stop Phusion Passenger Standalone by pressing Ctrl-C. =============================================================== ``` -------------------------------- ### Install Ruby on Arch Linux Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/tarball.html Installs Ruby using pacman on Arch Linux. ```bash sudo pacman -S ruby ``` -------------------------------- ### Restart Nginx with kill and start commands Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/rubygems_rvm.html Restarts Nginx by first shutting it down with the PID file command and then starting it again with the start command. This is the recommended way to restart the Nginx installed by passenger-install-nginx-module. ```shell copy$ sudo kill $(cat /opt/nginx/logs/nginx.pid) $ sudo /opt/nginx/sbin/nginx ``` -------------------------------- ### Create user account and setup SSH key Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/automating_app_updates Create a user account for your application (replace 'myappuser' with your desired username) and set up its initial SSH key. Run these commands on each server. ```bash # Add user account $ sudo adduser myappuser && # Setup initial SSH key sudo mkdir -p ~myappuser/.ssh && sudo sh -c "cat $HOME/.ssh/authorized_keys >> ~myappuser/.ssh/authorized_keys" && \ sudo chown -R myappuser: ~myappuser/.ssh && sudo chmod 700 ~myappuser/.ssh && sudo sh -c "chmod 600 ~myappuser/.ssh/*" ``` -------------------------------- ### Validate Passenger installation with rvmsudo passenger-config validate-install Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations/oss/aws/ruby/nginx Validate the Passenger installation. The command checks that the install is in PATH and that no other Passenger installations exist. All checks should pass; if not, follow the on-screen suggestions. ```bash rvmsudo passenger-config validate-install * Checking whether this Phusion Passenger install is in PATH... ✓ * Checking whether there are no other Phusion Passenger installations... ✓ ``` -------------------------------- ### Install dependencies on Debian/Ubuntu Source: https://www.phusionpassenger.com/docs/advanced_guides/developing_with_passenger/ruby/dev_ssl Commands to update the system and install OpenSSL, Dnsmasq, and Nginx on Debian or Ubuntu distributions. ```bash $ sudo apt-get update $ sudo apt-get upgrade -y $ sudo apt-get install -y openssl dnsmasq $ sudo apt-get install -y nginx ``` -------------------------------- ### Install Java on macOS Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/java.html Download and install OpenJDK 11 on macOS by fetching the latest macOS binary from jdk.java.net and moving it to the Java Virtual Machines directory. ```bash URL=$(curl -s https://jdk.java.net/11/ | egrep -o 'http[^""]+osx[^""]+bin.tar.gz' | head -1) curl -O $URL tar xzvf openjdk-*bin.tar.gz rm openjdk-*bin.tar.gz mv jdk-*.jdk /Library/Java/JavaVirtualMachines/ ``` -------------------------------- ### Install Bundler with gem Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Installs Bundler, a tool for managing application gem dependencies, without generating documentation. ```shell $ gem install bundler --no-rdoc --no-ri ``` -------------------------------- ### Install curl, gpg, and compiler toolchain Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Install required packages on Debian/Ubuntu (apt) or Red Hat/CentOS/Rocky/Alma/Fedora/Amazon Linux/Scientific Linux (dnf). The compiler toolchain is needed for installing common Ruby gems. ```bash $ sudo apt-get update $ sudo apt-get install -y curl gnupg build-essential ``` ```bash $ sudo dnf install -y curl gpg gcc gcc-c++ make which tar ``` -------------------------------- ### Start Passenger Standalone Source: https://www.phusionpassenger.com/docs/tutorials/process_management/ruby Starts Passenger Standalone, which spawns a single process. Run this in the application directory before checking status. ```shell $ bundle exec passenger start ``` -------------------------------- ### passenger_min_instances example with passenger_max_pool_size and passenger_pool_idle_time Source: https://www.phusionpassenger.com/docs/references/config_reference Sets passenger_min_instances to 3 for the foobar.com server block, with passenger_max_pool_size 15 and passenger_pool_idle_time 10. When Nginx starts, no processes exist for foobar.com; the first visitor triggers one immediate process and two background spawns. After the idle timeout, the 3 processes are kept, and under a traffic spike Passenger spawns up to 12 more (15 - 3 = 12) and later cleans up 12, keeping 3. ```nginx copyhttp { ... passenger_max_pool_size 15; passenger_pool_idle_time 10; server { listen 80; server_name foobar.com; root /webapps/foobar/public; passenger_min_instances 3; } } ``` -------------------------------- ### Create Phoenix project with mix phx.new Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/elixir.html Creates a new Phoenix project named hello_world without webpack, Ecto, or HTML generation. Use this to set up a minimal API-only project. ```shell mix phx.new hello_world --no-webpack --no-ecto --no-html ``` -------------------------------- ### Install Rust on macOS via SSH Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/rust.html Install command line tools, Homebrew, and Rust entirely from the CLI, suitable for SSH sessions. ```bash touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress softwareupdate -i $(softwareupdate -l | grep "\*.*Command Line" | grep $(sw_vers -productVersion) | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n') --verbose rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install rust ``` -------------------------------- ### Install Ruby on Red Hat/CentOS/Rocky/Alma/Fedora/Scientific/Amazon Linux Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/tarball.html Installs Ruby and rubygem-rake using dnf. Requires EPEL to be enabled first. ```bash dnf install -y ruby rubygem-rake ``` -------------------------------- ### Install DotNet Core on RHEL Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/dotnetcore.html Installs DotNet Core 2.2 on RHEL 7 using the Red Hat subscription and Software Collections. Requires a Red Hat subscription and root privileges. ```bash subscription-manager register --username $USERNAME_EMAIL --password $PASSWORD --auto-attach subscription-manager repos --enable=rhel-7-server-dotnet-rpms dnf install -y rh-dotnet22 scl-utils scl enable rh-dotnet22 bash ``` -------------------------------- ### Enable EPEL repository Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Install EPEL and enable it. This is required for Passenger on Enterprise Linux. ```bash copy$ sudo dnf install -y dnf-utils $ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm $ sudo dnf config-manager --enable epel $ sudo dnf clean all && sudo dnf update -y ``` -------------------------------- ### Create a Vapor project Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/swift.html Commands to create a new Vapor project named Hello and change to its directory. ```bash vapor new Hello cd Hello ``` -------------------------------- ### Restart Nginx from source without init script Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/deploy If Nginx was installed from source and has no init script, kill the old process and start a new one using the PID file. ```bash $ sudo kill $(cat /opt/nginx/logs/nginx.pid) $ sudo /opt/nginx/sbin/nginx ``` -------------------------------- ### Install Passenger gem Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/rubygems_rvm.html Installs the Passenger gem. The --no-rdoc --no-ri flags speed up installation by skipping API documentation generation. If a permission denied error occurs, re-run with rvmsudo instead of sudo. ```bash $ gem install passenger --no-rdoc --no-ri ``` -------------------------------- ### Install DotNet Core on Ubuntu Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/dotnetcore.html Installs DotNet Core SDK 2.2 on Ubuntu 18.04 using the Microsoft package repository. Requires root privileges and includes adding the Microsoft repository and enabling the universe repository. ```bash apt install -y libicu60 zlib1g libkrb5-3 liblttng-ust0 libcurl4 libssl1.0.0 wget software-properties-common apt-transport-https wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb dpkg -i packages-microsoft-prod.deb add-apt-repository universe apt update apt install -y dotnet-sdk-2.2 ``` -------------------------------- ### Install Rust on CentOS/Rocky/Alma Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/rust.html Install the rust-toolset package on CentOS, Rocky, or Alma Linux using dnf. ```bash dnf install -y rust-toolset ``` -------------------------------- ### Install dependencies on macOS Source: https://www.phusionpassenger.com/docs/advanced_guides/developing_with_passenger/ruby/dev_ssl Commands to update the system and install OpenSSL, Passenger, Dnsmasq, and Nginx using Homebrew on macOS. ```bash $ sudo softwareupdate -i -a $ brew update $ brew upgrade $ brew install openssl passenger dnsmasq $ brew install nginx ``` -------------------------------- ### Install dependencies on Red Hat/CentOS/Fedora Source: https://www.phusionpassenger.com/docs/advanced_guides/developing_with_passenger/ruby/dev_ssl Commands to update the system and install OpenSSL, Dnsmasq, and Nginx on RHEL-based distributions. ```bash $ sudo dnf update -y $ sudo dnf install -y openssl dnsmasq openssl-perl $ sudo dnf install -y nginx ``` -------------------------------- ### Install SSH key for app user Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/deploying_your_app Install the user's SSH key so the app user can access the repository. These commands create the .ssh directory, copy the authorized_keys file, and set appropriate ownership and permissions. ```bash copy$ sudo mkdir -p ~myappuser/.ssh $ touch $HOME/.ssh/authorized_keys $ sudo sh -c "cat $HOME/.ssh/authorized_keys >> ~myappuser/.ssh/authorized_keys" $ sudo chown -R myappuser: ~myappuser/.ssh $ sudo chmod 700 ~myappuser/.ssh $ sudo sh -c "chmod 600 ~myappuser/.ssh/*" ``` -------------------------------- ### Install DotNet Core on Debian Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/dotnetcore.html Installs DotNet Core SDK 2.2 on Debian 9 using the Microsoft package repository. Requires root privileges and includes adding the Microsoft GPG key and repository. ```bash apt install -y libicu57 zlib1g libkrb5-3 libssl1.0.2 libcurl3 liblttng-ust0 wget gpg apt-transport-https wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ wget -q https://packages.microsoft.com/config/debian/9/prod.list mv prod.list /etc/apt/sources.list.d/microsoft-prod.list chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg chown root:root /etc/apt/sources.list.d/microsoft-prod.list apt update apt install -y dotnet-sdk-2.2 ``` -------------------------------- ### Open database.yml with nano Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/deploying_your_app Open config/database.yml for editing. The tutorial uses SQLite for demonstration purposes. ```shell $ nano config/database.yml ``` -------------------------------- ### Check Passenger processes with passenger-memory-stats Source: https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/rubygems_norvm.html Check whether Nginx has started the Passenger core processes. Run sudo passenger-memory-stats; you should see Nginx and Passenger processes. If none appear, there may be an installation or configuration problem. ```shell copy$ sudo passenger-memory-stats Version: 5.0.8 Date : 2015-05-28 08:46:20 +0200 ... ---------- Nginx processes ---------- PID PPID VMSize Private Name ------------------------------------- 12443 4818 60.8 MB 0.2 MB nginx: master process /usr/sbin/nginx 12538 12443 64.9 MB 5.0 MB nginx: worker process ### Processes: 3 ### Total private dirty RSS: 5.56 MB ----- Passenger processes ------ PID VMSize Private Name -------------------------------- 12517 83.2 MB 0.6 MB PassengerAgent watchdog 12520 266.0 MB 3.4 MB PassengerAgent server 12531 149.5 MB 1.4 MB PassengerAgent logger ... ``` -------------------------------- ### Install Passenger Nginx module via APT Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Adds Phusion's APT repository and installs the Passenger Nginx module. Requires an existing Nginx installation from the system repository; using a different Nginx repo requires compiling a dynamic module instead. ```bash # Install our PGP key and add HTTPS support for APT sudo apt-get install -y dirmngr gnupg apt-transport-https ca-certificates curl curl https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key-2025.txt | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/phusion.gpg >/dev/null # Add our APT repository sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger trixie main > /etc/apt/sources.list.d/passenger.list' sudo apt-get update # Install Passenger + Nginx module sudo apt-get install -y libnginx-mod-http-passenger ``` -------------------------------- ### Install DotNet Core on CentOS/Rocky/Alma Source: https://www.phusionpassenger.com/docs/advanced_guides/gls/dotnetcore.html Installs DotNet Core SDK 2.1 on CentOS/Rocky/Alma using the Microsoft package repository. Requires root privileges and includes enabling EPEL and updating the package index. ```bash dnf install -y epel-release dnf install -y lttng-ust openssl-libs krb5-libs libicu zlib rpm -Uvh https://packages.microsoft.com/config/rhel/8/packages-microsoft-prod.rpm dnf update -y dnf install -y dotnet-sdk-2.1 ``` -------------------------------- ### Default Capfile contents Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/automating_app_updates/ruby The default Capfile generated by cap install. It loads the DSL setup and default deployment tasks, and includes commented-out lines for optional recipes from other gems. Custom tasks are loaded from lib/capistrano/tasks/*.rake. ```ruby # Load DSL and set up stages require 'capistrano/setup' # Include default deployment tasks require 'capistrano/deploy' # Include tasks from other gems included in your Gemfile # # For documentation on these, see for example: # # https://github.com/capistrano/rvm # https://github.com/capistrano/rbenv # https://github.com/capistrano/chruby # https://github.com/capistrano/bundler # https://github.com/capistrano/rails # https://github.com/capistrano/passenger # # require 'capistrano/rvm' # require 'capistrano/rbenv' # require 'capistrano/chruby' # require 'capistrano/bundler' # require 'capistrano/rails/assets' # require 'capistrano/rails/migrations' # require 'capistrano/passenger' # Load custom tasks from `lib/capistrano/tasks' if you have any defined Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } ``` -------------------------------- ### Passengerfile.json configuration example Source: https://www.phusionpassenger.com/docs/tutorials/the_passenger_command/ruby Example Passengerfile.json that customizes the port, log file path, and environment name. Passenger Standalone automatically loads this file if it exists. Command line options have equivalent configuration keys: omit the initial two dashes and replace other dashes with underscores. ```json copy{ "port": 4000, "log_file": "awesome.log", "environment": "staging" } ``` -------------------------------- ### Multi-server role example Source: https://www.phusionpassenger.com/docs/advanced_guides/deployment_and_scaling/nginx/automating_app_updates Example of simple role syntax for multiple servers. Add hosts to app and web roles, but not to db role because db role determines which server runs Rails database migrations. ```ruby copy# Multi-server example role :app, %w{myappuser@myserver.com myappuser@myserver2.com} role :web, %w{myappuser@myserver.com myappuser@myserver2.com} role :db, %w{myappuser@myserver.com} ``` -------------------------------- ### Install latest Ruby with RVM Source: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations Installs the latest Ruby version and sets it as the default using RVM. Run this when you do not have a specific Ruby version requirement. ```shell $ rvm install ruby $ rvm --default use ruby ```