<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https:///index.php?action=history&amp;feed=atom&amp;title=Ubuntu_VPS_install</id>
	<title>Ubuntu VPS install - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https:///index.php?action=history&amp;feed=atom&amp;title=Ubuntu_VPS_install"/>
	<link rel="alternate" type="text/html" href=""/>
	<updated>2026-04-07T09:25:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id></id>
		<title>Gr0x0rd at 06:08, 3 February 2023</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2023-02-03T06:08:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:08, 3 February 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l558&quot; &gt;Line 558:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 558:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Get csf webmin up and running with remote&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Get csf webmin up and running with remote&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=Increasing disk space=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Not all hosting providers have the ability to increase the storage on a disk and apply it to the appropriate partition (typically root). As such the following process is required.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Confirm the additional space==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Check the status of the system partitions using &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; $ sudo df -h&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Check the type of block device and file system using&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; $ sudo lsblk&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Run fdisk to examine the status of the disk that&amp;#039;s been extended&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; $ sudo fdisk /dev/sdx&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(where x is the virtual disk that&amp;#039;s been increased, typically a).&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Likely you will note a warning that there is a GPT PMBR size mismatch, and this will be corrected upon write.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Make a note of the sector that the partition that is to be extended begins at.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Delete the partition to be extended==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; Command (m for help): p&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;View the partitions so you know which one to delete.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; Command (m for help): d&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Enter the correct partition to be deleted.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Recreate the partition==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; Command (m for help): n&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; Partition number: this should be the same as the partition you deleted.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; First sector: this needs to match the first sector of the partition you deleted.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; Last sector: this can be customized, or just go with default to use all space.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If using LVM, it will mention a signature was found. DO NOT remove the signature.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; Command (m for help): w&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This will sync the disks and exit fdisk.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Extend the filesystem==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===Optional: LVM===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If the system is using LVM, the volume will need to be extended. Determine the group name&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; $ sudo vgdisplay&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Note the name. Extend the volume&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; $ sudo lvextend -L +XG /dev/mapper/&amp;lt;volume_name&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(where X is the size in GB to extend the volume).&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;bR&amp;gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;To extend the filesystem, run the resize2fs command.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; $ sudo resize2fs /dev/&amp;lt;device or partition&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Update the kernel==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;LVM should update automatically. If not using LVM, update the kernel manually.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; $ sudo partprobe&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Confirm the new storage has been added successfully:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; $ sudo df -h&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gr0x0rd</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Gr0x0rd: Created page with &quot;= Initial Setup =  Determine the IP address of the new server and ssh into it as the root user. This information should be provided by the hosting company that provisioned the...&quot;</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2023-02-03T06:06:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Initial Setup =  Determine the IP address of the new server and ssh into it as the root user. This information should be provided by the hosting company that provisioned the...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Initial Setup =&lt;br /&gt;
&lt;br /&gt;
Determine the IP address of the new server and ssh into it as the root user. This information should be provided by the hosting company that provisioned the server.&lt;br /&gt;
 $ ssh -l root -p &amp;lt;ip address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set a new root password. Use a password generator to create a complex password. Save the password in the vault and paste it to the session.&lt;br /&gt;
 # passwd root&lt;br /&gt;
&lt;br /&gt;
Apply all system updates.&lt;br /&gt;
 # sudo apt update&lt;br /&gt;
 # sudo apt upgrade&lt;br /&gt;
&lt;br /&gt;
== User setup and authentication ==&lt;br /&gt;
&lt;br /&gt;
Add users for administration. &lt;br /&gt;
 # adduser &amp;lt;user&amp;gt;&lt;br /&gt;
Set the password for the user. Generate a new password for the user and save it in the password vault.&lt;br /&gt;
 # usermod -aG sudo &amp;lt;user&amp;gt;&lt;br /&gt;
Disable the firewall. &lt;br /&gt;
 # ufw disable&lt;br /&gt;
Change the default ssh configuration. &lt;br /&gt;
 # nano /etc/ssh/sshd_config&lt;br /&gt;
Change the port, passwordauthentication (dont forget to add ssh key first), disable root login. Store the port in the password vault. When done, restart the service.&lt;br /&gt;
 # service sshd restart&lt;br /&gt;
