SlideShare a Scribd company logo
Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.com
Servers for Hackers Server Administration for
Programmers 1 (2018-06-19) Edition Chris Fidao
https://textbookfull.com/product/servers-for-hackers-server-
administration-for-programmers-1-2018-06-19-edition-chris-
fidao-2/
OR CLICK BUTTON
DOWNLOAD NOW
Explore and download more ebook at https://textbookfull.com
Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.
Servers for Hackers Server Administration for Programmers
1 (2018-06-19) Edition Chris Fidao
https://textbookfull.com/product/servers-for-hackers-server-
administration-for-programmers-1-2018-06-19-edition-chris-fidao-2/
textboxfull.com
Linux Basics for Hackers Occupytheweb
https://textbookfull.com/product/linux-basics-for-hackers-
occupytheweb/
textboxfull.com
ubuntu and Centos linux server administration Md. Tanvir
Rahman
https://textbookfull.com/product/ubuntu-and-centos-linux-server-
administration-md-tanvir-rahman/
textboxfull.com
C 20 for Programmers 3rd Edition Harvey Deitel
https://textbookfull.com/product/c-20-for-programmers-3rd-edition-
harvey-deitel/
textboxfull.com
Computer Graphics for Java Programmers 3rd Edition Leen
Ammeraal
https://textbookfull.com/product/computer-graphics-for-java-
programmers-3rd-edition-leen-ammeraal/
textboxfull.com
JavaScript for impatient programmers (ES2021 edition) Dr.
Axel Rauschmayer
https://textbookfull.com/product/javascript-for-impatient-programmers-
es2021-edition-dr-axel-rauschmayer/
textboxfull.com
Raspberry Pi for Python Programmers Cookbook Second
Edition Tim Cox
https://textbookfull.com/product/raspberry-pi-for-python-programmers-
cookbook-second-edition-tim-cox/
textboxfull.com
Windows Server 2019 Administration Fundamentals : a
Beginner's Guide to Managing and Administering Windows
Server Environments, 2nd Edition. Bekim Dauti
https://textbookfull.com/product/windows-server-2019-administration-
fundamentals-a-beginners-guide-to-managing-and-administering-windows-
server-environments-2nd-edition-bekim-dauti/
textboxfull.com
D3 for the Impatient Interactive Graphics for Programmers
and Scientists Philipp K. Janert
https://textbookfull.com/product/d3-for-the-impatient-interactive-
graphics-for-programmers-and-scientists-philipp-k-janert/
textboxfull.com
PDF Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao download
PDF Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao download
Servers for Hackers
Server Administration for Programmers
Chris Fidao
This book is for sale at http://leanpub.com/serversforhackers
This version was published on 2018-06-19
* * * * *
This is a Leanpub book. Leanpub empowers authors and publishers
with the Lean Publishing process. Lean Publishing is the act of
publishing an in-progress ebook using lightweight tools and many
iterations to get reader feedback, pivot until you have the right book
and build traction once you do.
* * * * *
© 2014 - 2018 Chris Fidao
Table of Contents
Servers
Video Site
Book Issues
Introduction
Accidental Sysadmin Syndrome
Assumptions
Linux Distributions
The Sandbox
Install Virtualbox and Vagrant
Configure Vagrant
Vagrant Up!
Basic Commands
Basic Software
Review
Security
Users and Access
IP Addresses
Creating a New User
Making Our User a Super User
Setting Up the Firewall: Iptables
Adding these rules
Inserting Rules
Deleting Rules
Saving Firewall Rules
Defaulting to DROP Over ACCEPT
Logging Dropped Packets
Firewalls with UFW
Fail2Ban
Iptables Integration
Installation
Configuration
Automatic Security Updates
Package Managers
Apt
New (as of 16.04 Xenial, continuing into 18.04 Bionic)
Installing
Repositories
Examples
Searching Packages
Permissions and User Management
Permissions
Checking Permissions
Changing Permissions
User Management
Creating Users
Umask & Group ID Bit
ACL’s
Running Processes
Webservers
HTTP, Web Servers and Web Sites
A Quick Note on DNS
DNS & Hosts File
Xip.io
Virtual Hosts
Hosting Web Applications
Three Actors
Apache
Installing
Configuration
Virtual Hosts
Apache and Web Applications
MPM Configuration
Security Configuration
Envvars
Nginx
Features
Installation
Web Server Configuration
Servers (virtual hosts)
Integration with Web Applications
PHP
Installation
Configuration
PHP-FPM
PHP in Nginx: Subdirectories
Server Setup for Multi-Tenancy Apps
DNS
Multi-Tenancy in Apache
Multi-Tenancy in Nginx
SSL Certificates
SSL Overview
Using SSL in Your Application
Creating Self-Signed Certificates
Creating a Wildcard Self-Signed Certificate
Apache Setup
Nginx Setup
One Server Block
Extra SSL Tricks
LetsEncrypt
Web Server Security
Install Letsencrypt
Install a Certificate
Nginx Configuration
Renewal
Multi-Server Environments
Implications of Multi-Server Environments
Asset Management
Sessions
Lost Client Information
SSL Traffic
Logs
Load Balancing with Nginx
Balancing Algorithms
Configuration
Mapping Headers
SSL with Nginx
SSL-Termination
SSL-Passthru Support
When to use Pass-Thru
Load Balancer (Server A, at 52.90.130.140):
Web Server (Server B, at 52.23.215.245):
Load Balancing with HAProxy
Common Setups
Installation
HAProxy Configuration
Monitoring HAProxy
Sample NodeJS Web Server
SSL with HAProxy
HAProxy with SSL Termination
HAProxy with SSL Pass-Through
Sample NodeJS Web Server
Web Cache
Nuts and Bolts of HTTP Caching
Object Caches
Web Caches
Types of HTTP Caches
An Origin Server
Testing Caching Mechanisms
Nginx Web Caching
Use Cases
How It Will Work
Origin Server
Cache Server
Proxy Caching
Example: Caching Specific URIs
Varnish
Origin Server
Install Varnish
Basic Configuration
Increasing Cache Hit Rate
Varnish Tools
Extra Resources
Logs
Logrotate
What does Logrotate do?
Configuring Logrotate
Going Further
Rsyslog
Configuration
Usage
Should I Use Rsyslog?
Sending To Rsyslog From An Application
File Management, Deployment & Configuration
Management
Managing Files
Copying Files Locally
SCP: Secure Copy
Rsync: Sync Files Across Hosts
Deployment
Auto-deploy with GitHub
How it Works
Node Listener
Shell Script
Putting it together
Firewall
Configuration Management with Ansible
Install
Managing Servers
Basic: Running Commands
Basic Playbook
Roles
Facts
Vault
SSH
Logging in
SSH Config
SSH Tunneling
Local Port Forwarding
Remote Port Forwarding
One-Off Commands & Multiple Servers
Basic Ansible
Monitoring Processes
A Sample Script
System Services
System V Init (SysVinit, SysV)
Systemd
Upstart
The Service Command
Using These Systems
Supervisord
A Chain of Process Monitors
Installation
Configuration
Controlling Processes
Web Interface
Forever
Installation
Usage
Circus
Installation
Configuration
Controlling Processes
Web Interface
Starting on Boot
Development and Servers
Serving Static Content
Built-In
NodeJS
Dynamic Content
Servers
Servers can be fun!
Knowing how to setup, run and administer a server can be as
empowering as coding itself.
Some applications have needs stretching beyond what managed
hosting providers are willing to support. This shouldn’t stop us from
building our applications.
Servers can be hard!
Consumers expect and demand services to be functioning.
Downtime can cost real money, and is often met with frustration and
anger.
At the same time, servers are increasingly commodified. Hosting
once involved a few, powerful servers. Now, the modern Cloud
consists of many small, cheap virtual machines. The more servers
we have, the more likely we are to run into issues.
The end result is that we need to build for failure. This is a Hard
Problem™, and requires us to know a lot about the servers running
our applications.
This book exists because we developers are now faced with System
Administration issues. We need to at least know the basics of what
goes into hosting and serving our applications.
So, let’s not get stuck with limiting hosting or broken
servers!
Video Site
Since publishing this book, I’ve also collected my newsletter editions,
articles and videos to https://serversforhackers.com.
I’ll be continuously adding new videos! These continue to
concentrate on topics important to web servers and web
development, from the basic to the complex.
The videos all come with a write-up of the commands and
information presented in the video, usually along with some extra
resources. This makes the videos easy to come back to for quick
reference later.
Servers for Hackers Video Site
Book Issues
All feedback is hugely appreciated! Any questions, comments, issues,
stories of glory/valor and praise can be directed to the Github
repository created for feedback!
https://github.com/Servers-for-Hackers/the-book
Introduction
Accidental Sysadmin Syndrome
You’re a developer.
A server broke, and you’re the only one around to fix it.
You have a special-needs application that requires specific software.
You need to setup a development server, and will spend half of your day
trying to get some “simple” configuration to work.
These are symptoms of Accidental Sysadmin Syndrome.
This book is for developers who find themselves needing or wanting to
be a SysAdmin.
Assumptions
This book assumes at least a passing familiarity with the command line.
Those who have logged into the shell and poked around a server before
will benefit the most.
If you are new to the command line, concentrate on getting comfortable with
Vagrant. This will help familiarize you with using the command line and
servers.
Linux Distributions
There are many distributions of Linux. Some popular ones are Arch,
Debian, Ubuntu, Redhat, CentOS, Fedora and CoreOS.
Many of these distributions are related to each other in some way. For
example, some of these distributions are “downstream” from others.
A downstream Linux distribution includes the upstream’s distribution’s
changes, and may add their own.
For example, Ubuntu is based on Debian and is considered downstream
of Debian. CentOS is based on RedHat and is therefore downstream
from RedHat. RedHat sponsors Fedora and so Fedora is very similar to
RedHat and CentOS (although it has a much more rapid release cycle).
Each distribution has opinions about Linux and its use. It would be too
cumbersome to cover all topics for each distribution and so I’ve
chosen to concentrate on Ubuntu.
This book concentrates on Debian/Ubuntu, however, the serversforhackers.com
video site covers multiple distributions!
Ubuntu is one of the most popular server and desktop distributions. It
has a great set of configurations that come out of the box, allowing us
to worry less about configuration until we need to. This makes it easy to
use.
Ubuntu updates software packages quickly relative to some other
distributions. However, updating to the latest software makes it easier to
introduce new bugs and version conflicts.
Luckily, Ubuntu’s LTS releases are a good solution to this potential issue.
LTS stands for Long Term Support
LTS versions are released every 2 years but support for them last 5
years. This makes them ideal for longer-term use.
As major versions are released yearly, only every other major release of
Ubuntu is an LTS. The current LTS is 18.04 - the following LTS release
will be 20.04.
Xenial, the codename for Ubuntu 16.04, was released in April of 2016.
Support officially ends 5 years later (April of 2021).
Bionic, the codename for Ubuntu 18.04, was released in April of 2018.
This will be a relevant server for at least 2 years, but likely beyond that
with support officially ending 5 years later (April of 2023).
Ubuntu LTS releases offer more stability and security, but generally do
not prevent us from installing the latest software when we need to. This
makes them ideal candidates for every-day server usage.
Popularity is Relative
RedHat Enterprise (RHEL) is a popular distribution in the enterprise world.
Many hosting companies use CentOS along with cPanel/WHM or Plesk control
panels. In the open source/startup worlds, Ubuntu is one of the most popular
distributions of Linux.
Because Ubuntu is closely tied to Debian, most, but certainly not all,
topics included here will be exactly the same for Debian.
For RedHat/CentOS distributions, most topics will have small-to-large
differences from what you read here.
In any case, much of what you learn here will be applicable to all
distributions.
I recommend this Rackspace knowledge-base article for more
information on the various Linux distributions:
https://community.rackspace.com/products/f/25/t/6677.
The Sandbox
If you want a sandbox - a place to safely play with a server - this
chapter is for you.
The topics of the “Sandbox” section is not necessary to follow along in
this book, but it will be helpful.
You’ll learn how to setup a local server on which you can develop an
application or experiment with new technology. As a bonus, you’ll avoid
mucking up your computer with development software!
We’ll briefly cover using Vagrant to setup a local server.
The benefit of Vagrant is that it will let us use a “real” server to test on.
You can create a server also used in production. Virtual servers are also
safe - we can thoroughly mess them up, throw them away and recreate
them as much as we need.
Let’s get started with Vagrant!
Install Virtualbox and Vagrant
Virtualbox is a tool for creating Virtual Machines. Vagrant is a tool that
lets you easily create and manage virtual machines.
Vagrant takes care of file sharing, network setup and other sticky topics.
A Virtual Machine is a (guest) computer running inside of your (host) computer.
VirtualBox “virtualizes” hardware by making virtual servers think they are
running on real hardware.
A guest computer can be almost anything - Windows, Mac, Linux or other
operating systems.
Here’s some important vocabulary: Your computer is called the “host”
machine. Any virtual machine running within the host machine is called a
“guest” machine.
I’ll use the term “virtual machine” with “server” interchangeably, as we’ll be
creating Ubuntu servers (VMs) to learn on.
To get started, the first step is to install Virtualbox and Vagrant. These
are available for Windows, Mac and Linux. Installing them only involves
browsing to their websites and downloading/running their installers. You
may need to restart your Windows after installing Vagrant.
For this book, you will need Vagrant version 1.5 or higher. Most versions of
Virtualbox should work, I always update to the latest of these two tools.
Configure Vagrant
Once you have installed these, we can get started! We’ll get Vagrant
going by running the following commands on our host machine.
On Mac, open up the Terminal app. On Windows, you can use the CMD
prompt (or your command line tool of choice) to run Vagrant commands.
On Mac:
1 mkdir -p ~/Sites/sfh
2 cd ~/Sites/sfh
3 vagrant init bento/ubuntu-18.04
On Windows:
1 mkdir C:sfh
2 cd C:sfh
3 vagrant init bento/ubuntu-18.04
From here on, I won’t differentiate between Windows and Mac commands.
We’ll mostly be within a server in any case, so the commands will not vary no
matter what type of computer your host is.
The vagrant init command creates a new file called Vagrantfile. This
file is configured to use Ubuntu LTS server.
See the included video for getting started with Vagrant on
Virtualbox.
The Vagrantfile created will look something like this (when all the
comments are stripped out):
File: Vagrantfile
1 Vagrant.configure(2) do |config|
2
3 config.vm.box = "bento/ubuntu-18.04"
4
5 end
If you look at your file, you’ll see lots of comments, which show some
configurations you can use. I’ll cover a few that you should know about.
Networking
The basic install of Vagrant will do some “port forwarding”. For example,
if Vagrant forwards port 8080 to the server’s port 80, then we’ll go to
http://localhost:8080 in your browser to reach the server’s web server at
port 80. This has some side effects.
A side effect of this port forwarding has to do with interacting with web
applications. You’ll need to access web pages in your browser using the
port which Vagrant sets up, often “8888”. Instead of “http://localhost”,
you’ll use “http://localhost:8888” in the browser. However, your
application may not be coded to be aware of the non-standard port
(8888). The application may redirect to, create links for or submit forms
to standard port 80 instead of the forwarded port!
I like to get around this potential problem by assigning a private-network
IP address to my Vagrant server.
To do this, open up your Vagrantfile and make it look like this:
File: Vagrantfile
1 Vagrant.configure(2) do |config|
2
3 config.vm.box = "bento/ubuntu-18.04"
4
5 config.vm.network :private_network, ip: "192.168.22.10"
6
7 end
The private_network directive tells Vagrant to setup a private network.
Our host and guest machines can communicate on this network. This
assigns the guest server the IP address of 192.168.22.10. Note that each
server should have a unique IP address just in case they are run at the
same time.
There are IP address ranges set aside for private networks. Generally you can
use 10.0.0.0 - 10.255.255.255, 172.16.0.0 - 172.31.255.255, and
192.168.0.0 - 192.168.255.255. However, always avoid the lower and upper IP
addresses within those ranges, as they are often reserved.
Vagrant Up!
Once the Vagrantfile changes are saved, we can run the vagrant up
command. This will download the bento/ubuntu-18.04 base server
(“box”) and run it with our set configuration.
1 vagrant up
If Vagrant cannot find the Vagrantfile, you need to cd into the directory
containing the Vagrantfile.
You’ll see some output as Vagrant sets up the Ubuntu server. Once it’s
complete, run vagrant status to see that it’s powered on and running.
1 vagrant status
You should see output similar to this:
1 Current machine states:
2
3 default running (virtualbox)
4
5 The VM is running. To stop this VM, you can run `vagrant halt` to
6 shut it down forcefully, or you can run `vagrant suspend` to simply
7 suspend the virtual machine. In either case, to restart it again,
8 run `vagrant up`.
Our machine, named “default” is running, using VirtualBox.
Now we need to log into this server. Vagrant sets up a way to log in
without needing a password nor SSH key. Try running the command
vagrant ssh-config. It will show you some information, including the
port forwarded that you can use to SSH into, and the private key
configured.
That’s nice for debugging, but you don’t need that information. We can
run the vagrant ssh command to log directly in.
Congratulations, you’re now inside of a real server! Poke around a bit -
try some of these commands out if they are not familiar to you:
ll - A built-in alias for the command ls -lah, this will list all files
and directories within the current directory, along with their current
size in human-readable format.
lsb_release -a - A command to show all release information about
this server.
top - A command to show running processes and various system
information. Use the ctrl+c keyboard shortcut to return to the
prompt.
clear - A command to clear currently visible output within your
terminal. The keyboard shortcut ctrl+l will do this as well.
df -h - See how much hard drive space is used/available.
free -m - See how much memory (RAM) is used/available. Due to
various caching mechanisms, this output can be a tad confusing. To
see the actual amount of available memory, take the value from the
free column in the row that says -/+ buffers/cache.
File Sharing
Vagrant sets up file sharing for you. The default shares the server’s
/vagrant directory to the host’s directory containing the Vagrantfile.
In our example, the host machine’s ~/Sites/sfh directory is shared with
the guest’s /vagrant directory.
The tilde ~ expands to the current user’s home directory.
~/Sites/sfh expands to /Users/fideloper/Sites/sfh on my
Macintosh.
From within our server, let’s list the contents of the /vagrant:
1 ls -la /vagrant
Its output will be something like this:
1 drwxr-xr-x 1 vagrant vagrant 136 Jun 14 16:56 ./
2 drwxr-xr-x 23 root root 4096 Jun 14 19:33 ../
3 drwxr-xr-x 1 vagrant vagrant 102 Jun 14 16:54 .vagrant/
4 -rw-r--r-- 1 vagrant vagrant 480 Jun 14 16:56 Vagrantfile
We see our Vagrantfile and a hidden .vagrant directory containing
some meta data used by Vagrant.
On my host machine (my Macintosh), I’ll create a new text file in
~/Sites/sfh named hello.txt:
1 echo "Hello World" > ~/Sites/sfh/hello.txt
Now if I log into the guest server, I’ll see that file is available there as
well:
1 # See files in /vagrant
2 cd /vagrant
3 ls -la
4
5 # Output the content of "hello.txt"
6 # with the "cat" command
7 cat /vagrant/hello.txt # Output: "Hello World"
This allows us to edit files from our host machine while running the
server software within our guest server!
A Vagrantfile with the default file sharing configuration in place would
look like this:
File: Vagrantfile
1 Vagrant.configure(2) do |config|
2
3 config.vm.box = "bento/ubuntu-18.04"
4
5 config.vm.network :private_network, ip: "192.168.22.10"
6
7 # Share Vagrantfile's directory on the host with /vagrant on the
guest
8 config.vm.synced_folder ".", "/vagrant"
9
10 end
Server Network
Let’s check out the network configuration. Within the server, run the
command ifconfig:
1 ifconfig
This usually has a good amount of output:
1 eth0 Link encap:Ethernet HWaddr 08:00:27:aa:0e:10
2 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
3 inet6 addr: fe80::a00:27ff:feaa:e10/64 Scope:Link
4 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
5 RX packets:558 errors:0 dropped:0 overruns:0 frame:0
6 TX packets:379 errors:0 dropped:0 overruns:0 carrier:0
7 collisions:0 txqueuelen:1000
8 RX bytes:56936 (56.9 KB) TX bytes:48491 (48.4 KB)
9
10 eth1 Link encap:Ethernet HWaddr 08:00:27:ac:ef:d2
11 inet addr:192.168.22.10 Bcast:192.168.22.255
Mask:255.255.255.0
12 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
13 RX packets:4 errors:0 dropped:0 overruns:0 frame:0
14 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
15 collisions:0 txqueuelen:1000
16 RX bytes:1188 (1.1 KB) TX bytes:958 (958.0 B)
17
18 lo Link encap:Local Loopback
19 inet addr:127.0.0.1 Mask:255.0.0.0
20 inet6 addr: ::1/128 Scope:Host
21 UP LOOPBACK RUNNING MTU:65536 Metric:1
22 RX packets:12 errors:0 dropped:0 overruns:0 frame:0
23 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
24 collisions:0 txqueuelen:0
25 RX bytes:888 (888.0 B) TX bytes:888 (888.0 B)
The ifconfig command will one day be replaced by the ip command, but not
yet!
The ifconfig command output a lot of content! What are we looking at?
Well without getting too deep into this, we are looking at three networks
setup within this server. Each network is called an “interface”.
lo - The loopback interface. This is used for internal communication
between services within the server. This is “localhost” - 127.0.0.1
eth0 and eth1 - These are two additional networks created as well.
We can see the IP address we assigend the server at eth1 -
192.168.22.10. The server also has its own private network, with
the IP address 10.0.2.15 assigned to this machine.
The ifconfig command is a quick way to check the IP address of your
server as well as see the various networks the server is connected to.
You’ll always see a loopback interface. You’ll usually see an internal
network, useful for communicating within a local network such as a data
center.
Most server providers will assign a server a public IP address. Servers
with a public IP address can usually be reached by users on the internet.
Basic Commands
We’ll be using the command line for 99.9% of this book. On Mac and
most Linux desktop distributions, this means using the Terminal app.
On Windows, this means using the CMD prompt, or any other shell you
might install. I’m personally partial to Git Bash, which is usually installed
alongside Git on Windows. You can run the most common Linux
commands with it.
If you’re not logged into your Vagrant server, log back in using vagrant
ssh.
Here are some commands you’ll need to know for getting around a
server:
pwd - Print working directory. The “working directory” is the directory you
are currently in. When you first log into a server, you’re usually placed in
the user’s “home” directory, most often at /home/username. In our
Vagrant server, we’ll be placed in the /home/vagrant directory when we
log in.
ls - List Directory Contents
1 # List contents of current working directory
2 ls
3
4 # List contents in a list form, with extra information:
5 ls -l
6
7 # List contents, including "hidden" files/folders
8 ls -la
9
10 # Add human-readable file/folder sizes:
11 ls -lah
cd - Change Directory.
1 # Change into the "/home/fideloper/sites/sfh" directory.
2 cd /home/fideloper/sites/sfh
3
4 # Same as above, but with the "~" shortcut
5 # to the current users home directory
6 cd ~/sites/sfh
mkdir - Create a directory
1 # Create the `sfh` directory
2 # inside of /home/fideloper/sites/sfh
3 mkdir ~/sites/sfh
4
5 # Create the /home/fideloper/sites/sfh directory and
6 # any directory in between that doesn't exist
7 mkdir -p ~/sites/sfh
rm - Delete a file or directory
1 # Delete (permanently) the `file.ext` file.
2 rm /path/to/file.ext
3
4 # Delete (recursively) the `/path/to/directory` directory.
5 rm -r /path/to/directory
6
7 # the additional `f` flag is to "force" the action,
8 # without prompting to make sure you want to do it.
9 # This is dangerous.
10 rm -rf /path/to/directory
Basic Software
When we get a new server, it is useful to install basic tools that are used
again and again. What tools you install will change as dictated by your
requirements and experience.
These can include editors (vim, nano), http tools (wget, curl),
monitoring tool (htop), searching tools (ack) and anything else! Your
personal list of favorites will grow as you gain experience.
Here’s what I install:
curl - Making HTTP requests
wget - Retrieve files from the web
unzip - Unzip zip files
git - Git version control
ack - An advanced search tool for searching content of files
htop - Interactive process viewer (better than the simple “top”)
vim - The timeless editor. Pro-Tip: Hit “esc” then type “:q” then hit
“Enter” to quit. Now you know.
tmux - Terminal Multiplexor - Basically, split your terminal session
into different panes
software-properties-common - This is specific to Ubuntu. We’ll
use it to add software repositories that allow us to install the latest
software.
As of Ubuntu 14.04, the add-apt-repository command is now included in the
software-properties-common package rather than the python-software-
properties package. This holds true for 16.04 and 18.04 as well.
Don’t worry if you’re not sure what that means or aren’t familiar with the add-
apt-repository command, it will be covered in the “Package Managers”
section.
Install the Basics
The first thing we’ll use is the apt command to install our packages:
1 sudo apt install curl wget unzip git ack-grep htop 
2 vim tmux software-properties-common
Let’s cover this command:
sudo - We used “sudo” as we need to install these items as a super
user (the root user, essentially). Only some users are allowed to use
“sudo”. If you are already user “root” while installing these, then
you don’t need to use “sudo” before any command.
apt install - Install packages with APT
Then we list all the packages we want to install, separated by a
space
This command will prompt us to make sure we want to install all of these
packages. We could also add the -y flag to skip the prompt: sudo apt install
-y curl wget [...].
Note that I also split the command into two lines by escaping the newline
character with a backslash.
Review
This chapter was a quick primer on Vagrant and some server basics. We
saw how to download and install VirtualBox and Vagrant, how to
configure Vagrant, and how to install basic software.
This is not the only way to go about this. You may want to use a remote
server, rather than have one running on your local computer. I suggest
using Digital Ocean or Linode. Use what works best for you!
Another Random Scribd Document
with Unrelated Content
PDF Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao download
PDF Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao download
The Project Gutenberg eBook of Tough yarns,
vol. 1
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.
Title: Tough yarns, vol. 1
A series of naval tales and sketches to please all
hands, from the swabs on the shoulders down to the
swabs in the head
Author: M. H. Barker
Release date: February 20, 2024 [eBook #72996]
Language: English
Original publication: Philadelphia: E. L. Carey and A. Hart, 1835
Credits: hekula03, Terry Jeffress and the Online Distributed
Proofreading Team at https://www.pgdp.net (This book
was produced from images made available by the
HathiTrust Digital Library.)
*** START OF THE PROJECT GUTENBERG EBOOK TOUGH
YARNS, VOL. 1 ***
TOUGH YARNS;
A SERIES
OF
NAVAL TALES AND SKETCHES
TO PLEASE ALL HANDS,
From the Swabs on the Shoulders down to the Swabs in the Head.
BY THE OLD SAILOR,
AUTHOR OF “GREENWICH HOSPITAL,” ETC.
IN TWO VOLUMES.
Vol. I.
PHILADELPHIA:
E. L. CAREY & A. HART.
BALTIMORE:
CAREY, HART & Co.
BOSTON:
WILLIAM D. TICKNOR.
1835.
E. G. Dorsey, Printer,
12 Library Street.
TO
CAPTAIN MARRYATT, R. N.
AUTHOR OF
‘The King’s Own,’ ‘Newton Foster,’ ‘Peter Simple,’
etc., etc.
THESE PAGES ARE DEDICATED
BY
THE OLD SAILOR.
PDF Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao download
CONTENTS OF VOL. I.
PAGE
Greenwich Hospital, 9
Tom Brookes, 145
Daddy Davy, the Negro, 159
PDF Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao download
PREFACE.
Once more I present myself before the Public in a Book; and
whatever all hands may think of it, I can assure them it is no joke to
keep one’s brains like a winch, continually spinning yarns. However,
as my “Greenwich Hospital” met with a favourable reception, I
have been induced to try another launch—and—here I am at the
service of my readers.
THE OLD SAILOR.
TOUGH YARNS.
GREENWICH HOSPITAL,
The grand depository of human fragments,—the snug harbour for
docked remnants,—Greenwich Hospital! Who is there that has stood
upon that fine terrace, when the calm of evening has shed its
influence on the spirit, and nature’s pencil intermingling light and
shade has graced the landscape with its various tints, without feeling
delighted at the spectacle? No sound is heard to break the stillness
of the hour, save when the sea-boy trills his plaintive ditty, studious
to grace the turnings of his song, for it was his mother taught it him,
and her he strives to imitate. To him the tide rolls on unheeded; he
sees not the tall mast, the drooping sail; ah, no! his heart is in the
cottage where he knew his first affection, when with a smile of
infantile delight he drew his nourishment from that fond bosom lately
bedewed with tears at parting.
Who is there that has not exulted in the scene, when the proud
ship has spread her canvass to the breeze to carry forth the produce
of our country to distant lands? or when returning to her own home-
shores, laden with the luxuries of foreign climes, the gallant tars
have
“Hailed each well-known object with delight!”
Ay, there they stand! the veterans of the ocean, bidding defiance to
care and sorrow, full of mirth and jollity although they are moored in
tiers. They are critics too, deep critics; but they cannot fancy the
steam vessel with a chimney for a mast, and fifty yards of smoke for
a pendant. These are the men that Smollett pictured,—the Jack
Rattlins and the Tom Pipes of former years. Ay, those were rattling
days and piping times! There is no place upon earth, except
Greenwich, in which we can now meet with them, or find the
weather-roll or lee-lurch to perfection. They are all thorough-bred,
and a thorough-bred seaman is one of the drollest compounds in
existence; a mixture of all that is ludicrous and grave,—of undaunted
courage and silly fear. I do not mean the every-day sailor, but the
bold, daring, intrepid man-of-war’s man; he who in the heat of action
primed his wit and his gun together, without a fear of either missing
fire.
The real tar has a language peculiarly his own, and his figures of
speech are perfect stopper-knots to the understanding of a
landsman. If he speaks of his ship, his eloquence surpasses the
orations of a Demosthenes, and he revels in the luxuriance of
metaphor. The same powers of elocution, with precisely the same
terms, are applied to his wife, and it is a matter of doubt as to which
engrosses the greatest portion of his affection,—to him they are both
lady-ships. Hear him expatiate on his little barkey, as he calls his
wooden island, though she may carry a hundred-and-fifty guns and a
crew of a thousand men. “Oh! she’s the fleetest of the fleet; sits on
the water like a duck; stands under her canvass as stiff as a crutch;
and turns to windward like a witch!” Of his wife he observes, “What a
clean run from stem to starn! She carries her t’gall’nt sails through
every breeze, and in working hank for hank never misses stays!” He
will point to the bows of his ship, and swear she is as sharp as a
wedge, never stops at a sea, but goes smack through all. He looks
at his wife, admires her head-gear, and out-riggers, her braces and
bow-lines; compares her eyes to dolphin-strikers, boasts of her fancy
and fashion-pieces, and declares that she darts along with all the
grace of a bonnetta. When he parts with his wife to go on a cruise,
no tear moistens his cheek, no tremulous agitation does discredit to
his manhood: there is the honest pressure of the hand, the fervent
kiss, and then he claps on the topsail-halliards, or walks round at the
capstan to the lively sounds of music. But when he quits his ship, the
being he has rigged with his own fingers, that has stood under him in
many a dark and trying hour, whilst the wild waves have dashed over
them with relentless fury, then—then—the scuppers of his heart are
unplugged and overflow with the soft droppings of sensibility. How
often has he stood upon that deck and eyed the swelling sails, lest
the breezes of heaven should
“Visit their face too roughly!”
How many hours has he stood at that helm and watched her coming
up and falling off! and when the roaring billows have threatened to
ingulf her in the bubbling foam of the dark waters, he has eased her
to the sea with all the tender anxiety that a mother feels for her first-
born child. With what pride has he beheld her top the mountain wave
and climb the rolling swell, while every groan of labour that she gave
carried a taut strain upon his own heart-strings!
Place confidence in what he says, and he will use no deception;
doubt his word, and he will indulge you with some of the purest
rhodomontade that ingenious fancy can invent. He will swear that he
had a messmate who knew the man in the moon, and on one
occasion went hand-over-hand up a rainbow to pay him a visit. He
himself was once powder-monkey in the Volcano bomb, and he will
tell you a story of his falling asleep in the mortar at the bombardment
of Toulon, and his body being discharged from its mouth instead of a
carcass. With all the precision of an engineer, he will describe his
evolutions in the air when they fired him off, and the manner in which
he was saved from being dashed to pieces in his fall. All this he
repeats without a smile upon his countenance, and he expects you
to believe it: but you may soon balance the account, for tell him what
absurdity you will, he receives it with the utmost credulity and is
convinced of its truth. His courage is undoubted, for he will stand on
the deck undismayed amidst the blood and slaughter of battle; yet on
shore, he is seized with indescribable apprehensions at the sight of a
coffin. The wailings of distress find a ready passport to his heart; but
to disguise the real motives which prompt immediate aid, he swears
that the object of his charity does not deserve a copper, yet gives a
pound with only this provision,—that the individual relieved does not
bother him about gratitude. You may know him from a thousand; for
though in his dress conspicuously neat, and his standing and
running rigging in exact order, yet they are arranged with a certain
careless ease, as if he had but just come down from reefing topsails.
The truck at the mast-head does not sit better than his tarpaulin hat,
neither does the shoe upon the pea of the anchor fit tighter than his
long quartered pumps. Grog is his ambrosia, his necktar; and he
takes it cold, without sugar, that he may have the full smack of the
rum.
And these are the characters at Greenwich Hospital, who after
fighting the battles of their country are honoured with a palace. Oh, it
was a proud display of national gratitude to such brave defenders!
England has been compared to a huge marine animal, whose ports
were its mouths, and whose navy formed its claws. What then is
Greenwich but a receptacle for superannuated claws? I dearly love
to get amongst them,—nearly two thousand shattered emblems of
Britain’s triumphs,—the returned stores of our naval glory. Ay, there
they are with their snug little cabins, like turtles under their shells.
But let us enter the
Painted Wall,
formerly the refectory for the pensioners, but now devoted to the
commemoration of their gallant achievements. There are the
portraits of the heroes of the olden time, whose memorials cannot
perish; and there too is old Van Tromp, the Dutchman, who is
honoured with a distinguished place amongst the brave of England’s
pride.
Here the old blades are a cut above the common; the small iron-
bound officers who attend on visiters and point out the well-
remembered features of commanders long since numbered with the
dead.
“That ’ere, sir, on your right, is the battle of Trafflygar,” said a
short thickset man, apparently between sixty and seventy years of
age. His countenance was one of mild benevolence, and yet there
was a daring in his look that told at once a tale of unsubdued and
noble intrepidity; whilst the deep bronze upon his skin was finely
contrasted with the silky white locks that hung straggling on his brow.
—“That ’ere, sir, is the battle of Trafflygar, in which I had the honour
to be one.”
“Were you with Nelson?” inquired I.
“I was, your honour,” he replied, “and those were the proudest
days of my life. I was with him when he bore up out of the line off
Cape St. Vincent, and saved old Jarvis from disgrace. I was one of
the boarders, too, when we took the Saint Joseph,—there’s the
picture, there in the middle of the hall;—and I was with him in that
ship there,—the Victory,—though it arn’t a bit like her,—and stationed
on the quarter-deck at Trafflygar.”
This was spoken with such an air of triumph, that the old man’s
features were lighted up with animation; it called to his remembrance
scenes in which he had shared the glory of the day and saved his
country. His eye sparkled with delight, as if he again saw the British
ensign floating in the breeze as the proud signal for conquest; or was
labouring at the oar with his darling chief, like a tutelar deity of old,
guiding the boat through the yielding element, and leading on to
some daring and desperate enterprise.
“I don’t like the picture,” said I; “the perspective is bad, and the
ship is too long and flat; besides the colour is unnatural.”
“Why, as for the matter of the prospective, sir,” replied the
veteran, “that’s just what his present Majesty, God bless him!
obsarved when he came to look at it; and for the colour, says the
king, says he, ‘why the painter must have thought he’d been
cooking, for he’s shoved the Victory into the hottest of the fire and
done her brown;’ it was too bad, your honour, to singe her in that ’ere
fashion, like a goose. Mayhap, your honour arn’t seen them there
paintings of the battle at a place they call Exeter Hall, in the Strand.
Now they are some-ut ship-shape, and the heat of the engagement
warms a fellow’s heart to look at. An ould tar of the name of Huggins
painted ’em, and I’m sure it’s right enough, for he’s made the Victory
hugging the enemy just as a bear would a baby. I could stand and
look at them pictures for hours, till I fancied myself once more in the
midst of it, measuring out fathoms of smoke and giving ’em full
weight of metal. The Victory has just fell aboard the French
Redhotable and the Golision, as they calls it, gives each of ’em a lust
different ways that looked so natural-like, that I felt myself getting a
heel to port in the ould Victory as I looked at her. Then there’s the
gale o’wind arter the battle; why, blow my ould wig, but you may feel
the breeze and shake yourself from the spray. God bless his
Majesty!—for they are the king’s, your honour;—long may he live to
view ’em, and long may Huggins hug to windward under royal
favour! I went to see him,—not the king, your honour, but Muster
Huggins, and when he found I was ‘the Old Sailor,’ what gave some
account of the life of a man-of-war’s man in ‘Greenwich Hospital,’ he
whips out his old quid, flings it into the fire, and we sported a fresh bit
o’bacca on the strength of it.—That was a welcome worthy a great
man, and he could’nt ha’ done more for the king, though I arn’t quite
sure that his Majesty does chaw his pig-tail.”
There certainly was ample scope for the remarks of my old friend,
and I could not but consider the picture a complete failure. “And so
you were at Trafalgar,” said I.
“Ay, and a glorious day it was, too, for Old England,” replied the
tar. “Never shall I forget the enthusiasm which animated every
breast, as we bore down to engage; it was indeed a noble sight, and
so your honour would have said, if you had but have seen the
winged giants of the deep as they marched majestically before the
breeze, all ready to hurl their thunders at the foe. But the best
scenes were at the quarters, where the bold captains of each gun
stood cool and undaunted, waiting for the word: but for the matter o’
that, every soul, fore and aft, seemed to be actuated by one and the
same spirit. ‘Look there, Ben,’ said Sam Windsail, pointing out of the
port-hole at the Royal Sovereign, just entering into action, ‘look
there, my Briton; see how she moves along, like a Phœnix in the
midst of fire,—there’s a sight would do any body’s heart good. I’d bet
my grog, (and that’s the lick-sir of life) I say I’d bet my grog agen a
marine’s button, that old Colly’s having a desperate bowse at his
breeches; he’s clapping on a taut hand, I’ll be bound for him.’ Just
then the Sovereign hauled up a little, and opened her fire. ‘Didn’t I
say so,’ continued Sam; ‘look at that! my eyes but he makes ’em
sheer agen! Well behaved my sons of thunder! The old gemman
knows the French are fond of dancing, so he’s giving them a few
balls and routs! Ay, ay, we shall be at it presently, never fear; our old
chap arn’t the boy to be long idle, but then, d’ye mind, he never does
things by halves; so he loves close quarters, and as he is rather near
with his cartridges, why he doesn’t like to throw a shot away.
Howsomever, he’ll go it directly, like a doctor’s written orders,—this
powder and these pills to be taken immediately,—eh, Ben? Next
comes funny-section, or flay-bottomy, as the surgeons call it:—my
eyes, there goes old Colly’s breeches agen, he’ll make a breach in
the enemy’s line directly; ay, he’s a right arnest sallymander.’ By this
time, your honour, we’d got within gun-shot, and the enemy opened
a tremendous fire upon the leading ships of our division, which
played up old Scratch upon the fokstle, poop, and main-deck; for as
we bore down nearly stem on, and there was but a light breeze, they
raked us fore and aft.
“But I should have told you, sir, that just before going into action,
the admiral walked round the quarters attended by the captain and, I
thinks, Mr. Quillem, the first leftenant, but I won’t be sure. The
gunner, Mr. Rivers, was along with ’em, I know, and a worthy old
gemman he was; his son, a midshipman, was stationed on the same
deck with us,—a fine spirited youth, with his light hair flowing about
his ears and his little laughing eyes,—up to all manner of mischief.
Well, round they came, and the hero seemed proud of his men; he
stopped occasionally to speak to one and to another, and his keen
eye saw in a moment if any thing wasn’t ship-shape. His
countenance was rather stern, but there was a look of confidence
that told us at once the day was our own;—nay, for the matter o’ that,
Sam Windsail began to reckon what he should buy for Poll with his
prize-money.
“When they reached the quarters where young Rivers was
stationed, Nelson looked at the son and then at the father, as much
as to say, ‘he’s a fine youth, you ought to be proud of him,’ as no
doubt the old gemman was, for he knew his gallant boy would do his
duty. But still the tender solicitude of a parent’s heart is not to be
repressed, however it may be concealed; and as he followed the
admiral, his head was frequently turned back to take another look at
his child, and perhaps he thought ‘mayhap it may be the last.’ Well,
as I was saying before, the enemy’s balls began to rattle into us like
hail-stones through a gooseberry bush, and many a poor fellow was
laid low. ‘Arrah, bad manners to ’em, what do they mane by that?’
cried Tim Doyle, as a whole shoal of shot travelled in one another’s
wake, and swept the entire range of the deck. ‘Come, don’t be
skulking down there, Jack Noggin,’ continued Tim, ‘but lay hoult of
the tackle-fall.’ Jack never moved. ‘Och bother, don’t you mane to
get up?’ But poor Jack’s glass was run, his cable was parted; so we
launched his hull out at the port, stock and fluke.
“Mayhap you never saw a battle, sir. It is no child’s play, take my
word for it. But the worst time is just before engaging, when silence
reigns fore and aft, and a poor fellow douses his jacket without
knowing whether he shall ever clap his rigging on agen. Then it is
that home with all its sweet remembrances clings round the heart.
Parents, or wife, or children, become doubly dear, and the fond ties
of kindred are linked by stronger bonds. Howsomever, as soon as
the first shot is fired, and we get within a sort of shake-hands
distance of the enemy, every other thought gives way to a steady
discharge of duty.
“Well, d’ye see, close upon our quarter came the Trimmer-rare,
98, and as we hauled up a little, we brought our larboard broadside
to bear upon the great Spanish four-decker;—there, that’s she in the
picture showing her galleries, just by the Victory’s starn:—so we
brought our broadside to bear, and oh, if you had but have seen the
eager looks of the men as they pointed their guns, determined to
make every shot tell,—and a famous mark she was, too, looming out
of the water like Beachy-head in a fog. ‘Stand by,’ says Sam
Windsail, looking along the sight with the match in his hand; ‘stand
by, my boy; so, so,—elevate her breech a bit,—that will do. Now,
then, for the Santizzy-mama-Trinny-daddy, and I lay my life I knock
day-light through his ribs. Fire!’ and the barking irons gave mouth
with all their thunder. A few minutes afterward, and slap we poured
another raking broadside into the Spaniard, and then fell aboard a
French seventy-four.
“Well, there, d’ye see, we lay, rubbing together with the muzzles
of the lower deckers touching one another. When our guns were run
in for loading, the ports were instantly occupied by the small-arm
men, and several attempts were made to board the enemy. At this
time one of the Frenchmen kept thrusting at us with a boarding-pike,
and pricked Tim Doyle in the face. ‘Och, the divil’s cure to you,’
bawled Tim; ‘what do you mane by poking at me in that way. A joke’s
a joke, but poking a stick in a fellow’s eye is no joke, any how; be
aisey then, darlint, and mind your civility.’ As soon as we had fired, in
came the pike agen, and Tim got another taste of it. ‘Och bother,’
said Tim, ‘if that’s your tratement of a neighbour, the divil wouldn’t
live next door to yes! But faith, I’ll make you come out o’ that, and
may be you’ll be after just paying me a visit.’ So he catches hold of a
boat-hook that was triced up in a-midships, and watching his
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
textbookfull.com

