Changes to server install guides

master^2
Nathan Steel 2 years ago
parent 8bf509d823
commit 04414fc042

@ -33,7 +33,7 @@
<main id="main">
<section>
<p>This section assumes you have a fresh Debian 11 install on a server (either physical or VPS)</p>
<p>This section assumes you have a fresh Debian install on a server (either physical or VPS)</p>
<p>It will cover installing the essentials for access, and basic security so you don't need to worry in the future. This section may seem a little daunting for a first-time linux user, but most of it is copy/paste, hopefully with enough description to understand what is being done. Just remember not to copy the $/root$ they're there to show what user/directory we're in. </p>
</section>

@ -43,8 +43,8 @@
<h2>Download and Burn the ISO</h2>
<p>First thing is to get the install media setup. If you know how to burn an ISO, go ahead and get that done, I'll wait for you in the next section. If not follow below.</p>
<p>Download the latest debian ISO from the <a>debian website</a>, at the time of writing it's <a>this release</a>, but get it from their page.</p>
<p>Download <a>Balena Etcher</a> for your device (Windows, MacOS, Linux), and install it</p>
<p>Download the latest debian ISO from the <a href="https://www.debian.org/distrib/" target="_blank" rel="noopener">debian distrubution page</a>, at the time of writing it's <a href="https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso" target="_blank" rel="noopener">this release</a> (assuming you're installing on a 64bit PC), but get it from their page.</p>
<p>Download <a href="https://etcher.balena.io/" target="_blank" rel="noopener">Balena Etcher</a> for your device (Windows, MacOS, Linux), and install it</p>
<p>Then open Etcher (with an empty USB plugged in), select the USB, and the downloaded ISO image, then hit run.</p>
<p>When finished remove the USB and plug it into the PC you want to install Debian to</p>
@ -56,53 +56,73 @@
<p>Like above, press the key to get into either a one-time boot menu, or the bios. From there select your USB as a boot override. This will boot from the USB just this time, and then revert to the normal boot order.</p>
<h2>Start install</h2>
<p>When you're greeted by a debian boot page, select "Install" (that's what I'll be using) but "Graphical Install" is also fine, as it's essentially the samething, but you can use a mouse.</p>
<p>When you're greeted by a debian boot page, select "Install" (that's what I'll be using) but "Graphical Install" is also fine, as it's essentially the same thing, but you can use a mouse.</p>
<h2>Localisation</h2>
<p>As if you are filling out an online form, simply ensure the boxes are correct to your language, location (sets time, and download servers), and keyboard layout.</p>
<h2>Network, and server name</h2>
<p>If you're using DHCP, this can be...</p>
TODO
<h3>Hostname</h3>
<p>What you wish to call your server, I like to give names that are quirky, but still kinda explain what they do. For example, my webserver is "spiderverse", and my NAS is "lilnas", etc.</p>
<p>What you wish to call your server, I like to give names that are quirky, but still kinda explain what they do. For example, some names I've used are "spiderverse" for a web server, and "lilnas" for a NAS, etc.</p>
<h3>Domain name</h3>
<p>Leave this as default, and hit continue.</p>
<p>Leave this as default "home", and hit continue.</p>
<h2>Create User</h2>
<h2>Set up users and password</h2>
<p>The first thing you'll see is a screen asking for a root password.</p>
<h3>Don't set a root password</h3>
<p>This will ask for a root password. Do not enter a password, and simply git the <strong>Enter</strong> key, then again when it asks for the password the second time. A root user with a password is a vulnerability, so we're avoiding this.</p>
<p>Simply hit the <strong><kbd>Enter</kbd></strong> key, then again when it asks for the password the second time. A root user with a password is a vulnerability, so we're avoiding this.</p>
<h3>Create your user (admin account)</h3>
<p>Now enter your username, and password as the installer requests. This account will be added to the sudo group, making it an admin with access to root, and root commands.</p>
<p>Now enter your username, and password as the installer requests.</p>
<p>This account will be added to the sudo group, making it an admin with that can act as the root user.</p>
<h2>Disk Partitioning</h2>
<p>For this I am assume you're using a new drive, or at least one that you don't want any of the data on it</p>
<h3>Auto-partitioning</h3>
<p>You can do this, and it's recommended if you're new to linux. Once you've got the hang of it, you can always re-install your server from scratch (I recommend this a couple of times).</p>
<p>Also select to have all files in one partition, as it's the simplest option.</p>
<p>Finish Partitioning, and done.</p>
<h3>Guided/Auto-partitioning</h3>
<p>You can do this, and it's recommended if you're new to linux. Once you've got the hang of it, you can always re-install your server from scratch (I recommend this a couple of times if it's non-integral).</p>
<p>Select <em>Guided - use entire disk</em> then select the drive you want to boot from.</p>
<p>Then select <em>All files in one partition (recommended for new users)</em>, as it's the simplest option.</p>
<h3>Manual Partitioning</h3>
<p>For a little more control over the partitioning, this is the option. If you are a beginner I'd just go with auto for now, but follow this if you desire.</p>
TODO
<h3><del>Manual Partitioning</del></h3>
<p>I've opted to leave this out, as it's a beginner guide. If you're reading this though I typically don't create a swap partition, but the guided installer does. It's no problem, but following this guide makes it redundant.</p>
<h3>Preferences</h3>
<h3>Skip Swap (for now)</h3>
<h3>(Optional) Preferences</h3>
<p>With your disk partitioned select the partion that has a <strong>/</strong> at the far right, and hit <kbd>Enter</kbd>.</p>
<p>Go to <em>Mount Options</em>, and select (using <kbd>Space</kbd>) <em>noatime</em>, and <em>nodiratime</em>. Then hit <kbd>Enter</kbd>, and select <em>Done setting up the partition</em>.</p>
<h2>Scan Additional Media</h2>
<p>Unless you've addition drivers, etc. (You probably don't) hit <strong>No</strong></p>
<h3>Finalising Partitioning</h3>
<p>Simply hit <kbd>Enter</kbd> on <em>Finish partitioning and write changes to disk</em> at the bottom of the page.</p>
<p>Another screen will appear to verify you wish to partition, hit <em>Yes</em>, and it'll begin partitioning. Give it a little time.</p>
<h2>Configure Mirror</h2>
<h3>Configure the package manager</h3>
<p>A simple one, select your country, hit enter to the top selection, hit enter again when it asks for a proxy (unless you know what you're doing), and sorted.</p>
<h2>Popularity Contest</h2>
<p>I typically select <em>No</em> here, but read what it is and select for yourself.</p>
<h2>Software Selection</h2>
<h2>Install Grub Boot Loader</h2>
<p>Now tasksel will load up, and ask if you want any software installed during setup.</p>
<p>I choose to deselect everything pre-selected (the ones with asterisks), however for a new setup keeping <em>standard system utilities</em> is a-ok.</p>
<p>If you're after a GUI experience you can select <em>Xfce</em> as it's pretty lightweight, however I'd recommend going with no GUI for a server.</p>
<p>Once you've selected what to install, hit <kbd>Enter</kbd>.</p>
<h2>Reboot, and enjoy!</h2>
<p>Reboot your server, and tada!</p>
<h2>Setup Swap</h2>
<p>I mentioned earlier I don't setup a swap partition, and that it'd be redundant if you follow this guide, so here we go.</p>
<p>Swap sizes vary per PC as different services use more RAM, etc. A decent(ish) rule of thumb is to set half your RAM size as the swap size, but to be honest 8GB will likely suffice.</p>
<h3>Create the swap file</h3>
<pre><code>sudo fallocate -l 8G /swapfile</code></pre>
<h3>Set permissions</h3>
<pre><code>sudo chmod 600 /swapfile</code></pre>
<h3>Set the file as a swap area</h3>
<pre><code>sudo mkswap /swapfile &amp;&amp; sudo swapon /swapfile</code></pre>
<h3>Set on boot</h3>
<p>Open <strong>/etc/fstab</strong> with a text editor. I'll use vi for this.</p>
<pre><code>sudo vi /etc/fstab</code></pre>
<p>Press <kbd>g<kbd><kbd>g<kbd>, followed by <kbd>Shift</kbd>+<kbd>o</kbd>, then type the following.</p>
<pre><code>/swapfile swap swap defaults 0 0</code></pre>
<p>Then press <kbd>esc</kbd>, followed by <kbd>shift</kbd>+<kbd>Z</kbd><kbd>Z</kbd>.</p>
<h2>Next steps</h2>
<p>Now that you've got a basic Debian install, you'll need to configure, and install a few things. I've written a little something, somthing like that, so check <a href="/guides/initial-server-setup.html">how to setup a new server install</a></p>

Loading…
Cancel
Save