Skip to content

Commit 224e4ed

Browse files
committed
new blog post
1 parent 6d66a59 commit 224e4ed

File tree

11 files changed

+134
-0
lines changed

11 files changed

+134
-0
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
title: How to Provision Ubuntu 16.04 Linux Servers on Linode
2+
slug: provision-ubuntu-linux-servers-linode
3+
meta: Learn to provision Ubuntu 16.04 LTS servers on Linode for your web applications.
4+
category: post
5+
date: 2017-09-20
6+
modified: 2017-09-20
7+
headerimage: /img/170920-provision-ubuntu-linode/header.jpg
8+
headeralt: Ubuntu Linux logo, copyright Canonical Ltd. and Linode logo.
9+
10+
11+
Your live web application must be [deployed](/deployment.html) and run
12+
somewhere other than your local
13+
[development environment](/development-environments.html). That deployment
14+
location is known as a "production environment" and it is built out of
15+
one or more [servers](/servers.html).
16+
17+
Let's learn how to provision an [Ubuntu Linux 16.04 LTS](/ubuntu.html)
18+
[virtual private server (VPS)](/virtual-private-servers-vps.html) on Linode
19+
that can be used for production or development purposes.
20+
21+
22+
## Signing up for Linode
23+
We need a Linode account to provision a server, so start by pointing your
24+
web browser to [Linode.com](https://www.linode.com/). Their
25+
landing page will look something like the following image.
26+
27+
<img src="/img/170920-provision-ubuntu-linode/linode-landing-page.jpg" class="technical-diagram img-rounded" width="100%">
28+
29+
[Sign up](https://manager.linode.com/session/signup) for an account.
30+
31+
<img src="/img/170920-provision-ubuntu-linode/linode-sign-up.png" class="technical-diagram img-rounded" style="border:1px solid #ccc" width="100%">
32+
33+
You should receive an email for account confirmation. Fill out the
34+
appropriate information and add initial credit to your account. If you
35+
want to enter a referral code, mine is
36+
`bfeecaf55a83cd3dd224a5f2a3a001fdf95d4c3d`. Your account will go for
37+
a quick review to ensure you are not a malicious spam bot and then
38+
your account will be fully activated.
39+
40+
Once your account is activated refresh the page. The new page will allow
41+
you to add a Linode instance.
42+
43+
Provisioning a server for $5 or $10/month (depending on
44+
how much memory and storage you want) is more than enough for small-scale
45+
Python web applications.
46+
47+
Select the 1024 option and the data center location of your choice. I chose
48+
Newark, NJ because I grew up in northern NJ and otherwise the location is not
49+
important for my deployment. If your most of your users are located in a
50+
specific region then you should select the data center location closest to
51+
them.
52+
53+
<img src="/img/170920-provision-ubuntu-linode/select-instance.jpg" class="technical-diagram img-rounded" style="border:1px solid #ccc" width="100%">
54+
55+
Click the "Add this Linode!" button and a dashboard will appear that
56+
shows the Linode is being provisioned.
57+
58+
<img src="/img/170920-provision-ubuntu-linode/dashboard.jpg" class="technical-diagram img-rounded" style="border:1px solid #ccc" width="100%">
59+
60+
Refresh the page and look for the status to change to "Brand New." Write
61+
down or copy the IP address as it will be needed later to SSH into the
62+
server, then click on the name of the Linode. A page will appear to
63+
show more information about your new virtual private server.
64+
65+
<img src="/img/170920-provision-ubuntu-linode/dashboard-provisioned.jpg" class="technical-diagram img-rounded" style="border:1px solid #ccc" width="100%">
66+
67+
Click the "Rebuild" link.
68+
69+
<img src="/img/170920-provision-ubuntu-linode/rebuild.jpg" class="technical-diagram img-rounded" style="border:1px solid #ccc" width="100%">
70+
71+
Select Ubuntu 16.04, which is the current Long Term Support (LTS) release
72+
and has a 5 year support lifecycle. This version will receive security
73+
updates until April 2021 as shown on the
74+
[Ubuntu wiki page for LTS releases](https://www.ubuntu.com/info/release-end-of-life).
75+
76+
<img src="/img/170920-provision-ubuntu-linode/ubuntu-lts-releases.jpg" class="technical-diagram img-rounded" style="border:1px solid #ccc" width="100%">
77+
78+
Enter a root password. Make sure you type the password in carefully and
79+
remember it! The password will be needed when you log into the server
80+
as the root user. The "Deployment Disk Size" and "Swap Disk" can be left as
81+
their default values.
82+
83+
<img src="/img/170920-provision-ubuntu-linode/deploy-distribution.png" class="technical-diagram img-rounded" style="border:1px solid #ccc" width="100%">
84+
85+
When the build process begins Linode will send us back to our server's
86+
dashboard page. The progress bars will show the status and in a couple of
87+
minutes the server will be ready to boot up.
88+
89+
90+
## Boot and Log In
91+
Click the "Boot" button and the Ubuntu boot process will get started.
92+
Booting should take less than a minute. Bring up your local command line
93+
as we will need it to connect to the remote machine.
94+
95+
<img src="/img/170920-provision-ubuntu-linode/boot.jpg" class="technical-diagram img-rounded" style="border:1px solid #ccc" width="100%">
96+
97+
SSH into your server with `ssh root@{ip.address.here}` where
98+
`{ip.address.here}` is your server's IP address, which can be found on the
99+
Linode dashboard. For example, if your new Linode's IP address
100+
is 66.175.209.129, you'll enter `ssh root@66.175.209.129`.
101+
102+
You'll likely receive a prompt like the following warning. This prompt
103+
states that you've never connected to this server before and it asks if
104+
you are sure that this host's signature matches the server on which you
105+
intend to connect. Enter `yes` then enter the root password you created
106+
during the earlier Linode server provisioning step.
107+
108+
```bash
109+
The authenticity of host '66.175.209.192 (66.175.209.192)' can't be established.
110+
RSA key fingerprint is 51:3c:ba:bc:c3:83:1a:36:b1:2d:e3:f6:6d:f0:11:56.
111+
Are you sure you want to continue connecting (yes/no)? yes
112+
```
113+
114+
A message like "Welcome to Ubuntu 16.04.3 LTS" will appear followed by a
115+
prompt. Now we can enter commands on the remote machine to get the
116+
server secured and setup.
117+
118+
119+
## Next Steps
120+
You are all set to start configuring your server. You will want to
121+
immediately create
122+
[SSH keys](https://www.fullstackpython.com/blog/ssh-keys-ubuntu-linux.html)
123+
and disable password logins as well as install tools like
124+
[fail2ban](https://www.fail2ban.org/wiki/index.php/Main_Page).
125+
126+
Questions? Contact me via Twitter
127+
[@fullstackpython](https://twitter.com/fullstackpython)
128+
or [@mattmakai](https://twitter.com/mattmakai). I'm also on GitHub with
129+
the username [mattmakai](https://github.com/mattmakai).
130+
131+
See something wrong in this post? Fork
132+
[this page's source on GitHub](https://github.com/mattmakai/fullstackpython.com/blob/master/content/posts/170920-provision-ubuntu-linux-servers-linode.markdown)
133+
and submit a pull request.
80.3 KB
Loading
101 KB
Loading
99.6 KB
Loading
51.7 KB
Loading
126 KB
Loading
Binary file not shown.
134 KB
Loading
169 KB
Loading
114 KB
Loading

0 commit comments

Comments
 (0)