More Related Content

Similar to PDF Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao download (20)

Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale SoyinkaLinux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
naguayosmer
 
Deployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS LinuxDeployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS Linux
WO Community
 
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale SoyinkaLinux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
jaouinusin
 
Setting-up-Computer-Server Powerpoint presentation
Setting-up-Computer-Server Powerpoint presentationSetting-up-Computer-Server Powerpoint presentation
Setting-up-Computer-Server Powerpoint presentation
vensonosnev
 
Buy ebook Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka c...
Buy ebook Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka c...Buy ebook Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka c...
Buy ebook Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka c...
meisegliwamv
 
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale SoyinkaLinux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
nijjarowoiya
 
Make your cheap VM fly
Make your cheap VM flyMake your cheap VM fly
Make your cheap VM fly
Code Enigma
 
for your Linux Server
for your Linux Serverfor your Linux Server
for your Linux Server
webhostingguy
 
Linux Unveiled: From Novice to Guru Kameron Hussain
Linux Unveiled: From Novice to Guru Kameron HussainLinux Unveiled: From Novice to Guru Kameron Hussain
Linux Unveiled: From Novice to Guru Kameron Hussain
ahendadedzi
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
webhostingguy
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
ViSenze - Artificial Intelligence for the Visual Web
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
Michael Zhang
 