Log out. Confirm the new port is active. Try to log in as root and confirm that fails. Log in with your privileged account. If desired, go ahaed with [[Ssh_keypair_setup]].&lt;br /&gt;
&lt;br /&gt;
= Firewall setup =&lt;br /&gt;
Install the required prerequisites.&lt;br /&gt;
 $ sudo apt-get install -y openssl&lt;br /&gt;
 $ sudo apt install perl -y&lt;br /&gt;
 $ sudo apt-get install libwww-perl liblwp-protocol-https-perl libgd-graph-perl libio-socket-ssl-perl libcrypt-ssleay-perl libnet-libidn-perl libio-socket-inet6-perl libsocket6-perl curl nginx apache2-utils snapd -y&lt;br /&gt;
&lt;br /&gt;
Download the alternative to the default ubuntu firewall and install it.&lt;br /&gt;
 $ cd /usr/src&lt;br /&gt;
 $ sudo wget https://download.configserver.com/csf.tgz&lt;br /&gt;
 $ sudo tar -xzf csf.tgz&lt;br /&gt;
 $ cd csf&lt;br /&gt;
 $ sudo sh install.sh&lt;br /&gt;
Confirm the new firewall default configuration is working.&lt;br /&gt;
 $ sudo perl /usr/local/csf/bin/csftest.pl&lt;br /&gt;
Stop and disable the default firewall.&lt;br /&gt;
 $ sudo systemctl stop firewalld&lt;br /&gt;
 $ sudo systemctl disable firewalld&lt;br /&gt;
Make customizations the csf configuration.&lt;br /&gt;
 $ sudo nano /etc/csf/csf.conf&lt;br /&gt;
Be sure to set the following: &lt;br /&gt;
* Testing to 0 (set to 1 if needing further testing)&lt;br /&gt;
* RESTRICT_SYSLOG=3&lt;br /&gt;
* If it is a jisti server, add the UDP port 10000 to &amp;quot;UDP_IN&amp;quot;&lt;br /&gt;
* SYSLOG_CHECK = &amp;quot;1800&amp;quot;&lt;br /&gt;
* LF_ALERT_TO = &amp;quot;&amp;quot; # this needs to be set to shared notifications email address&lt;br /&gt;
* LF_POP3D = &amp;quot;1&amp;quot;&lt;br /&gt;
* LF_IMAPD = &amp;quot;1&amp;quot;&lt;br /&gt;
* LF_WEBMIN = &amp;quot;1&amp;quot; # not enabled in other system, but confirm web facing instance is restricted to certain IPs&lt;br /&gt;
* UI = &amp;quot;1&amp;quot;&lt;br /&gt;
* UI_PORT = &amp;quot;xxxx&amp;quot; # this should be unique for each server and stored in the password vault&lt;br /&gt;
* UI_USER = &amp;quot;&amp;lt;user&amp;gt;&amp;quot; # this should be unique for each server and stored in the password vault&lt;br /&gt;
* UI_PASS = &amp;quot;&amp;lt;password&amp;gt;&amp;quot; # this should be unique for each server and stored in the password vault&lt;br /&gt;
Save the file. Next, configure the UI to only allow specific IPs.&lt;br /&gt;
 $ nano /etc/csf/ui/ui.allow&lt;br /&gt;
Save the file with the list of allowed IP addresses, one on each line. Next, start the service.&lt;br /&gt;
 $ sudo service lfd restart&lt;br /&gt;
This may kill your ssh session. Log back in. Set the hostname to the client instance.&lt;br /&gt;
 $ sudo nano /etc/hostname&lt;br /&gt;
&lt;br /&gt;
= Monitoring setup =&lt;br /&gt;
Download the kickstart script.&lt;br /&gt;
 $ cd &lt;br /&gt;
 $ wget https://my-netdata.io/kickstart.sh&lt;br /&gt;
Run the script. &lt;br /&gt;
 $ sudo bash kickstart.sh --disable-telemetry&lt;br /&gt;
While the application is installing, configure a DNS record for stat.domain.com &lt;br /&gt;
&lt;br /&gt;
== nginx web server ==&lt;br /&gt;
Create a simple authentication. &lt;br /&gt;
 $ sudo htpasswd -c /etc/nginx/.htpasswd3 server&lt;br /&gt;
When prompted, enter the password &amp;quot;status&amp;quot;. Next, Set the configuration file for this instance. &lt;br /&gt;
 $ sudo nano /etc/nginx/sites-available/stat.&amp;lt;instance&amp;gt;&lt;br /&gt;
