dp-salad-docs/.vitepress/dist/assets/install_dp-setup.md.Bx00pjFf.js
2025-01-04 22:46:09 -07:00

12 lines
19 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as i,c as a,a3 as e,o as t}from"./chunks/framework.DtMx7FFi.js";const c=JSON.parse('{"title":"DP-Salad Setup","description":"","frontmatter":{"title":"DP-Salad Setup"},"headers":[],"relativePath":"install/dp-setup.md","filePath":"install/dp-setup.md"}'),n={name:"install/dp-setup.md"};function l(h,s,p,o,d,r){return t(),a("div",null,s[0]||(s[0]=[e(`<h1 id="dp-setup" tabindex="-1">DP-Setup <a class="header-anchor" href="#dp-setup" aria-label="Permalink to &quot;DP-Setup&quot;">​</a></h1><p>This guide demonstrates the installing of the DP-Salad stack:</p><h2 id="debian-12-setup" tabindex="-1">Debian 12 Setup <span class="i-logos-debian"></span> <a class="header-anchor" href="#debian-12-setup" aria-label="Permalink to &quot;Debian 12 Setup :logos-debian:&quot;">​</a></h2><p>Visit <a href="https://debian.org/download" target="_blank" rel="noreferrer">Debian&#39;s download page</a> to get the latest version of Debian, as of this writing, Debian 12.5.0 is the latest. This is a <em>netinst</em>, meaning that it will require an internet connection to download the OS files.</p><p>Load your Debian ISO onto a USB stick, either directly, or using Rufus/Balena Etcher to write the ISO to stick.</p><p>Plug it into whatever is becoming your server, and boot to the USB stick in your system&#39;s BIOS.</p><p>Install Debian using the ISO. Make sure that you are connected to the internet before trying to install Debian.</p><ol><li>Select Graphical Installer</li><li>Follow the setup process up until hostname, and put in something that you will recognize when port-forwarding or tunneling.</li><li>Put in the domain name that you have leased as your domain name, like: &quot;<em>example.com</em>&quot;</li><li>Setup a root password. (Template uses DPSALADSTACK)</li><li>Setup the name for the first non-admin user. (Template uses dpsalad)</li><li>Setup a password for the non-admin user. (Template uses DPSALADSTACKUSER)</li><li>Continue the setup, and select &quot;Guided - use entire disk&quot; when Partitioning Disk, continue and use &quot;All files in one partition&quot; as the partitioning scheme.</li><li>Allow changes to be written to disk.</li><li>Continue with the installer until Software Selection. See the following points for the selections. <ul><li>Debian desktop environment (keep selected)</li><li>GNOME (deselect)</li><li>xfce (select)</li><li>SSH server (select)</li><li>standard system utilities (keep selected)</li></ul></li><li>Continue with the installer until the reboot.</li><li>Once the reboot is complete, you should have a fully working Debian system!</li><li>If you used the template, please change the password of both the root and regular user using passwd.</li></ol><h2 id="sudo-no-worky" tabindex="-1">Sudo no worky <span class="i-twemoji-man-facepalming"></span> <a class="header-anchor" href="#sudo-no-worky" aria-label="Permalink to &quot;Sudo no worky :man-facepalming:&quot;">​</a></h2><p>Debian had you set up a root password, but when you try using sudo, it will not let you do anything. Debian by default does not let the first user have sudo access. See why here: <a href="https://wiki.debian.org/sudo#:~:text=Why%20sudo%3F,root.%20Some%20reasons" target="_blank" rel="noreferrer">Reason</a>. You will have to temporarily log in as root to fix this. Use the following commands/instructions to add your user to the sudoers file.</p><div class="language-markdown vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">markdown</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">1.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> su -</span></span>
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">2.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> nano /etc/sudoers</span></span>
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">3.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Add the following to the file(no quotes): &quot;username ALL=(ALL:ALL) ALL&quot;</span></span>
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">4.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Exit nano using Ctrl+X and then type &#39;Y&#39; and enter.</span></span>
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">5.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Restart your PC.</span></span>
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">6.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> systemctl reboot</span></span></code></pre></div><p>Once your machine restarts, you should now be able to use the sudo command.</p><h2 id="disabling-gui" tabindex="-1">Disabling GUI <span class="i-twemoji-desktop-computer"></span> <a class="header-anchor" href="#disabling-gui" aria-label="Permalink to &quot;Disabling GUI :desktop-computer:&quot;">​</a></h2><p>If you&#39;d like to disable the GUI and work in CLI only (highly recommended, as GUI uses more resources), follow these instructions:</p><div class="language-markdown vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">markdown</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">1.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> sudo systemctl set-default multi-user.target</span></span>
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">2.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> sudo reboot</span></span></code></pre></div><h2 id="updating-your-system" tabindex="-1">Updating your system <span class="i-mdi-monitor"></span> <a class="header-anchor" href="#updating-your-system" aria-label="Permalink to &quot;Updating your system :mdi-monitor:&quot;">​</a></h2><p>Now time to run updates, just to guarantee the system is up-to-date. Debian uses <em>APT</em> as it&#39;s package manager of choice. Run these commands:</p><div class="language-markdown vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">markdown</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">1.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> sudo apt-get update</span></span>
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">2.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> sudo apt-get upgrade</span></span></code></pre></div><p>And now, your system is up-to-date!</p><h2 id="installing-the-docker" tabindex="-1">Installing the Docker <span class="i-logos-docker-icon"></span> <a class="header-anchor" href="#installing-the-docker" aria-label="Permalink to &quot;Installing the Docker :logos-docker-icon:&quot;">​</a></h2><p>Next, install Docker. Follow the following instructions to install Docker:</p><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> apt-get</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> update</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> apt-get</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ca-certificates</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gnupg</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -m</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 755</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /etc/apt/keyrings</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -fsSL</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://download.docker.com/linux/debian/gpg</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gpg</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dearmor</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /etc/apt/keyrings/docker.gpg</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> a+r</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /etc/apt/keyrings/docker.gpg</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;deb [arch=$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">dpkg</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --print-architecture</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> $(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">.</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /etc/os-release &amp;&amp; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$VERSION_CODENAME</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;) stable&quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tee</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /etc/apt/sources.list.d/docker.list</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /dev/null</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> apt-get</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> update</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> apt-get</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker-ce</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker-ce-cli</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> containerd.io</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker-buildx-plugin</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dockercompose-plugin</span></span></code></pre></div><p>Once this is done, you are able to move on to the next section of this guide</p><div class="danger custom-block"><p class="custom-block-title">DANGER</p><p>If you use anything other than the <em>netinst</em> for Debian, your apt sources may be invalid. Should this be the case, there is an example of the sources needed in <code>/usr/share/doc/apt/examples/sources.list</code>. Use the following command to copy this list of default sources to restore apt to working order. <code>sudo cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list</code></p></div><h2 id="portainer-ce-setup" tabindex="-1">Portainer CE Setup <span class="i-simple-icons-portainer"></span> <a class="header-anchor" href="#portainer-ce-setup" aria-label="Permalink to &quot;Portainer CE Setup :simple-icons-portainer:&quot;">​</a></h2><p>Time to setup Portainer, which is installed using Docker. Follow the below instructions to install Portainer onto your machine.</p><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> volume</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> create</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> portainer_data</span></span></code></pre></div><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 8000:8000</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 9443:9443</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --name</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> portainer</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --restart=always</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -v</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /var/run/docker.sock:/var/run/docker.sock</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -v</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> portainer_data:/data</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> portainer/portainer-ce:latest</span></span></code></pre></div><ul><li><p>Visit https://[ip-address]:9443 to log into Portainer CE.</p></li><li><p>Change the admin username if you wish. (Don&#39;t forget it if you change it though!) [Template uses DPSALADSTACK]</p></li><li><p>Use a good secure password (12+ characters) for the administrator password. (Don&#39;t forget this either!)</p></li><li><p>Click &quot;<em>Getting Started</em>&quot; to finish setting up Portainer CE.</p></li><li><p>If you are going to use the one-click Compose Install, make sure to create a network using the following command:</p></li></ul><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> network</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> create</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [INSERT </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">NETWORK</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> NAME</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> HERE]</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>Make sure to remove the square brackets around the network name.</p></div><h2 id="some-changes-need-to-be-made" tabindex="-1">Some changes need to be made <span class="i-twemoji-wrench"></span> <a class="header-anchor" href="#some-changes-need-to-be-made" aria-label="Permalink to &quot;Some changes need to be made :wrench:&quot;">​</a></h2><p>Do note that some changes need to be made before the stack installation is finished. These two commands need to be ran to make sure Redis can be deployed for the stack to function correctly.</p><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mkdir</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /home/[USER]/appdata/redis/redis/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mkdir</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /home/[USER]/appdata/redis/redis/data/</span></span></code></pre></div><p>That&#39;s it! You have successfully installed Debian and Portainer! <span class="i-twemoji-party-popper"></span></p>`,42)]))}const g=i(n,[["render",l]]);export{c as __pageData,g as default};