Deepa ppt about lamp technology
Deepa ppt about lamp technologyDeepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa
 
lamp technology
lamp technologylamp technology
lamp technology
Deepa
 
Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...
RUDDER
 
Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...
Jonathan Clarke
 
Web Fendamentals
Web FendamentalsWeb Fendamentals
Web Fendamentals
Hiren Mistry
 
Server operating system
Server operating systemServer operating system
Server operating system
Tapan Khilar
 
Introduction to Server
Introduction to ServerIntroduction to Server
Introduction to Server
Anacrissa Soriano
 
Project: Intrusion Detection
Project: Intrusion DetectionProject: Intrusion Detection
Project: Intrusion Detection
Jay Schulman
 
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale SoyinkaLinux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
naguayosmer
 
Deployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS LinuxDeployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS Linux
WO Community
 
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale SoyinkaLinux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
jaouinusin
 
Setting-up-Computer-Server Powerpoint presentation
Setting-up-Computer-Server Powerpoint presentationSetting-up-Computer-Server Powerpoint presentation
Setting-up-Computer-Server Powerpoint presentation
vensonosnev
 
Buy ebook Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka c...
Buy ebook Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka c...Buy ebook Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka c...
Buy ebook Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka c...
meisegliwamv
 
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale SoyinkaLinux Administration: A Beginner's Guide 8th Edition Wale Soyinka
Linux Administration: A Beginner's Guide 8th Edition Wale Soyinka
nijjarowoiya
 
