Add noatime and noadirtime to server-setup guide

master
Nathan Steel 4 years ago
parent 362a28cdd3
commit 0beee06ef2

@ -160,6 +160,15 @@ alias ipe="curl ifconfig.co"</code></pre>
<pre><code>export PS1="\[\e[01;33m\]\u\[\e[0m\]\[\e[00;37m\]@\[\e[0m\]\[\e[01;36m\]\h\[\e[0m\]\[\e[00;37m\] \t \[\e[0m\]\[\e[01;35m\]\w\[\e[0m\]\[\e[01;37m\] \[\e[0m\]\n$ "</code></pre>
<p>If you want to customise your terminal, you can do so with <a href="https://bashrcgenerator.com/" target="_blank" rel="noopener">.bashrc PS1 generator</a>.
<h2>Reads shouldn't write!</h2>
<p>Another personal opinion, and change is to enable noatime, and nodiratime. Be careful with this change! And ignore if you followed my Debian install guide, as they're already enabled.</p>
<p>Basically without these, when a file is opened (read) on your filesystem, a write is invoked to update the time it was opened, which causes unwanted writes, and CPU cycles.</p>
<p>Open your fstab file</p>
<pre><code>sudo vim /etc/fstab</code></pre>
<p>And edit your mounted drive(s) to include these flags</p>
<pre><code>UUID=&lt;YOUR-UUID&gt; / ext4 noatime,nodiratime 0 1</code></pre>
<p>The above uses an example, make your EXISTING lines look kinda like the above. Essentially just adding <strong>noatime, nodiratime</strong></p>
<h2>Server maintance notes</h2>
<p>Keep the server up-to date as much as possible</p>
<p>Only install things that you need. If this is a server for learning, half ignore this, but for production servers only install services, and make changes that are required.</p>

Loading…
Cancel
Save