Copy of my TYPST LXC Alpine Guide #3
TrevorSmale
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
#set page(paper: "a4", margin: (x:2cm, y:2cm))
#set text(font: "arial", size: 10pt)
#set page(footer: context [
Trevor Smale Alpine Linux LXC Guide v0.3b | Dec 14th 2024
#h(0.5fr)
Page
#counter(page).display(
"1 of 1",
both: true,
)
])
// Logo
#align(center)[
#image("img/alpine_logo.svg", width: 80pt)
]
#v(-20pt)
// Title
#align(center)[
#text(size: 28pt,)[Alpine Linux]
]
#v(-25pt)
// Subtitle
#align(center)[
#text(size: 17pt,)[LXC Setup]
]
#v(-12pt)
// Subtitle
#align(center)[
#text(size: 10pt,)[Version 0.2 alpha by: Trevor Smale]
]
#v(-5pt)
// Subtitle
#align(center)[
#text(size: 10pt,)[Nov 4th 2024]
]
#align(center)[
#line(length: 60%, stroke: luma(80%))
]
// Intro
// Subtitle
#align(center)[
#text(size: 14pt,)[Overview]
]
Intro\
LXC Containers are minimal, low resource environments much like Docker or Podman containers that can be run in ProxMox. This is a guide for proxmox users to create a container for practicing for the RHCSA & RHCE with low stakes machines that can be created and destroyed from templates.\
🪶 LXC\
LXC containers are lighter and faster than virtual machines (VMs) because they share the host’s kernel and resources, avoiding the overhead of running a separate operating system for each instance. This allows containers to use less memory and CPU compared to VMs, which need to emulate full hardware environments through hypervisors.\
🏔️ Alpine\
Alpine Linux is a lightweight, security-focused Linux distribution designed for efficiency and simplicity, commonly used in containerized environments due to its minimal resource footprint.
🧐 In this Guide\
We will go through the following procedures:
🔍 Pre-Requisites\
⚙️ Recommended Container Specs\
#pagebreak()
// Subtitle
#align(center)[
#text(size: 14pt,)[⚙️ Configuration Procedure]
]
#line(length: 100%, stroke: rgb(38, 166, 153,))
*🧑🍳 Add user and make them Super🦄 *\
apk add sudo'\adduser 'username' wheel\visudoChanges to sudoers file by adding a line above or below the root user privileges. This can be found near bottom add user below root and give same privs\
'username' ALL=(ALL) ALL\su 'username'\sudopowerssudo apk update👍\#line(length: 100%, stroke: rgb(38, 166, 153,))
☎️ Install and Configure SSH 🔧\
Adding SSH involves several steps that must be done correctly in order for things to work properly\
apk update\apk add openssh\rc-update add sshd\vi /etc/ssh/sshd_config\These are the settings we must modify using vi. We do this by first un-commenting the line by removing the # mark, then altering the text. You will find these lines sequentially from top to bottom:\
Fields in the sshd_config file that need to be altered:
Write changes and Quit vi (esc :wq)
Restart sshd service:\
service sshd start#pagebreak()
// Subtitle
#align(center)[
#text(size: 14pt,)[* Download and install packages*]
]
#line(length: 100%, stroke: rgb(38, 166, 153,))
apk updateapk add go git shadow gcc musl-dev ansible tree fping arp-scan pwgen bash-completion logrotate iperf3 atop psmisc tmux net-tools wget nmap bind-tools sysstat iotop tcpdump strace lsof ncdu iftop htop curl vim ca-certificates rsync tar unzip sudo iptables bash libc6-compat podman// Subtitle
#align(center)[
#text(size: 14pt,)[© Template Conversion]
]
#line(length: 100%, stroke: rgb(38, 166, 153,))
#linebreak()
#pagebreak()
// Subtitle
#align(center)[
#text(size: 14pt,)[📦 Full APK Package List]
]
#set text(font: "arial", size: 9pt)
#table(
align: left,
stroke: (0.1pt),
columns: (auto, 1fr),
table.header(
[Package Name],
[Description],
),
[ansible], [Automation tool for configuration management tasks],
[arp-scan], [Scans IP addresses via ARP protocol],
[atop], [Performance monitoring tool for system processes],
[bash], [Essential command-line shell for Linux],
[bash-completion], [Autocompletion functionality for bash commands],
[bind-tools], [DNS query tools (e.g., dig)],
[ca-certificates], [SSL certificate authority files for security],
[curl], [Transfers data from URLs using commands],
[fping], [Ping multiple hosts over IP network],
[gcc], [GNU C Compiler for building software],
[git], [Distributed version control system for code],
[htop], [Interactive process viewer for system monitoring],
[iftop], [Real-time network bandwidth usage monitor],
[iperf3], [Measures network performance and bandwidth usage],
[iptables], [Command-line firewall utility for packet filtering],
[iotop], [Monitors disk I/O usage in real-time],
[libc6-compat], [Compatibility libraries for glibc on musl],
[logrotate], [Automatically rotates and compresses system logs],
[lsof], [Lists open files and associated processes],
[musl-dev], [Musl development libraries for C programming],
[ncdu], [Disk usage analyzer with text interface],
[net-tools], [Legacy networking tools (e.g., ifconfig)],
[nmap], [Network scanner and mapper for security],
[podman], [Manages Linux containers without needing Docker],
[psmisc], [Utilities like killall, fuser, and more],
[pwgen], [Generates random passwords from command-line tool],
[rsync], [File copying and synchronization tool for networks],
[shadow], [Manages encrypted user account passwords securely],
[strace], [Traces system calls and signals for debugging],
[sudo], [Executes commands as root or superuser],
[sysstat], [Performance monitoring tools for CPU, disk, memory],
[tar], [Archiving utility for file compression and packaging],
[tcpdump], [Analyzes and captures network traffic packets],
[tmux], [Terminal multiplexer for managing multiple sessions],
[tree], [Displays directories and files in tree format],
[unzip], [Extracts files from ZIP format archives],
[vim], [Powerful, customizable text editor for developers],
[wget], [Command-line downloader for HTTP/FTP protocols],
)
Beta Was this translation helpful? Give feedback.
All reactions