Make your cheap VM fly
Make your cheap VM flyMake your cheap VM fly
Make your cheap VM fly
Code Enigma
 
for your Linux Server
for your Linux Serverfor your Linux Server
for your Linux Server
webhostingguy
 
Linux Unveiled: From Novice to Guru Kameron Hussain
Linux Unveiled: From Novice to Guru Kameron HussainLinux Unveiled: From Novice to Guru Kameron Hussain
Linux Unveiled: From Novice to Guru Kameron Hussain
ahendadedzi
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
webhostingguy
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
Michael Zhang
 
Deepa ppt about lamp technology
Deepa ppt about lamp technologyDeepa ppt about lamp technology
Deepa ppt about lamp technology
Deepa
 
lamp technology
lamp technologylamp technology
lamp technology
Deepa
 
Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...
RUDDER
 
Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...Configuration management: automating and rationalizing server setup with CFEn...
Configuration management: automating and rationalizing server setup with CFEn...
Jonathan Clarke
 
Server operating system
Server operating systemServer operating system
Server operating system
Tapan Khilar
 
Project: Intrusion Detection
Project: Intrusion DetectionProject: Intrusion Detection
Project: Intrusion Detection
Jay Schulman
 

Recently uploaded (20)

STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
Critical Thinking and Bias with Jibi Moses
Critical Thinking and Bias with Jibi MosesCritical Thinking and Bias with Jibi Moses
Critical Thinking and Bias with Jibi Moses
Excellence Foundation for South Sudan
 
