Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

How to do it...

From your command line, let's start an Nginx instance.

You could go about this in one of three ways.

  1. Use apt to install Nginx from the default repositories
  2. Use Docker to pull the official Nginx image from Docker Hub
  3. Set up a VM and install Nginx inside it, using port forwarding from the host

These could be done in the following fashion:

$ sudo apt install nginx -y$ sudo docker run -p80 -d --rm nginx$ cat << HERE > Vagrantfile# -*- mode: ruby -*-# vi: set ft=ruby :\$provisionScript = <<-SCRIPTapt install nginx -ySCRIPTVagrant.configure("2") do |config|  config.vm.define "debian8" do |debian8|    debian8.vm.box = "debian/jessie64" debian8.vm.network "forwarded_port", guest: 80, host: 8080    debian8.vm.provision "shell", inline: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content