Use the previously known good configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
upstream backend {&lt;br /&gt;
   # the Netdata server&lt;br /&gt;
    server 127.0.0.1:19997;&lt;br /&gt;
#    server unix:/var/run/netdata/netdata.sock;&lt;br /&gt;
    keepalive 64;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
&lt;br /&gt;
    allow 75.157.219.105;&lt;br /&gt;
    allow 209.205.88.122;&lt;br /&gt;
    allow 127.0.0.1;&lt;br /&gt;
    deny  all;&lt;br /&gt;
&lt;br /&gt;
    # nginx listens to this&lt;br /&gt;
&lt;br /&gt;
    # the virtual host name of this&lt;br /&gt;
    server_name stat.domain.ext;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_set_header X-Forwarded-Host $host;&lt;br /&gt;
        proxy_set_header X-Forwarded-Server $host;&lt;br /&gt;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
        proxy_pass http://backend;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_pass_request_headers on;&lt;br /&gt;
        proxy_set_header Connection &amp;quot;keep-alive&amp;quot;;&lt;br /&gt;
        proxy_store off;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        auth_basic &amp;quot;Restricted Content&amp;quot;;&lt;br /&gt;
        auth_basic_user_file /etc/nginx/.htpasswd3;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    listen 80;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Create the symlink to the sites-enabled.&lt;br /&gt;
 $ sudo ln -s /etc/nginx/sites-available/stat.&amp;lt;instance&amp;gt; /etc/nginx/sites-enabled/stat.instance&lt;br /&gt;
&lt;br /&gt;
Customze the netdata installation configuration. &lt;br /&gt;
 $ sudo nano /etc/netdata/netdata.conf&lt;br /&gt;
* Increase the value of &amp;quot;history&amp;quot; to 604800 (7 days).&lt;br /&gt;
* Delay the update to 5 seconds. &lt;br /&gt;
* Change the default port to 19997.&lt;br /&gt;
* Add other recommended defaults as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[global]&lt;br /&gt;
    run as user = netdata&lt;br /&gt;
&lt;br /&gt;
    # the default database size - 1 hour&lt;br /&gt;
    history = 604800&lt;br /&gt;
    update every = 5&lt;br /&gt;
&lt;br /&gt;
    # some defaults to run netdata with least priority&lt;br /&gt;
    process scheduling policy = idle&lt;br /&gt;
    OOM score = 1000&lt;br /&gt;
    access log = none&lt;br /&gt;
&lt;br /&gt;
[web]&lt;br /&gt;
        default port = 19997&lt;br /&gt;
        bind to = 127.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Restart the netdata service.&lt;br /&gt;
 $ sudo systemctl restart netdata&lt;br /&gt;
&lt;br /&gt;
== Make some networking security changes ==&lt;br /&gt;
 $ sudo nano /etc/sysctl.conf&lt;br /&gt;
Enable spoof protection and make some network security changes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# /etc/sysctl.conf - Configuration file for setting system variables&lt;br /&gt;
# See /etc/sysctl.d/ for additional system variables.&lt;br /&gt;
# See sysctl.conf (5) for information.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
#kernel.domainname = example.com&lt;br /&gt;
&lt;br /&gt;
# Uncomment the following to stop low-level messages on console&lt;br /&gt;
#kernel.printk = 3 4 1 3&lt;br /&gt;
&lt;br /&gt;
##############################################################3&lt;br /&gt;
# Functions previously found in netbase&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Uncomment the next two lines to enable Spoof protection (reverse-path filter)&lt;br /&gt;
# Turn on Source Address Verification in all interfaces to&lt;br /&gt;
# prevent some spoofing attacks&lt;br /&gt;
net.ipv4.conf.default.rp_filter=1&lt;br /&gt;
net.ipv4.conf.all.rp_filter=1&lt;br /&gt;
&lt;br /&gt;
# Ignore ICMP broadcast requests&lt;br /&gt;
net.ipv4.icmp_echo_ignore_broadcasts = 1&lt;br /&gt;
&lt;br /&gt;
# Uncomment the next line to enable TCP/IP SYN cookies&lt;br /&gt;
# See http://lwn.net/Articles/277146/&lt;br /&gt;
# Note: This may impact IPv6 TCP sessions too&lt;br /&gt;
#net.ipv4.tcp_syncookies=1&lt;br /&gt;
&lt;br /&gt;
# Uncomment the next line to enable packet forwarding for IPv4&lt;br /&gt;
#net.ipv4.ip_forward=1&lt;br /&gt;
&lt;br /&gt;
# Uncomment the next line to enable packet forwarding for IPv6&lt;br /&gt;
#  Enabling this option disables Stateless Address Autoconfiguration&lt;br /&gt;
#  based on Router Advertisements for this host&lt;br /&gt;
#net.ipv6.conf.all.forwarding=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
###################################################################&lt;br /&gt;
# Additional settings - these settings can improve the network&lt;br /&gt;
# security of the host and prevent against some network attacks&lt;br /&gt;
# including spoofing attacks and man in the middle attacks through&lt;br /&gt;
# redirection. Some network environments, however, require that these&lt;br /&gt;
# settings are disabled so review and enable them as needed.&lt;br /&gt;
#&lt;br /&gt;
# Do not accept ICMP redirects (prevent MITM attacks)&lt;br /&gt;
net.ipv4.conf.all.accept_redirects = 0&lt;br /&gt;
net.ipv6.conf.all.accept_redirects = 0&lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.default.accept_redirects = 0&lt;br /&gt;
net.ipv6.conf.default.accept_redirects = 0&lt;br /&gt;
&lt;br /&gt;
# _or_&lt;br /&gt;
# Accept ICMP redirects only for gateways listed in our default&lt;br /&gt;
# gateway list (enabled by default)&lt;br /&gt;
# net.ipv4.conf.all.secure_redirects = 1&lt;br /&gt;
#&lt;br /&gt;
# Do not send ICMP redirects (we are not a router)&lt;br /&gt;
#net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
#&lt;br /&gt;
# Do not accept IP source route packets (we are not a router)&lt;br /&gt;
#net.ipv4.conf.all.accept_source_route = 0&lt;br /&gt;
#net.ipv6.conf.all.accept_source_route = 0&lt;br /&gt;
#&lt;br /&gt;
# Log Martian Packets&lt;br /&gt;
net.ipv4.conf.all.log_martians = 1&lt;br /&gt;
&lt;br /&gt;
net.ipv4.icmp_ignore_bogus_error_responses = 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.all.accept_source_route = 0&lt;br /&gt;
net.ipv6.conf.all.accept_source_route = 0&lt;br /&gt;
net.ipv4.conf.default.accept_source_route = 0&lt;br /&gt;
net.ipv6.conf.default.accept_source_route = 0&lt;br /&gt;
&lt;br /&gt;
# Ignore send redirects&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
net.ipv4.conf.default.send_redirects = 0&lt;br /&gt;
&lt;br /&gt;
# Block SYN attacks&lt;br /&gt;
net.ipv4.tcp_syncookies = 1&lt;br /&gt;
net.ipv4.tcp_max_syn_backlog = 2048&lt;br /&gt;
net.ipv4.tcp_synack_retries = 2&lt;br /&gt;
net.ipv4.tcp_syn_retries = 5&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
###################################################################&lt;br /&gt;
# Magic system request Key&lt;br /&gt;
# 0=disable, 1=enable all, &amp;gt;1 bitmask of sysrq functions&lt;br /&gt;
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html&lt;br /&gt;
# for what other values do&lt;br /&gt;
#kernel.sysrq=438&lt;br /&gt;
&lt;br /&gt;
# Ignore Directed pings&lt;br /&gt;
net.ipv4.icmp_echo_ignore_all = 1&lt;br /&gt;
&lt;br /&gt;
fs.file-max = 100000&lt;br /&gt;
net.core.somaxconn = 65535&lt;br /&gt;
net.ipv4.tcp_max_tw_buckets = 1440000&lt;br /&gt;
net.ipv4.ip_local_port_range = 1024 65000&lt;br /&gt;
net.ipv4.tcp_fin_timeout = 15&lt;br /&gt;
net.ipv4.tcp_window_scaling = 1&lt;br /&gt;
net.ipv4.tcp_max_syn_backlog = 3240000&lt;br /&gt;
net.core.rmem_max = 16777216&lt;br /&gt;
net.core.wmem_max = 16777216&lt;br /&gt;
net.core.rmem_default = 16777216&lt;br /&gt;
net.core.wmem_default = 16777216&lt;br /&gt;
net.core.optmem_max = 40960&lt;br /&gt;
net.ipv4.tcp_rmem = 4096 87380 16777216&lt;br /&gt;
net.ipv4.tcp_wmem = 4096 65536 16777216&lt;br /&gt;
net.core.netdev_max_backlog = 50000&lt;br /&gt;
net.ipv4.tcp_max_syn_backlog = 30000&lt;br /&gt;
net.ipv4.tcp_max_tw_buckets = 2000000&lt;br /&gt;
net.ipv4.tcp_tw_reuse = 1&lt;br /&gt;
net.ipv4.tcp_fin_timeout = 10&lt;br /&gt;
net.ipv4.tcp_slow_start_after_idle = 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change what is shown when people login ==&lt;br /&gt;
 $ sudo nano /etc/issue.net&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
===============================================================&lt;br /&gt;
This system is for the use of authorized users only.&lt;br /&gt;
&lt;br /&gt;
Your activity is being monitored. This login attempt and&lt;br /&gt;
your identifying information have been recorded.&lt;br /&gt;
&lt;br /&gt;
Anyone using this system expressly consents to such monitoring&lt;br /&gt;
and is advised that if there is evidence of criminal activity,&lt;br /&gt;
said evidence will be provided to law enforcement officials.&lt;br /&gt;
===============================================================&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Install certbot =&lt;br /&gt;
 $ sudo snap install core; sudo snap refresh core&lt;br /&gt;
 $ sudo snap install --classic certbot&lt;br /&gt;
 $ sudo ln -s /snap/bin/certbot /usr/bin/certbot&lt;br /&gt;
 $ sudo certbot --nginx&lt;br /&gt;
For the email address, enter &amp;#039;&amp;#039;&amp;#039;status@librti.com&amp;#039;&amp;#039;&amp;#039; and follow the prompts. Certbot should make changes to the nginx configuration files and issue the certificates.&lt;br /&gt;
= Install postfix = &lt;br /&gt;
Postfix is required for server level email functionality.&lt;br /&gt;
 $ sudo apt install mailutils postfix&lt;br /&gt;
In the menu that appears, choose &amp;quot;Internet Site&amp;quot;. Select the appropriate FQDN. When done, edit the postfix main.cf. &lt;br /&gt;
 $ sudo nano /etc/postfix/main.cf&lt;br /&gt;
Set the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
inet_interfaces = loopback-only&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Restart postfix&lt;br /&gt;
 $ sudo systemctl restart postfix&lt;br /&gt;
== command line test ==&lt;br /&gt;
 $ echo &amp;quot;This is the body of the email&amp;quot; | mail -s &amp;quot;This is the subject line&amp;quot; your_email_address&lt;br /&gt;
== wordpress mail test ==&lt;br /&gt;
Drop this file into a web enabled directory on the server and run it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// Set $to as the email you want to send the test to.&lt;br /&gt;
$to = &amp;quot;romtim@pm.me&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Email subject and body text.&lt;br /&gt;
$subject = &amp;#039;wp_mail function test&amp;#039;;&lt;br /&gt;
$message = &amp;#039;This is a test of the wp_mail function: wp_mail is working&amp;#039;;&lt;br /&gt;
$headers = &amp;#039;&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
// Load WP components, no themes.&lt;br /&gt;
define(&amp;#039;WP_USE_THEMES&amp;#039;, false);&lt;br /&gt;
require(&amp;#039;wp-load.php&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
// send test message using wp_mail function.&lt;br /&gt;
$sent_message = wp_mail( $to, $subject, $message, $headers );&lt;br /&gt;
&lt;br /&gt;
//display message based on the result.&lt;br /&gt;
if ( $sent_message ) {&lt;br /&gt;
// The message was sent.&lt;br /&gt;
echo &amp;#039;The test message was sent. Check your email inbox.&amp;#039;;&lt;br /&gt;
} else {&lt;br /&gt;
// The message was not sent.&lt;br /&gt;
echo &amp;#039;The message was not sent!&amp;#039;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backups =&lt;br /&gt;
&lt;br /&gt;
Create the backup folder and filesystem.&lt;br /&gt;
 $ sudo mkdir -p /opt/librti/{backups,log,s3,ssl}&lt;br /&gt;
 $ sudo chown -R root:sudo /opt/librti&lt;br /&gt;
 $ sudo chmod -R 775 /opt/librti/&lt;br /&gt;
Generate an ecryption key. Be sure to save it in the password vault for this server.&lt;br /&gt;
 $ cd /opt/librti/ssl&lt;br /&gt;
 $ openssl rand -hex 32 &amp;gt; enc.key&lt;br /&gt;
Change to the s3 directory. &lt;br /&gt;
 $ cd /opt/librti/s3&lt;br /&gt;
Retrieve and save the access and security keys, and bucket names. Be sure to save them in the password vault for this server.&lt;br /&gt;
 $ nano acc.key&lt;br /&gt;
 $ nano bucket&lt;br /&gt;
 $ nano qbucket&lt;br /&gt;
 $ nano sec.key&lt;br /&gt;
Install the s3 client. &lt;br /&gt;
 $ sudo apt-get install s3cmd&lt;br /&gt;
[https://wiki.librtisolutions.com/index.php?title=Backups#Connecting_to_Wasabi_storage  Connect to the Wasabi storage].&lt;br /&gt;
 $ s3cmd --configure&lt;br /&gt;
When done, copy the s3cfg file to root.&lt;br /&gt;
 $ sudo cp ~/.s3cfg /root/&lt;br /&gt;
Configure the backup file list. Replace example.com with the FQDN of the server. Comment out not applicable sections as appropriate.&lt;br /&gt;
 $ sudo nano /opt/librti/filelist.txt&lt;br /&gt;
File: &amp;#039;&amp;#039;&amp;#039;/opt/librti/filelist.txt&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# file list for this server&lt;br /&gt;
&lt;br /&gt;
# system&lt;br /&gt;
/etc/ssh/sshd_config&lt;br /&gt;
/etc/hostname&lt;br /&gt;
/etc/sysctl.conf&lt;br /&gt;
/etc/issue.net&lt;br /&gt;
/etc/hosts&lt;br /&gt;
&lt;br /&gt;
# firewall&lt;br /&gt;
/etc/csf/csf.conf&lt;br /&gt;
/etc/csf/ui/ui.allow&lt;br /&gt;
&lt;br /&gt;
# monitoring&lt;br /&gt;
/etc/netdata/netdata.conf&lt;br /&gt;
&lt;br /&gt;
# nginx&lt;br /&gt;
/etc/nginx&lt;br /&gt;
&lt;br /&gt;
# jitsi&lt;br /&gt;
/etc/systemd/system.conf&lt;br /&gt;
/etc/jitsi/meet/example.com-config.js&lt;br /&gt;
/usr/share/jitsi-meet/interface_config.js&lt;br /&gt;
/usr/bin/jitsicustomizations&lt;br /&gt;
/usr/share/jitsi-meet/css/all.css&lt;br /&gt;
/usr/share/jitsi-meet/libs/app.bundle.min.js&lt;br /&gt;
/etc/prosody/conf.avail/example.com.cfg.lua&lt;br /&gt;
/etc/jitsi/jicofo/jicofo.conf&lt;br /&gt;
&lt;br /&gt;
# mysql &lt;br /&gt;
#/opt/librti/backups/mysql.sql.gz&lt;br /&gt;
&lt;br /&gt;
# nextcloud&lt;br /&gt;
/var/www/nextcloud/config&lt;br /&gt;
/var/www/nextcloud/data&lt;br /&gt;
&lt;br /&gt;
# php&lt;br /&gt;
/etc/php&lt;br /&gt;
&lt;br /&gt;
# certificates&lt;br /&gt;
/etc/letsencrypt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If using mysql, configure the mysqlbackup file. &lt;br /&gt;
 $ sudo nano /opt/librti/backupmysql&lt;br /&gt;
File: &amp;#039;&amp;#039;&amp;#039;/opt/librti/backupmysql&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
datum=`/bin/date +%Y%m%d-%H`&lt;br /&gt;
ENCRYPTIONKEY=`cat /opt/librti/ssl/enc.key`&lt;br /&gt;
/usr/bin/mysqldump --user=root --lock-all-tables --all-databases | \&lt;br /&gt;
gzip -9 - | \&lt;br /&gt;
gpg -c --batch --yes -z 0 --cipher-algo AES256 -o /opt/librti/backups/$HOSTNAME-${datum}.sql.librti --passphrase-fd 9s 9&amp;lt; &amp;lt;(printf &amp;#039;%s&amp;#039; &amp;quot;$ENCRYPTIONKEY&amp;quot;) -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 $ sudo chmod +x /opt/librti/backupmysql&lt;br /&gt;
Configure the script that deleted files older than X days from the S3 storage.&lt;br /&gt;
 $ sudo nano /opt/librti/deleteOldS3&lt;br /&gt;
File: &amp;#039;&amp;#039;&amp;#039;/opt/librti/deleteOldS3&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# Usage: ./deleteOld &amp;quot;bucketname&amp;quot; &amp;quot;30 days&amp;quot;&lt;br /&gt;
&lt;br /&gt;
s3cmd ls s3://$1 | while read -r line;&lt;br /&gt;
  do&lt;br /&gt;
    createDate=`echo $line|awk {&amp;#039;print $1&amp;quot; &amp;quot;$2&amp;#039;}`&lt;br /&gt;
    createDate=`date -d&amp;quot;$createDate&amp;quot; +%s`&lt;br /&gt;
    olderThan=`date -d&amp;quot;-$2&amp;quot; +%s`&lt;br /&gt;
    if [[ $createDate -lt $olderThan ]]&lt;br /&gt;
      then &lt;br /&gt;
        fileName=`echo $line|awk {&amp;#039;print $4&amp;#039;}`&lt;br /&gt;
        echo $fileName&lt;br /&gt;
        if [[ $fileName != &amp;quot;&amp;quot; ]]&lt;br /&gt;
          then&lt;br /&gt;
            s3cmd del &amp;quot;$fileName&amp;quot;&lt;br /&gt;
        fi&lt;br /&gt;
    fi&lt;br /&gt;
  done;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make the file executable&lt;br /&gt;
 $ sudo chmod +x /opt/librti/deleteOldS3&lt;br /&gt;
Configure the master backup file. Comment out sections as appropriate based on the server role.&lt;br /&gt;
 $ sudo nano /opt/librti/librtibackup&lt;br /&gt;
File: &amp;#039;&amp;#039;&amp;#039;/opt/librti/librtibackup&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# variables&lt;br /&gt;
datum=`/bin/date +%Y%m%d-%H`&lt;br /&gt;
ENCRYPTIONKEY=`cat /opt/librti/ssl/enc.key`&lt;br /&gt;
s3bucket=`cat /opt/librti/s3/bucket`&lt;br /&gt;
&lt;br /&gt;
# back up, compress and encrypt mysql&lt;br /&gt;
/usr/bin/mysqldump --user=root --lock-all-tables --all-databases | \&lt;br /&gt;
gzip -9 - | \&lt;br /&gt;
gpg -c --batch --yes -z 0 --cipher-algo AES256 -o /opt/librti/backups/$HOSTNAME-${datum}.sql.librti --passphrase-fd 9s 9&amp;lt; &amp;lt;(printf &amp;#039;%s&amp;#039; &amp;quot;$ENCRYPTIONKEY&amp;quot;) -&lt;br /&gt;
&lt;br /&gt;
# back up, compress and encrypt file list&lt;br /&gt;
tar czvpf - --exclude=&amp;#039;^#&amp;#039; --verbatim-files-from -T /opt/librti/filelist.txt | \&lt;br /&gt;
gpg -c --batch --yes -z 0 --cipher-algo AES256 -o /opt/librti/backups/$HOSTNAME-${datum}.librti --passphrase-fd 9s 9&amp;lt; &amp;lt;(printf &amp;#039;%s&amp;#039; &amp;quot;$ENCRYPTIONKEY&amp;quot;) -&lt;br /&gt;
&lt;br /&gt;
# remove backup files older than 30 days&lt;br /&gt;
find /opt/librti/backups/* -mtime +30 -exec rm {} \;&lt;br /&gt;
&lt;br /&gt;
# do the same from the s3 storage older than 60 days&lt;br /&gt;
bash /opt/librti/deleteOldS3 &amp;quot;$s3bucket&amp;quot; &amp;quot;60 days&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# shuttle the files to s3 storage&lt;br /&gt;
s3cmd sync --acl-private --recursive --skip-existing --multipart-chunk-size-mb=256 /opt/librti/backups/ s3://$s3bucket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make the file executable&lt;br /&gt;
 $ sudo chmod +x /opt/librti/librtibackup&lt;br /&gt;
Create a cron job to run the backups. General backups can run weekly. Websites can be backed up more frequently, etc.&lt;br /&gt;
 $ sudo crontab -e&lt;br /&gt;
Syntax to run at 8:30 PM Tuesdays (right before maintenance window):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0 20 * * 2 /opt/librti/librtibackup &amp;gt;&amp;gt; /opt/librti/log/librti.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
During the next maintenance window, check and confirm that the backup &lt;br /&gt;
* generated a logfile&lt;br /&gt;
* created encrypted backup files in /opt/librti/backups&lt;br /&gt;
* shuttled those files to the s3 storage&lt;br /&gt;
* you can download the backups locally and decrypt them&lt;br /&gt;
&lt;br /&gt;
Configure the quarterly backup file. &lt;br /&gt;
 $ sudo nano /opt/librti/quarterlybackup&lt;br /&gt;
File: &amp;#039;&amp;#039;&amp;#039;/opt/librti/quarterlybackup&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# variables&lt;br /&gt;
datum=`/bin/date +%Y%m%d-%H`&lt;br /&gt;
ENCRYPTIONKEY=`cat /opt/librti/ssl/enc.key`&lt;br /&gt;
s3bucket=`cat /opt/librti/s3/qbucket`&lt;br /&gt;
&lt;br /&gt;
# back up, compress and encrypt mysql&lt;br /&gt;
/usr/bin/mysqldump --user=root --lock-all-tables --all-databases | \&lt;br /&gt;
gzip -9 - | \&lt;br /&gt;
gpg -c --batch --yes -z 0 --cipher-algo AES256 -o /opt/librti/backups/$HOSTNAME-${datum}.sql.librti --passphrase-fd 9s 9&amp;lt; &amp;lt;(printf &amp;#039;%s&amp;#039; &amp;quot;$ENCRYPTIONKEY&amp;quot;) -&lt;br /&gt;
&lt;br /&gt;
# back up, compress and encrypt file list&lt;br /&gt;
tar czvpf - --exclude=&amp;#039;^#&amp;#039; --verbatim-files-from -T /opt/librti/filelist.txt | \&lt;br /&gt;
gpg -c --batch --yes -z 0 --cipher-algo AES256 -o /opt/librti/backups/$HOSTNAME-${datum}.librti --passphrase-fd 9s 9&amp;lt; &amp;lt;(printf &amp;#039;%s&amp;#039; &amp;quot;$ENCRYPTIONKEY&amp;quot;) -&lt;br /&gt;
&lt;br /&gt;
# shuttle the files to s3 storage&lt;br /&gt;
s3cmd sync --acl-private --multipart-chunk-size-mb=256 /opt/librti/backups/$HOSTNAME-${datum}*.librti s3://$s3bucket&lt;br /&gt;
&lt;br /&gt;
# remove the backup files created&lt;br /&gt;
rm /opt/librti/backups/$HOSTNAME-${datum}.sql.librti /opt/librti/backups/$HOSTNAME-${datum}.librti&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make the file executable&lt;br /&gt;
 $ sudo chmod +x /opt/librti/quarterlybackup&lt;br /&gt;
Create a cron job to run the quarterly backups. &lt;br /&gt;
 $ sudo crontab -e&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
50 20 15 */3 * /opt/librti/quarterlybackup &amp;gt;&amp;gt; /opt/librti/log/librti.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Optional: database only backups (webservers only) ==&lt;br /&gt;
Create the backup folder.&lt;br /&gt;
 $ sudo mkdir -p /opt/librti/dbbackups&lt;br /&gt;
File: &amp;#039;&amp;#039;&amp;#039;/opt/librti/librtibackup-dbonly&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 $ sudo nano /opt/librti/librtibackup-dbonly&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# variables&lt;br /&gt;
datum=`/bin/date +%Y%m%d-%H`&lt;br /&gt;
ENCRYPTIONKEY=`cat /opt/librti/ssl/enc.key`&lt;br /&gt;
s3bucket=`cat /opt/librti/s3/bucket`&lt;br /&gt;
&lt;br /&gt;
# back up, compress and encrypt mysql&lt;br /&gt;
/usr/bin/mysqldump --user=root --lock-all-tables --all-databases | \&lt;br /&gt;
gzip -9 - | \&lt;br /&gt;
gpg -c --batch --yes -z 0 --cipher-algo AES256 -o /opt/librti/dbbackups/$HOSTNAME-${datum}.sql.librti --passphrase-fd 9s 9&amp;lt; &amp;lt;(printf &amp;#039;%s&amp;#039; &amp;quot;$ENCRYPTIONKEY&amp;quot;) -&lt;br /&gt;
&lt;br /&gt;
# remove backup files older than 30 days&lt;br /&gt;
find /opt/librti/dbbackups/* -mtime +30 -exec rm {} \;&lt;br /&gt;
&lt;br /&gt;
# todo: remove files on the s3 older than 30 days&lt;br /&gt;
&lt;br /&gt;
# shuttle the files to s3 storage&lt;br /&gt;
s3cmd sync --acl-private --recursive --skip-existing --multipart-chunk-size-mb=256 /opt/librti/dbbackups/ s3://$s3bucket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Set the file as executable.&lt;br /&gt;
 $ sudo chmod +x /opt/librti/librtibackup-dbonly&lt;br /&gt;
Configure the cron. Modify the filesystem backup to once a week as required.&lt;br /&gt;
 $ sudo crontab -e&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
21 17 * * 2 /opt/librti/librtibackup &amp;gt;&amp;gt; /opt/librti/log/librti.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
21 17 * * 1,3,4,5,6,7 /opt/librti/librtibackup-dbonly &amp;gt;&amp;gt; /opt/librti/log/librti.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Revisit == &lt;br /&gt;
&lt;br /&gt;
Get csf webmin up and running with remote&lt;/div&gt;</summary>
		<author><name>Gr0x0rd</name></author>
	</entry>
</feed>