Oedipus The King Student Revision Booklet
Oedipus The King Student Revision BookletOedipus The King Student Revision Booklet
Oedipus The King Student Revision Booklet
jpinnuck
 
Odoo 18 Point of Sale PWA - Odoo Slides
Odoo 18 Point of Sale PWA  - Odoo  SlidesOdoo 18 Point of Sale PWA  - Odoo  Slides
Odoo 18 Point of Sale PWA - Odoo Slides
Celine George
 
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Rajdeep Bavaliya
 
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
Arshad Shaikh
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
QUIZ-O-FORCE 3.0 FINAL SET BY SOURAV .pptx
QUIZ-O-FORCE 3.0 FINAL SET BY SOURAV .pptxQUIZ-O-FORCE 3.0 FINAL SET BY SOURAV .pptx
QUIZ-O-FORCE 3.0 FINAL SET BY SOURAV .pptx
Sourav Kr Podder
 
Research Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate MilesResearch Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate Miles
mucomousamir
 
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptxQUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
Sourav Kr Podder
 
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdfTechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup
 
New syllabus entomology (Lession plan 121).pdf
New syllabus entomology (Lession plan 121).pdfNew syllabus entomology (Lession plan 121).pdf
New syllabus entomology (Lession plan 121).pdf
Arshad Shaikh
 
Uterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managmentUterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managment
Ritu480198
 
Education Funding Equity in North Carolina: Looking Beyond Income
Education Funding Equity in North Carolina: Looking Beyond IncomeEducation Funding Equity in North Carolina: Looking Beyond Income
Education Funding Equity in North Carolina: Looking Beyond Income
EducationNC
 
LDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College VolumeLDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College Volume
LDM & Mia eStudios
 
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATIONTHE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
PROF. PAUL ALLIEU KAMARA
 
THE FEMALE POPE IN SAINT PETER'S BASILICA
THE FEMALE POPE IN SAINT PETER'S BASILICATHE FEMALE POPE IN SAINT PETER'S BASILICA
THE FEMALE POPE IN SAINT PETER'S BASILICA
Claude LaCombe
 
Sri Guru Arjun Dev Ji .
Sri Guru Arjun Dev Ji                   .Sri Guru Arjun Dev Ji                   .
Sri Guru Arjun Dev Ji .
Balvir Singh
 
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ..."Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
Arshad Shaikh
 
How to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guidesHow to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guides
Celine George
 
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANASTUDENT LOAN TRUST FUND DEFAULTERS GHANA
STUDENT LOAN TRUST FUND DEFAULTERS GHANA
Kweku Zurek
 
Oedipus The King Student Revision Booklet
Oedipus The King Student Revision BookletOedipus The King Student Revision Booklet
Oedipus The King Student Revision Booklet
jpinnuck
 
Odoo 18 Point of Sale PWA - Odoo Slides
Odoo 18 Point of Sale PWA  - Odoo  SlidesOdoo 18 Point of Sale PWA  - Odoo  Slides
Odoo 18 Point of Sale PWA - Odoo Slides
Celine George
 
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Paper 110A | Shadows and Light: Exploring Expressionism in ‘The Cabinet of Dr...
Rajdeep Bavaliya
 
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
Arshad Shaikh
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
QUIZ-O-FORCE 3.0 FINAL SET BY SOURAV .pptx
QUIZ-O-FORCE 3.0 FINAL SET BY SOURAV .pptxQUIZ-O-FORCE 3.0 FINAL SET BY SOURAV .pptx
QUIZ-O-FORCE 3.0 FINAL SET BY SOURAV .pptx
Sourav Kr Podder
 
Research Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate MilesResearch Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate Miles
mucomousamir
 
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptxQUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
QUIZ-O-FORCE FINAL SET BY SUDIPTA & SUBHAM.pptx
Sourav Kr Podder
 
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdfTechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.05.28.pdf
TechSoup
 
New syllabus entomology (Lession plan 121).pdf
New syllabus entomology (Lession plan 121).pdfNew syllabus entomology (Lession plan 121).pdf
New syllabus entomology (Lession plan 121).pdf
Arshad Shaikh
 
Uterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managmentUterine Prolapse, causes type and classification,its managment
Uterine Prolapse, causes type and classification,its managment
Ritu480198
 
Education Funding Equity in North Carolina: Looking Beyond Income
Education Funding Equity in North Carolina: Looking Beyond IncomeEducation Funding Equity in North Carolina: Looking Beyond Income
Education Funding Equity in North Carolina: Looking Beyond Income
EducationNC
 
LDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College VolumeLDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College Volume
LDM & Mia eStudios
 
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATIONTHE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
THE CHURCH AND ITS IMPACT: FOSTERING CHRISTIAN EDUCATION
PROF. PAUL ALLIEU KAMARA
 
THE FEMALE POPE IN SAINT PETER'S BASILICA
THE FEMALE POPE IN SAINT PETER'S BASILICATHE FEMALE POPE IN SAINT PETER'S BASILICA
THE FEMALE POPE IN SAINT PETER'S BASILICA
Claude LaCombe
 
Sri Guru Arjun Dev Ji .
Sri Guru Arjun Dev Ji                   .Sri Guru Arjun Dev Ji                   .
Sri Guru Arjun Dev Ji .
Balvir Singh
 
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ..."Dictyoptera: The Order of Cockroaches and Mantises"  Or, more specifically: ...
"Dictyoptera: The Order of Cockroaches and Mantises" Or, more specifically: ...
Arshad Shaikh
 
How to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guidesHow to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guides
Celine George
 

PDF Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao download

  • 1. Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.com Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao https://textbookfull.com/product/servers-for-hackers-server- administration-for-programmers-1-2018-06-19-edition-chris- fidao-2/ OR CLICK BUTTON DOWNLOAD NOW Explore and download more ebook at https://textbookfull.com
  • 2. Recommended digital products (PDF, EPUB, MOBI) that you can download immediately if you are interested. Servers for Hackers Server Administration for Programmers 1 (2018-06-19) Edition Chris Fidao https://textbookfull.com/product/servers-for-hackers-server- administration-for-programmers-1-2018-06-19-edition-chris-fidao-2/ textboxfull.com Linux Basics for Hackers Occupytheweb https://textbookfull.com/product/linux-basics-for-hackers- occupytheweb/ textboxfull.com ubuntu and Centos linux server administration Md. Tanvir Rahman https://textbookfull.com/product/ubuntu-and-centos-linux-server- administration-md-tanvir-rahman/ textboxfull.com C 20 for Programmers 3rd Edition Harvey Deitel https://textbookfull.com/product/c-20-for-programmers-3rd-edition- harvey-deitel/ textboxfull.com
  • 3. Computer Graphics for Java Programmers 3rd Edition Leen Ammeraal https://textbookfull.com/product/computer-graphics-for-java- programmers-3rd-edition-leen-ammeraal/ textboxfull.com JavaScript for impatient programmers (ES2021 edition) Dr. Axel Rauschmayer https://textbookfull.com/product/javascript-for-impatient-programmers- es2021-edition-dr-axel-rauschmayer/ textboxfull.com Raspberry Pi for Python Programmers Cookbook Second Edition Tim Cox https://textbookfull.com/product/raspberry-pi-for-python-programmers- cookbook-second-edition-tim-cox/ textboxfull.com Windows Server 2019 Administration Fundamentals : a Beginner's Guide to Managing and Administering Windows Server Environments, 2nd Edition. Bekim Dauti https://textbookfull.com/product/windows-server-2019-administration- fundamentals-a-beginners-guide-to-managing-and-administering-windows- server-environments-2nd-edition-bekim-dauti/ textboxfull.com D3 for the Impatient Interactive Graphics for Programmers and Scientists Philipp K. Janert https://textbookfull.com/product/d3-for-the-impatient-interactive- graphics-for-programmers-and-scientists-philipp-k-janert/ textboxfull.com
  • 6. Servers for Hackers Server Administration for Programmers Chris Fidao This book is for sale at http://leanpub.com/serversforhackers This version was published on 2018-06-19 * * * * * This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. * * * * * © 2014 - 2018 Chris Fidao
  • 7. Table of Contents Servers Video Site Book Issues Introduction Accidental Sysadmin Syndrome Assumptions Linux Distributions The Sandbox Install Virtualbox and Vagrant Configure Vagrant Vagrant Up! Basic Commands Basic Software Review Security Users and Access IP Addresses Creating a New User Making Our User a Super User Setting Up the Firewall: Iptables Adding these rules Inserting Rules Deleting Rules Saving Firewall Rules Defaulting to DROP Over ACCEPT Logging Dropped Packets Firewalls with UFW Fail2Ban Iptables Integration Installation Configuration
  • 8. Automatic Security Updates Package Managers Apt New (as of 16.04 Xenial, continuing into 18.04 Bionic) Installing Repositories Examples Searching Packages Permissions and User Management Permissions Checking Permissions Changing Permissions User Management Creating Users Umask & Group ID Bit ACL’s Running Processes Webservers HTTP, Web Servers and Web Sites A Quick Note on DNS DNS & Hosts File Xip.io Virtual Hosts Hosting Web Applications Three Actors Apache Installing Configuration Virtual Hosts Apache and Web Applications MPM Configuration Security Configuration Envvars Nginx Features
  • 9. Installation Web Server Configuration Servers (virtual hosts) Integration with Web Applications PHP Installation Configuration PHP-FPM PHP in Nginx: Subdirectories Server Setup for Multi-Tenancy Apps DNS Multi-Tenancy in Apache Multi-Tenancy in Nginx SSL Certificates SSL Overview Using SSL in Your Application Creating Self-Signed Certificates Creating a Wildcard Self-Signed Certificate Apache Setup Nginx Setup One Server Block Extra SSL Tricks LetsEncrypt Web Server Security Install Letsencrypt Install a Certificate Nginx Configuration Renewal Multi-Server Environments Implications of Multi-Server Environments Asset Management Sessions Lost Client Information SSL Traffic Logs Load Balancing with Nginx Balancing Algorithms
  • 10. Configuration Mapping Headers SSL with Nginx SSL-Termination SSL-Passthru Support When to use Pass-Thru Load Balancer (Server A, at 52.90.130.140): Web Server (Server B, at 52.23.215.245): Load Balancing with HAProxy Common Setups Installation HAProxy Configuration Monitoring HAProxy Sample NodeJS Web Server SSL with HAProxy HAProxy with SSL Termination HAProxy with SSL Pass-Through Sample NodeJS Web Server Web Cache Nuts and Bolts of HTTP Caching Object Caches Web Caches Types of HTTP Caches An Origin Server Testing Caching Mechanisms Nginx Web Caching Use Cases How It Will Work Origin Server Cache Server Proxy Caching Example: Caching Specific URIs Varnish Origin Server Install Varnish Basic Configuration Increasing Cache Hit Rate Varnish Tools Extra Resources
  • 11. Logs Logrotate What does Logrotate do? Configuring Logrotate Going Further Rsyslog Configuration Usage Should I Use Rsyslog? Sending To Rsyslog From An Application File Management, Deployment & Configuration Management Managing Files Copying Files Locally SCP: Secure Copy Rsync: Sync Files Across Hosts Deployment Auto-deploy with GitHub How it Works Node Listener Shell Script Putting it together Firewall Configuration Management with Ansible Install Managing Servers Basic: Running Commands Basic Playbook Roles Facts Vault SSH Logging in SSH Config SSH Tunneling Local Port Forwarding
  • 12. Remote Port Forwarding One-Off Commands & Multiple Servers Basic Ansible Monitoring Processes A Sample Script System Services System V Init (SysVinit, SysV) Systemd Upstart The Service Command Using These Systems Supervisord A Chain of Process Monitors Installation Configuration Controlling Processes Web Interface Forever Installation Usage Circus Installation Configuration Controlling Processes Web Interface Starting on Boot Development and Servers Serving Static Content Built-In NodeJS Dynamic Content
  • 13. Servers Servers can be fun! Knowing how to setup, run and administer a server can be as empowering as coding itself. Some applications have needs stretching beyond what managed hosting providers are willing to support. This shouldn’t stop us from building our applications. Servers can be hard! Consumers expect and demand services to be functioning. Downtime can cost real money, and is often met with frustration and anger. At the same time, servers are increasingly commodified. Hosting once involved a few, powerful servers. Now, the modern Cloud consists of many small, cheap virtual machines. The more servers we have, the more likely we are to run into issues. The end result is that we need to build for failure. This is a Hard Problem™, and requires us to know a lot about the servers running our applications. This book exists because we developers are now faced with System Administration issues. We need to at least know the basics of what goes into hosting and serving our applications. So, let’s not get stuck with limiting hosting or broken servers!
  • 14. Video Site Since publishing this book, I’ve also collected my newsletter editions, articles and videos to https://serversforhackers.com. I’ll be continuously adding new videos! These continue to concentrate on topics important to web servers and web development, from the basic to the complex. The videos all come with a write-up of the commands and information presented in the video, usually along with some extra resources. This makes the videos easy to come back to for quick reference later. Servers for Hackers Video Site Book Issues All feedback is hugely appreciated! Any questions, comments, issues, stories of glory/valor and praise can be directed to the Github repository created for feedback! https://github.com/Servers-for-Hackers/the-book
  • 16. Accidental Sysadmin Syndrome You’re a developer. A server broke, and you’re the only one around to fix it. You have a special-needs application that requires specific software. You need to setup a development server, and will spend half of your day trying to get some “simple” configuration to work. These are symptoms of Accidental Sysadmin Syndrome. This book is for developers who find themselves needing or wanting to be a SysAdmin. Assumptions This book assumes at least a passing familiarity with the command line. Those who have logged into the shell and poked around a server before will benefit the most. If you are new to the command line, concentrate on getting comfortable with Vagrant. This will help familiarize you with using the command line and servers.
  • 17. Linux Distributions There are many distributions of Linux. Some popular ones are Arch, Debian, Ubuntu, Redhat, CentOS, Fedora and CoreOS. Many of these distributions are related to each other in some way. For example, some of these distributions are “downstream” from others. A downstream Linux distribution includes the upstream’s distribution’s changes, and may add their own. For example, Ubuntu is based on Debian and is considered downstream of Debian. CentOS is based on RedHat and is therefore downstream from RedHat. RedHat sponsors Fedora and so Fedora is very similar to RedHat and CentOS (although it has a much more rapid release cycle). Each distribution has opinions about Linux and its use. It would be too cumbersome to cover all topics for each distribution and so I’ve chosen to concentrate on Ubuntu. This book concentrates on Debian/Ubuntu, however, the serversforhackers.com video site covers multiple distributions! Ubuntu is one of the most popular server and desktop distributions. It has a great set of configurations that come out of the box, allowing us to worry less about configuration until we need to. This makes it easy to use. Ubuntu updates software packages quickly relative to some other distributions. However, updating to the latest software makes it easier to introduce new bugs and version conflicts.
  • 18. Luckily, Ubuntu’s LTS releases are a good solution to this potential issue. LTS stands for Long Term Support LTS versions are released every 2 years but support for them last 5 years. This makes them ideal for longer-term use. As major versions are released yearly, only every other major release of Ubuntu is an LTS. The current LTS is 18.04 - the following LTS release will be 20.04. Xenial, the codename for Ubuntu 16.04, was released in April of 2016. Support officially ends 5 years later (April of 2021). Bionic, the codename for Ubuntu 18.04, was released in April of 2018. This will be a relevant server for at least 2 years, but likely beyond that with support officially ending 5 years later (April of 2023). Ubuntu LTS releases offer more stability and security, but generally do not prevent us from installing the latest software when we need to. This makes them ideal candidates for every-day server usage. Popularity is Relative RedHat Enterprise (RHEL) is a popular distribution in the enterprise world. Many hosting companies use CentOS along with cPanel/WHM or Plesk control panels. In the open source/startup worlds, Ubuntu is one of the most popular distributions of Linux. Because Ubuntu is closely tied to Debian, most, but certainly not all, topics included here will be exactly the same for Debian.
  • 19. For RedHat/CentOS distributions, most topics will have small-to-large differences from what you read here. In any case, much of what you learn here will be applicable to all distributions. I recommend this Rackspace knowledge-base article for more information on the various Linux distributions: https://community.rackspace.com/products/f/25/t/6677.
  • 20. The Sandbox If you want a sandbox - a place to safely play with a server - this chapter is for you. The topics of the “Sandbox” section is not necessary to follow along in this book, but it will be helpful. You’ll learn how to setup a local server on which you can develop an application or experiment with new technology. As a bonus, you’ll avoid mucking up your computer with development software! We’ll briefly cover using Vagrant to setup a local server. The benefit of Vagrant is that it will let us use a “real” server to test on. You can create a server also used in production. Virtual servers are also safe - we can thoroughly mess them up, throw them away and recreate them as much as we need. Let’s get started with Vagrant! Install Virtualbox and Vagrant Virtualbox is a tool for creating Virtual Machines. Vagrant is a tool that lets you easily create and manage virtual machines. Vagrant takes care of file sharing, network setup and other sticky topics.
  • 21. A Virtual Machine is a (guest) computer running inside of your (host) computer. VirtualBox “virtualizes” hardware by making virtual servers think they are running on real hardware. A guest computer can be almost anything - Windows, Mac, Linux or other operating systems. Here’s some important vocabulary: Your computer is called the “host” machine. Any virtual machine running within the host machine is called a “guest” machine. I’ll use the term “virtual machine” with “server” interchangeably, as we’ll be creating Ubuntu servers (VMs) to learn on. To get started, the first step is to install Virtualbox and Vagrant. These are available for Windows, Mac and Linux. Installing them only involves browsing to their websites and downloading/running their installers. You may need to restart your Windows after installing Vagrant. For this book, you will need Vagrant version 1.5 or higher. Most versions of Virtualbox should work, I always update to the latest of these two tools. Configure Vagrant Once you have installed these, we can get started! We’ll get Vagrant going by running the following commands on our host machine. On Mac, open up the Terminal app. On Windows, you can use the CMD prompt (or your command line tool of choice) to run Vagrant commands.
  • 22. On Mac: 1 mkdir -p ~/Sites/sfh 2 cd ~/Sites/sfh 3 vagrant init bento/ubuntu-18.04 On Windows: 1 mkdir C:sfh 2 cd C:sfh 3 vagrant init bento/ubuntu-18.04 From here on, I won’t differentiate between Windows and Mac commands. We’ll mostly be within a server in any case, so the commands will not vary no matter what type of computer your host is. The vagrant init command creates a new file called Vagrantfile. This file is configured to use Ubuntu LTS server. See the included video for getting started with Vagrant on Virtualbox. The Vagrantfile created will look something like this (when all the comments are stripped out): File: Vagrantfile 1 Vagrant.configure(2) do |config| 2 3 config.vm.box = "bento/ubuntu-18.04" 4 5 end If you look at your file, you’ll see lots of comments, which show some configurations you can use. I’ll cover a few that you should know about. Networking The basic install of Vagrant will do some “port forwarding”. For example, if Vagrant forwards port 8080 to the server’s port 80, then we’ll go to
  • 23. http://localhost:8080 in your browser to reach the server’s web server at port 80. This has some side effects. A side effect of this port forwarding has to do with interacting with web applications. You’ll need to access web pages in your browser using the port which Vagrant sets up, often “8888”. Instead of “http://localhost”, you’ll use “http://localhost:8888” in the browser. However, your application may not be coded to be aware of the non-standard port (8888). The application may redirect to, create links for or submit forms to standard port 80 instead of the forwarded port! I like to get around this potential problem by assigning a private-network IP address to my Vagrant server. To do this, open up your Vagrantfile and make it look like this: File: Vagrantfile 1 Vagrant.configure(2) do |config| 2 3 config.vm.box = "bento/ubuntu-18.04" 4 5 config.vm.network :private_network, ip: "192.168.22.10" 6 7 end
  • 24. The private_network directive tells Vagrant to setup a private network. Our host and guest machines can communicate on this network. This assigns the guest server the IP address of 192.168.22.10. Note that each server should have a unique IP address just in case they are run at the same time. There are IP address ranges set aside for private networks. Generally you can use 10.0.0.0 - 10.255.255.255, 172.16.0.0 - 172.31.255.255, and 192.168.0.0 - 192.168.255.255. However, always avoid the lower and upper IP addresses within those ranges, as they are often reserved. Vagrant Up! Once the Vagrantfile changes are saved, we can run the vagrant up command. This will download the bento/ubuntu-18.04 base server (“box”) and run it with our set configuration. 1 vagrant up
  • 25. If Vagrant cannot find the Vagrantfile, you need to cd into the directory containing the Vagrantfile. You’ll see some output as Vagrant sets up the Ubuntu server. Once it’s complete, run vagrant status to see that it’s powered on and running. 1 vagrant status You should see output similar to this: 1 Current machine states: 2 3 default running (virtualbox) 4 5 The VM is running. To stop this VM, you can run `vagrant halt` to 6 shut it down forcefully, or you can run `vagrant suspend` to simply 7 suspend the virtual machine. In either case, to restart it again, 8 run `vagrant up`. Our machine, named “default” is running, using VirtualBox. Now we need to log into this server. Vagrant sets up a way to log in without needing a password nor SSH key. Try running the command vagrant ssh-config. It will show you some information, including the port forwarded that you can use to SSH into, and the private key configured. That’s nice for debugging, but you don’t need that information. We can run the vagrant ssh command to log directly in.
  • 26. Congratulations, you’re now inside of a real server! Poke around a bit - try some of these commands out if they are not familiar to you: ll - A built-in alias for the command ls -lah, this will list all files and directories within the current directory, along with their current size in human-readable format. lsb_release -a - A command to show all release information about this server. top - A command to show running processes and various system information. Use the ctrl+c keyboard shortcut to return to the prompt. clear - A command to clear currently visible output within your terminal. The keyboard shortcut ctrl+l will do this as well. df -h - See how much hard drive space is used/available. free -m - See how much memory (RAM) is used/available. Due to various caching mechanisms, this output can be a tad confusing. To see the actual amount of available memory, take the value from the free column in the row that says -/+ buffers/cache. File Sharing Vagrant sets up file sharing for you. The default shares the server’s /vagrant directory to the host’s directory containing the Vagrantfile.
  • 27. In our example, the host machine’s ~/Sites/sfh directory is shared with the guest’s /vagrant directory. The tilde ~ expands to the current user’s home directory. ~/Sites/sfh expands to /Users/fideloper/Sites/sfh on my Macintosh. From within our server, let’s list the contents of the /vagrant: 1 ls -la /vagrant Its output will be something like this: 1 drwxr-xr-x 1 vagrant vagrant 136 Jun 14 16:56 ./ 2 drwxr-xr-x 23 root root 4096 Jun 14 19:33 ../ 3 drwxr-xr-x 1 vagrant vagrant 102 Jun 14 16:54 .vagrant/ 4 -rw-r--r-- 1 vagrant vagrant 480 Jun 14 16:56 Vagrantfile We see our Vagrantfile and a hidden .vagrant directory containing some meta data used by Vagrant. On my host machine (my Macintosh), I’ll create a new text file in ~/Sites/sfh named hello.txt: 1 echo "Hello World" > ~/Sites/sfh/hello.txt Now if I log into the guest server, I’ll see that file is available there as well: 1 # See files in /vagrant 2 cd /vagrant 3 ls -la 4 5 # Output the content of "hello.txt" 6 # with the "cat" command 7 cat /vagrant/hello.txt # Output: "Hello World" This allows us to edit files from our host machine while running the server software within our guest server! A Vagrantfile with the default file sharing configuration in place would look like this:
  • 28. File: Vagrantfile 1 Vagrant.configure(2) do |config| 2 3 config.vm.box = "bento/ubuntu-18.04" 4 5 config.vm.network :private_network, ip: "192.168.22.10" 6 7 # Share Vagrantfile's directory on the host with /vagrant on the guest 8 config.vm.synced_folder ".", "/vagrant" 9 10 end Server Network Let’s check out the network configuration. Within the server, run the command ifconfig: 1 ifconfig This usually has a good amount of output: 1 eth0 Link encap:Ethernet HWaddr 08:00:27:aa:0e:10 2 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 3 inet6 addr: fe80::a00:27ff:feaa:e10/64 Scope:Link 4 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 5 RX packets:558 errors:0 dropped:0 overruns:0 frame:0 6 TX packets:379 errors:0 dropped:0 overruns:0 carrier:0 7 collisions:0 txqueuelen:1000 8 RX bytes:56936 (56.9 KB) TX bytes:48491 (48.4 KB) 9 10 eth1 Link encap:Ethernet HWaddr 08:00:27:ac:ef:d2 11 inet addr:192.168.22.10 Bcast:192.168.22.255 Mask:255.255.255.0 12 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 13 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 14 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 15 collisions:0 txqueuelen:1000 16 RX bytes:1188 (1.1 KB) TX bytes:958 (958.0 B) 17 18 lo Link encap:Local Loopback 19 inet addr:127.0.0.1 Mask:255.0.0.0 20 inet6 addr: ::1/128 Scope:Host 21 UP LOOPBACK RUNNING MTU:65536 Metric:1 22 RX packets:12 errors:0 dropped:0 overruns:0 frame:0 23 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 24 collisions:0 txqueuelen:0 25 RX bytes:888 (888.0 B) TX bytes:888 (888.0 B)
  • 29. The ifconfig command will one day be replaced by the ip command, but not yet! The ifconfig command output a lot of content! What are we looking at? Well without getting too deep into this, we are looking at three networks setup within this server. Each network is called an “interface”. lo - The loopback interface. This is used for internal communication between services within the server. This is “localhost” - 127.0.0.1 eth0 and eth1 - These are two additional networks created as well. We can see the IP address we assigend the server at eth1 - 192.168.22.10. The server also has its own private network, with the IP address 10.0.2.15 assigned to this machine. The ifconfig command is a quick way to check the IP address of your server as well as see the various networks the server is connected to. You’ll always see a loopback interface. You’ll usually see an internal network, useful for communicating within a local network such as a data center. Most server providers will assign a server a public IP address. Servers with a public IP address can usually be reached by users on the internet. Basic Commands We’ll be using the command line for 99.9% of this book. On Mac and most Linux desktop distributions, this means using the Terminal app. On Windows, this means using the CMD prompt, or any other shell you might install. I’m personally partial to Git Bash, which is usually installed alongside Git on Windows. You can run the most common Linux commands with it.
  • 30. If you’re not logged into your Vagrant server, log back in using vagrant ssh. Here are some commands you’ll need to know for getting around a server: pwd - Print working directory. The “working directory” is the directory you are currently in. When you first log into a server, you’re usually placed in the user’s “home” directory, most often at /home/username. In our Vagrant server, we’ll be placed in the /home/vagrant directory when we log in. ls - List Directory Contents 1 # List contents of current working directory 2 ls 3 4 # List contents in a list form, with extra information: 5 ls -l 6 7 # List contents, including "hidden" files/folders 8 ls -la 9 10 # Add human-readable file/folder sizes: 11 ls -lah cd - Change Directory. 1 # Change into the "/home/fideloper/sites/sfh" directory. 2 cd /home/fideloper/sites/sfh 3 4 # Same as above, but with the "~" shortcut 5 # to the current users home directory 6 cd ~/sites/sfh mkdir - Create a directory 1 # Create the `sfh` directory 2 # inside of /home/fideloper/sites/sfh 3 mkdir ~/sites/sfh 4 5 # Create the /home/fideloper/sites/sfh directory and 6 # any directory in between that doesn't exist 7 mkdir -p ~/sites/sfh rm - Delete a file or directory
  • 31. 1 # Delete (permanently) the `file.ext` file. 2 rm /path/to/file.ext 3 4 # Delete (recursively) the `/path/to/directory` directory. 5 rm -r /path/to/directory 6 7 # the additional `f` flag is to "force" the action, 8 # without prompting to make sure you want to do it. 9 # This is dangerous. 10 rm -rf /path/to/directory Basic Software When we get a new server, it is useful to install basic tools that are used again and again. What tools you install will change as dictated by your requirements and experience. These can include editors (vim, nano), http tools (wget, curl), monitoring tool (htop), searching tools (ack) and anything else! Your personal list of favorites will grow as you gain experience. Here’s what I install: curl - Making HTTP requests wget - Retrieve files from the web unzip - Unzip zip files git - Git version control ack - An advanced search tool for searching content of files htop - Interactive process viewer (better than the simple “top”) vim - The timeless editor. Pro-Tip: Hit “esc” then type “:q” then hit “Enter” to quit. Now you know. tmux - Terminal Multiplexor - Basically, split your terminal session into different panes software-properties-common - This is specific to Ubuntu. We’ll use it to add software repositories that allow us to install the latest software.
  • 32. As of Ubuntu 14.04, the add-apt-repository command is now included in the software-properties-common package rather than the python-software- properties package. This holds true for 16.04 and 18.04 as well. Don’t worry if you’re not sure what that means or aren’t familiar with the add- apt-repository command, it will be covered in the “Package Managers” section. Install the Basics The first thing we’ll use is the apt command to install our packages: 1 sudo apt install curl wget unzip git ack-grep htop 2 vim tmux software-properties-common Let’s cover this command: sudo - We used “sudo” as we need to install these items as a super user (the root user, essentially). Only some users are allowed to use “sudo”. If you are already user “root” while installing these, then you don’t need to use “sudo” before any command. apt install - Install packages with APT Then we list all the packages we want to install, separated by a space This command will prompt us to make sure we want to install all of these packages. We could also add the -y flag to skip the prompt: sudo apt install -y curl wget [...]. Note that I also split the command into two lines by escaping the newline character with a backslash.
  • 33. Review This chapter was a quick primer on Vagrant and some server basics. We saw how to download and install VirtualBox and Vagrant, how to configure Vagrant, and how to install basic software. This is not the only way to go about this. You may want to use a remote server, rather than have one running on your local computer. I suggest using Digital Ocean or Linode. Use what works best for you!
  • 34. Another Random Scribd Document with Unrelated Content
  • 37. The Project Gutenberg eBook of Tough yarns, vol. 1
  • 38. This ebook is for the use of anyone anywhere in the United States and most other parts of the world at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this ebook or online at www.gutenberg.org. If you are not located in the United States, you will have to check the laws of the country where you are located before using this eBook. Title: Tough yarns, vol. 1 A series of naval tales and sketches to please all hands, from the swabs on the shoulders down to the swabs in the head Author: M. H. Barker Release date: February 20, 2024 [eBook #72996] Language: English Original publication: Philadelphia: E. L. Carey and A. Hart, 1835 Credits: hekula03, Terry Jeffress and the Online Distributed Proofreading Team at https://www.pgdp.net (This book was produced from images made available by the HathiTrust Digital Library.) *** START OF THE PROJECT GUTENBERG EBOOK TOUGH YARNS, VOL. 1 ***
  • 39. TOUGH YARNS; A SERIES OF NAVAL TALES AND SKETCHES TO PLEASE ALL HANDS, From the Swabs on the Shoulders down to the Swabs in the Head. BY THE OLD SAILOR, AUTHOR OF “GREENWICH HOSPITAL,” ETC. IN TWO VOLUMES. Vol. I. PHILADELPHIA: E. L. CAREY & A. HART. BALTIMORE: CAREY, HART & Co. BOSTON: WILLIAM D. TICKNOR. 1835.
  • 40. E. G. Dorsey, Printer, 12 Library Street.
  • 41. TO CAPTAIN MARRYATT, R. N. AUTHOR OF ‘The King’s Own,’ ‘Newton Foster,’ ‘Peter Simple,’ etc., etc. THESE PAGES ARE DEDICATED BY THE OLD SAILOR.
  • 43. CONTENTS OF VOL. I. PAGE Greenwich Hospital, 9 Tom Brookes, 145 Daddy Davy, the Negro, 159
  • 45. PREFACE. Once more I present myself before the Public in a Book; and whatever all hands may think of it, I can assure them it is no joke to keep one’s brains like a winch, continually spinning yarns. However, as my “Greenwich Hospital” met with a favourable reception, I have been induced to try another launch—and—here I am at the service of my readers. THE OLD SAILOR.
  • 47. GREENWICH HOSPITAL, The grand depository of human fragments,—the snug harbour for docked remnants,—Greenwich Hospital! Who is there that has stood upon that fine terrace, when the calm of evening has shed its influence on the spirit, and nature’s pencil intermingling light and shade has graced the landscape with its various tints, without feeling delighted at the spectacle? No sound is heard to break the stillness of the hour, save when the sea-boy trills his plaintive ditty, studious to grace the turnings of his song, for it was his mother taught it him, and her he strives to imitate. To him the tide rolls on unheeded; he sees not the tall mast, the drooping sail; ah, no! his heart is in the cottage where he knew his first affection, when with a smile of infantile delight he drew his nourishment from that fond bosom lately bedewed with tears at parting. Who is there that has not exulted in the scene, when the proud ship has spread her canvass to the breeze to carry forth the produce of our country to distant lands? or when returning to her own home- shores, laden with the luxuries of foreign climes, the gallant tars have “Hailed each well-known object with delight!” Ay, there they stand! the veterans of the ocean, bidding defiance to care and sorrow, full of mirth and jollity although they are moored in tiers. They are critics too, deep critics; but they cannot fancy the steam vessel with a chimney for a mast, and fifty yards of smoke for a pendant. These are the men that Smollett pictured,—the Jack Rattlins and the Tom Pipes of former years. Ay, those were rattling days and piping times! There is no place upon earth, except Greenwich, in which we can now meet with them, or find the weather-roll or lee-lurch to perfection. They are all thorough-bred, and a thorough-bred seaman is one of the drollest compounds in existence; a mixture of all that is ludicrous and grave,—of undaunted
  • 48. courage and silly fear. I do not mean the every-day sailor, but the bold, daring, intrepid man-of-war’s man; he who in the heat of action primed his wit and his gun together, without a fear of either missing fire. The real tar has a language peculiarly his own, and his figures of speech are perfect stopper-knots to the understanding of a landsman. If he speaks of his ship, his eloquence surpasses the orations of a Demosthenes, and he revels in the luxuriance of metaphor. The same powers of elocution, with precisely the same terms, are applied to his wife, and it is a matter of doubt as to which engrosses the greatest portion of his affection,—to him they are both lady-ships. Hear him expatiate on his little barkey, as he calls his wooden island, though she may carry a hundred-and-fifty guns and a crew of a thousand men. “Oh! she’s the fleetest of the fleet; sits on the water like a duck; stands under her canvass as stiff as a crutch; and turns to windward like a witch!” Of his wife he observes, “What a clean run from stem to starn! She carries her t’gall’nt sails through every breeze, and in working hank for hank never misses stays!” He will point to the bows of his ship, and swear she is as sharp as a wedge, never stops at a sea, but goes smack through all. He looks at his wife, admires her head-gear, and out-riggers, her braces and bow-lines; compares her eyes to dolphin-strikers, boasts of her fancy and fashion-pieces, and declares that she darts along with all the grace of a bonnetta. When he parts with his wife to go on a cruise, no tear moistens his cheek, no tremulous agitation does discredit to his manhood: there is the honest pressure of the hand, the fervent kiss, and then he claps on the topsail-halliards, or walks round at the capstan to the lively sounds of music. But when he quits his ship, the being he has rigged with his own fingers, that has stood under him in many a dark and trying hour, whilst the wild waves have dashed over them with relentless fury, then—then—the scuppers of his heart are unplugged and overflow with the soft droppings of sensibility. How often has he stood upon that deck and eyed the swelling sails, lest the breezes of heaven should “Visit their face too roughly!”
  • 49. How many hours has he stood at that helm and watched her coming up and falling off! and when the roaring billows have threatened to ingulf her in the bubbling foam of the dark waters, he has eased her to the sea with all the tender anxiety that a mother feels for her first- born child. With what pride has he beheld her top the mountain wave and climb the rolling swell, while every groan of labour that she gave carried a taut strain upon his own heart-strings! Place confidence in what he says, and he will use no deception; doubt his word, and he will indulge you with some of the purest rhodomontade that ingenious fancy can invent. He will swear that he had a messmate who knew the man in the moon, and on one occasion went hand-over-hand up a rainbow to pay him a visit. He himself was once powder-monkey in the Volcano bomb, and he will tell you a story of his falling asleep in the mortar at the bombardment of Toulon, and his body being discharged from its mouth instead of a carcass. With all the precision of an engineer, he will describe his evolutions in the air when they fired him off, and the manner in which he was saved from being dashed to pieces in his fall. All this he repeats without a smile upon his countenance, and he expects you to believe it: but you may soon balance the account, for tell him what absurdity you will, he receives it with the utmost credulity and is convinced of its truth. His courage is undoubted, for he will stand on the deck undismayed amidst the blood and slaughter of battle; yet on shore, he is seized with indescribable apprehensions at the sight of a coffin. The wailings of distress find a ready passport to his heart; but to disguise the real motives which prompt immediate aid, he swears that the object of his charity does not deserve a copper, yet gives a pound with only this provision,—that the individual relieved does not bother him about gratitude. You may know him from a thousand; for though in his dress conspicuously neat, and his standing and running rigging in exact order, yet they are arranged with a certain careless ease, as if he had but just come down from reefing topsails. The truck at the mast-head does not sit better than his tarpaulin hat, neither does the shoe upon the pea of the anchor fit tighter than his long quartered pumps. Grog is his ambrosia, his necktar; and he takes it cold, without sugar, that he may have the full smack of the rum.
  • 50. And these are the characters at Greenwich Hospital, who after fighting the battles of their country are honoured with a palace. Oh, it was a proud display of national gratitude to such brave defenders! England has been compared to a huge marine animal, whose ports were its mouths, and whose navy formed its claws. What then is Greenwich but a receptacle for superannuated claws? I dearly love to get amongst them,—nearly two thousand shattered emblems of Britain’s triumphs,—the returned stores of our naval glory. Ay, there they are with their snug little cabins, like turtles under their shells. But let us enter the Painted Wall, formerly the refectory for the pensioners, but now devoted to the commemoration of their gallant achievements. There are the portraits of the heroes of the olden time, whose memorials cannot perish; and there too is old Van Tromp, the Dutchman, who is honoured with a distinguished place amongst the brave of England’s pride. Here the old blades are a cut above the common; the small iron- bound officers who attend on visiters and point out the well- remembered features of commanders long since numbered with the dead. “That ’ere, sir, on your right, is the battle of Trafflygar,” said a short thickset man, apparently between sixty and seventy years of age. His countenance was one of mild benevolence, and yet there was a daring in his look that told at once a tale of unsubdued and noble intrepidity; whilst the deep bronze upon his skin was finely contrasted with the silky white locks that hung straggling on his brow. —“That ’ere, sir, is the battle of Trafflygar, in which I had the honour to be one.” “Were you with Nelson?” inquired I. “I was, your honour,” he replied, “and those were the proudest days of my life. I was with him when he bore up out of the line off Cape St. Vincent, and saved old Jarvis from disgrace. I was one of the boarders, too, when we took the Saint Joseph,—there’s the picture, there in the middle of the hall;—and I was with him in that
  • 51. ship there,—the Victory,—though it arn’t a bit like her,—and stationed on the quarter-deck at Trafflygar.” This was spoken with such an air of triumph, that the old man’s features were lighted up with animation; it called to his remembrance scenes in which he had shared the glory of the day and saved his country. His eye sparkled with delight, as if he again saw the British ensign floating in the breeze as the proud signal for conquest; or was labouring at the oar with his darling chief, like a tutelar deity of old, guiding the boat through the yielding element, and leading on to some daring and desperate enterprise. “I don’t like the picture,” said I; “the perspective is bad, and the ship is too long and flat; besides the colour is unnatural.” “Why, as for the matter of the prospective, sir,” replied the veteran, “that’s just what his present Majesty, God bless him! obsarved when he came to look at it; and for the colour, says the king, says he, ‘why the painter must have thought he’d been cooking, for he’s shoved the Victory into the hottest of the fire and done her brown;’ it was too bad, your honour, to singe her in that ’ere fashion, like a goose. Mayhap, your honour arn’t seen them there paintings of the battle at a place they call Exeter Hall, in the Strand. Now they are some-ut ship-shape, and the heat of the engagement warms a fellow’s heart to look at. An ould tar of the name of Huggins painted ’em, and I’m sure it’s right enough, for he’s made the Victory hugging the enemy just as a bear would a baby. I could stand and look at them pictures for hours, till I fancied myself once more in the midst of it, measuring out fathoms of smoke and giving ’em full weight of metal. The Victory has just fell aboard the French Redhotable and the Golision, as they calls it, gives each of ’em a lust different ways that looked so natural-like, that I felt myself getting a heel to port in the ould Victory as I looked at her. Then there’s the gale o’wind arter the battle; why, blow my ould wig, but you may feel the breeze and shake yourself from the spray. God bless his Majesty!—for they are the king’s, your honour;—long may he live to view ’em, and long may Huggins hug to windward under royal favour! I went to see him,—not the king, your honour, but Muster Huggins, and when he found I was ‘the Old Sailor,’ what gave some account of the life of a man-of-war’s man in ‘Greenwich Hospital,’ he
  • 52. whips out his old quid, flings it into the fire, and we sported a fresh bit o’bacca on the strength of it.—That was a welcome worthy a great man, and he could’nt ha’ done more for the king, though I arn’t quite sure that his Majesty does chaw his pig-tail.” There certainly was ample scope for the remarks of my old friend, and I could not but consider the picture a complete failure. “And so you were at Trafalgar,” said I. “Ay, and a glorious day it was, too, for Old England,” replied the tar. “Never shall I forget the enthusiasm which animated every breast, as we bore down to engage; it was indeed a noble sight, and so your honour would have said, if you had but have seen the winged giants of the deep as they marched majestically before the breeze, all ready to hurl their thunders at the foe. But the best scenes were at the quarters, where the bold captains of each gun stood cool and undaunted, waiting for the word: but for the matter o’ that, every soul, fore and aft, seemed to be actuated by one and the same spirit. ‘Look there, Ben,’ said Sam Windsail, pointing out of the port-hole at the Royal Sovereign, just entering into action, ‘look there, my Briton; see how she moves along, like a Phœnix in the midst of fire,—there’s a sight would do any body’s heart good. I’d bet my grog, (and that’s the lick-sir of life) I say I’d bet my grog agen a marine’s button, that old Colly’s having a desperate bowse at his breeches; he’s clapping on a taut hand, I’ll be bound for him.’ Just then the Sovereign hauled up a little, and opened her fire. ‘Didn’t I say so,’ continued Sam; ‘look at that! my eyes but he makes ’em sheer agen! Well behaved my sons of thunder! The old gemman knows the French are fond of dancing, so he’s giving them a few balls and routs! Ay, ay, we shall be at it presently, never fear; our old chap arn’t the boy to be long idle, but then, d’ye mind, he never does things by halves; so he loves close quarters, and as he is rather near with his cartridges, why he doesn’t like to throw a shot away. Howsomever, he’ll go it directly, like a doctor’s written orders,—this powder and these pills to be taken immediately,—eh, Ben? Next comes funny-section, or flay-bottomy, as the surgeons call it:—my eyes, there goes old Colly’s breeches agen, he’ll make a breach in the enemy’s line directly; ay, he’s a right arnest sallymander.’ By this time, your honour, we’d got within gun-shot, and the enemy opened
  • 53. a tremendous fire upon the leading ships of our division, which played up old Scratch upon the fokstle, poop, and main-deck; for as we bore down nearly stem on, and there was but a light breeze, they raked us fore and aft. “But I should have told you, sir, that just before going into action, the admiral walked round the quarters attended by the captain and, I thinks, Mr. Quillem, the first leftenant, but I won’t be sure. The gunner, Mr. Rivers, was along with ’em, I know, and a worthy old gemman he was; his son, a midshipman, was stationed on the same deck with us,—a fine spirited youth, with his light hair flowing about his ears and his little laughing eyes,—up to all manner of mischief. Well, round they came, and the hero seemed proud of his men; he stopped occasionally to speak to one and to another, and his keen eye saw in a moment if any thing wasn’t ship-shape. His countenance was rather stern, but there was a look of confidence that told us at once the day was our own;—nay, for the matter o’ that, Sam Windsail began to reckon what he should buy for Poll with his prize-money. “When they reached the quarters where young Rivers was stationed, Nelson looked at the son and then at the father, as much as to say, ‘he’s a fine youth, you ought to be proud of him,’ as no doubt the old gemman was, for he knew his gallant boy would do his duty. But still the tender solicitude of a parent’s heart is not to be repressed, however it may be concealed; and as he followed the admiral, his head was frequently turned back to take another look at his child, and perhaps he thought ‘mayhap it may be the last.’ Well, as I was saying before, the enemy’s balls began to rattle into us like hail-stones through a gooseberry bush, and many a poor fellow was laid low. ‘Arrah, bad manners to ’em, what do they mane by that?’ cried Tim Doyle, as a whole shoal of shot travelled in one another’s wake, and swept the entire range of the deck. ‘Come, don’t be skulking down there, Jack Noggin,’ continued Tim, ‘but lay hoult of the tackle-fall.’ Jack never moved. ‘Och bother, don’t you mane to get up?’ But poor Jack’s glass was run, his cable was parted; so we launched his hull out at the port, stock and fluke. “Mayhap you never saw a battle, sir. It is no child’s play, take my word for it. But the worst time is just before engaging, when silence
  • 54. reigns fore and aft, and a poor fellow douses his jacket without knowing whether he shall ever clap his rigging on agen. Then it is that home with all its sweet remembrances clings round the heart. Parents, or wife, or children, become doubly dear, and the fond ties of kindred are linked by stronger bonds. Howsomever, as soon as the first shot is fired, and we get within a sort of shake-hands distance of the enemy, every other thought gives way to a steady discharge of duty. “Well, d’ye see, close upon our quarter came the Trimmer-rare, 98, and as we hauled up a little, we brought our larboard broadside to bear upon the great Spanish four-decker;—there, that’s she in the picture showing her galleries, just by the Victory’s starn:—so we brought our broadside to bear, and oh, if you had but have seen the eager looks of the men as they pointed their guns, determined to make every shot tell,—and a famous mark she was, too, looming out of the water like Beachy-head in a fog. ‘Stand by,’ says Sam Windsail, looking along the sight with the match in his hand; ‘stand by, my boy; so, so,—elevate her breech a bit,—that will do. Now, then, for the Santizzy-mama-Trinny-daddy, and I lay my life I knock day-light through his ribs. Fire!’ and the barking irons gave mouth with all their thunder. A few minutes afterward, and slap we poured another raking broadside into the Spaniard, and then fell aboard a French seventy-four. “Well, there, d’ye see, we lay, rubbing together with the muzzles of the lower deckers touching one another. When our guns were run in for loading, the ports were instantly occupied by the small-arm men, and several attempts were made to board the enemy. At this time one of the Frenchmen kept thrusting at us with a boarding-pike, and pricked Tim Doyle in the face. ‘Och, the divil’s cure to you,’ bawled Tim; ‘what do you mane by poking at me in that way. A joke’s a joke, but poking a stick in a fellow’s eye is no joke, any how; be aisey then, darlint, and mind your civility.’ As soon as we had fired, in came the pike agen, and Tim got another taste of it. ‘Och bother,’ said Tim, ‘if that’s your tratement of a neighbour, the divil wouldn’t live next door to yes! But faith, I’ll make you come out o’ that, and may be you’ll be after just paying me a visit.’ So he catches hold of a boat-hook that was triced up in a-midships, and watching his
  • 55. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! textbookfull.com