ABDURROZAK
HOME ABOUT ME MICROSITE KONTAK PERSEMBAHAN HELP
ABDURROZAK.MY.ID // DEBIAN LINUX SERVER FUNDAMENTAL

MEMULAI PERJALANANDENGAN DEBIAN

Volume 01 dari seri Debian Linux Server Fundamental. Panduan komprehensif untuk pemula yang ingin membangun server Linux dari nol. Setiap command dan script dilengkapi penjelasan detail per parameter, contoh output, dan use case nyata. Dari mengenal Linux hingga persiapan install Debian Server.

VOLUME01 / 17
SUB-BAB11
BACA90 MENIT
OSDebian 12
ABDUR ROZAK, S.Kom. Web Developer & System Administrator - abdurrozak.my.id
VOLUME 01 / 17

MENGKENAL DEBIAN LINUX SERVER

Fondasi semua perjalanan Linux Server. Memahami apa itu Linux, sejarah Debian, perbedaan desktop vs server, struktur sistem, terminal, command line, hingga persiapan hardware dan software untuk membangun server Debian dari nol.
SUB-BAB11 LEVELFondasi WAKTU90 MENIT
01
SUB-BAB 01 FUNDAMENTAL

LINUX & SERVER OS

Apa Itu Linux?

Linux adalah sistem operasi open-source yang dibangun di atas kernel Linux yang diciptakan oleh Linus Torvalds pada tahun 1991. Linux merupakan turunan dari UNIX dan mengikuti filosofi "do one thing and do it well". Saat ini, Linux menjalankan 96.3% server di dunia, 100% superkomputer tercepat, dan miliaran perangkat Android.

KUNCI: Yang disebut "Linux" sebenarnya adalah kernel. Sistem operasi lengkap (Linux + GNU tools + aplikasi) sering disebut GNU/Linux. Tapi untuk kesederhanaan, kita tetap pakai istilah "Linux".

Apa Itu Server OS?

Server Operating System adalah sistem operasi yang dirancang khusus untuk menjalankan layanan (service) bagi client. Berbeda dengan desktop OS yang fokus pada GUI dan aplikasi user, server OS dioptimalkan untuk:

PERFORMA
Optimized untuk throughput tinggi dan latency rendah
KEAMANAN
Hardened by default, minimal attack surface
STABILITAS
Uptime tinggi, jarang perlu reboot
RINGAN
Tanpa GUI, resource minimal
AUTOMATISASI
CLI-first, mudah di-automate
SCALABLE
Bisa handle ribuan koneksi

Contoh Server OS Populer

SERVER OSKELUARGAPACKAGE MANAGERUSE CASE
DebianDebianAPT (apt, dpkg)Stabilitas maksimal, server production
Ubuntu ServerDebianAPTCloud, enterprise, user-friendly
RHELRed HatRPM (dnf)Enterprise berbayar, support resmi
Rocky LinuxRed HatRPM (dnf)Alternatif RHEL gratis
Fedora ServerRed HatRPM (dnf)Technology preview
AlmaLinuxRed HatRPM (dnf)Alternatif RHEL gratis
Arch LinuxArchpacmanRolling release, advanced
AlpineIndependentapkContainer, embedded, ultra-ringan

Mengapa Debian untuk Server?

STABIL
Release cycle 2 tahun, testing ketat. Debian Stable adalah salah satu OS paling stabil di dunia.
AMAN
Tim security responsif, update keamanan cepat, default configuration aman.
PAKET LENGKAP
60,000+ package di repository resmi. Hampir semua software tersedia.
RINGAN
Bisa jalan di RAM 256MB. Minimal resource usage, cocok untuk VPS kecil.
KOMUNITAS BESAR
Dokumentasi lengkap, forum aktif, ribuan tutorial online.
100% GRATIS
Tidak ada biaya lisensi. Cocok untuk budget terbatas.
KOMPETENSI SUB-BAB 01
  • Memahami apa itu Linux dan Server OS
  • Mengenal berbagai server OS populer
  • Menjelaskan mengapa Debian cocok untuk server
02
SUB-BAB 02 FUNDAMENTAL

SEJARAH & KONSEP DEBIAN

Sejarah Debian

Debian didirikan oleh Ian Murdock pada tanggal 16 Agustus 1993. Nama "Debian" berasal dari nama depannya Debra (mantan istrinya) dan namanya sendiri Ian. Debian adalah salah satu distro Linux tertua yang masih aktif dikembangkan.

1993 - Awal Mula
Ian Murdock mengumumkan proyek Debian di mailing list comp.os.linux
16 AGUSTUS 1993
1996 - Debian 1.1 (Buzz)
Release pertama dengan nama kode karakter Toy Story
JUNI 1996
2013 - Debian 7 (Wheezy)
Dukungan multi-architecture, systemd sebagai init system
MEI 2013
2023 - Debian 12 (Bookworm)
Release stable terbaru saat ini, kernel 6.1 LTS
JUNI 2023
2025 - Debian 13 (Trixie)
Next stable release, kernel 6.12 LTS
2025

Debian Social Contract

Debian memiliki Social Contract yang menjadi komitmen terhadap komunitas:

100% FREE SOFTWARE
Debian hanya menggunakan software bebas (free software) di main repository
KOMUNITAS DEMOKRATIS
Keputusan diambil bersama oleh developer melalui voting
TRANSPARANSI BUG
Semua bug didokumentasikan dan publik
PRIORITAS USER
Kepentingan user dan komunitas di atas kepentingan individu

Debian Release Branches

BRANCHSTATUSUPDATEUSE CASE
StableProduction-readySecurity & critical bug fixes onlyServer production
TestingCalon stable berikutnyaRegular updatesPre-production testing
Unstable (Sid)Rolling developmentDaily updatesDeveloper, testing
ExperimentalBleeding edgeVery frequentPackage development
UNTUK SERVER: Selalu gunakan Debian Stable. Testing dan Unstable tidak disarankan untuk production karena bisa break sewaktu-waktu. Debian 12 "Bookworm" adalah stable saat ini.

Distro Turunan Debian

Debian adalah "induk" dari banyak distro populer:

DISTROBASEFOKUS
UbuntuDebianUser-friendly, desktop & server
Linux MintUbuntu/DebianDesktop user-friendly
Kali LinuxDebianSecurity testing, penetration testing
Parrot OSDebianSecurity & privacy
Raspberry Pi OSDebianRaspberry Pi single-board computer
Pop!_OSUbuntuDeveloper & gaming
KOMPETENSI SUB-BAB 02
  • Memahami sejarah Debian
  • Mengenal Debian Social Contract
  • Membedakan Stable, Testing, Unstable
  • Mengenal distro turunan Debian
03
SUB-BAB 03 FUNDAMENTAL

DESKTOP vs SERVER

Perbedaan Utama

ASPEKDESKTOPSERVER
InterfaceGUI (GNOME, KDE, XFCE)CLI (Command Line)
ResourceRAM 4GB+, CPU multi-coreBisa jalan di RAM 256MB
SoftwareLibreOffice, browser, media playerApache, MySQL, SSH, DNS
KernelDesktop-optimizedServer-optimized
UpdateFrequent, feature updatesStable, security only
UserSingle user, interactiveMulti-user, headless
UptimeReboot seringBertahun-tahun tanpa reboot
PowerAC power, batteryRedundant PSU, UPS
NetworkSingle NIC, dynamic IPMulti-NIC, static IP

Hardware Requirements

KOMPONENMINIMUMRECOMMENDED
CPU1 GHz2+ cores, 2+ GHz
RAM512 MB2+ GB
Storage2 GB20+ GB SSD
Network1 NIC2+ NIC (redundancy)
TIPS: Untuk belajar, kamu bisa install Debian Server di VirtualBox/VMware dengan RAM 1GB dan storage 10GB sudah cukup. Tidak perlu hardware fisik!
KOMPETENSI SUB-BAB 03
  • Membedakan desktop vs server Linux
  • Memahami hardware requirements
  • Menentukan use case yang tepat
04
SUB-BAB 04 FUNDAMENTAL

STRUKTUR DASAR SISTEM LINUX

Arsitektur Linux

Sistem Linux terdiri dari beberapa layer yang bekerja sama:

LAYERKOMPONENFUNGSI
HardwareCPU, RAM, Disk, NICPhysical resources
KernelLinux KernelJembatan hardware-software, process management, memory, device driver
ShellBash, Zsh, FishCommand interpreter, user interface CLI
System Librariesglibc, coreutilsFungsi standar untuk aplikasi
ApplicationsApache, MySQL, NginxSoftware yang menjalankan tugas spesifik
Desktop EnvironmentGNOME, KDE (opsional)GUI untuk desktop (server biasanya tanpa GUI)

Filesystem Hierarchy Standard (FHS)

FHS adalah standar struktur direktori di Linux. Semua distro mengikuti standar ini agar konsisten.

DIRECTORYFUNGSICONTOH ISI
/Root directory (puncak hierarki)Semua directory lain ada di sini
/binBinary esensial (user commands)ls, cp, mv, bash
/sbinBinary esensial (system admin)fdisk, iptables, reboot
/etcConfiguration files/etc/passwd, /etc/fstab, /etc/hosts
/homeHome directory user biasa/home/admin, /home/user1
/rootHome directory rootKhusus root user
/varVariable data (berubah-ubah)/var/log, /var/www, /var/spool
/tmpTemporary files (dihapus saat reboot)File sementara aplikasi
/usrUser programs & data/usr/bin, /usr/lib, /usr/share
/optOptional/third-party softwareSoftware tambahan
/devDevice files/dev/sda, /dev/tty, /dev/null
/procVirtual filesystem (process info)/proc/cpuinfo, /proc/meminfo
/sysVirtual filesystem (hardware info)/sys/class, /sys/block
/bootBoot loader filesvmlinuz, initrd, grub
/libShared librariesLibrary untuk /bin dan /sbin
/mntMount point temporaryMount manual filesystem
/mediaMount point removable mediaUSB, CD-ROM auto-mount
/srvService data/srv/ftp, /srv/www

Cek Struktur Sistem

BASH
# Lihat struktur direktori root ls -l / ↳ -l = long format (detail: permission, owner, size, date) # total 68 # drwxr-xr-x 2 root root 4096 Jan 15 10:30 bin # drwxr-xr-x 3 root root 4096 Jan 15 10:30 boot # drwxr-xr-x 17 root root 3900 Jan 15 10:30 dev # drwxr-xr-x 120 root root 12288 Jan 15 12:00 etc # drwxr-xr-x 4 root root 4096 Jan 15 10:30 home # Lihat versi kernel uname -r ↳ -r = release, menampilkan versi kernel # 6.1.0-18-amd64 # Lihat semua info sistem uname -a ↳ -a = all, menampilkan kernel name, nodename, release, version, machine # Linux debian-server 6.1.0-18-amd64 #1 SMP ... x86_64 GNU/Linux # Lihat info distribusi lsb_release -a ↳ Menampilkan info versi Debian # Distributor ID: Debian # Description: Debian GNU/Linux 12 (bookworm) # Release: 12 # Codename: bookworm # Lihat info CPU cat /proc/cpuinfo | head -20 ↳ /proc/cpuinfo berisi info detail CPU ↳ head -20 = tampilkan 20 baris pertama # Lihat info memory cat /proc/meminfo | head -10 ↳ /proc/meminfo berisi info detail RAM # Lihat disk usage df -h ↳ -h = human-readable (GB, MB) # Filesystem Size Used Avail Use% Mounted on # /dev/sda1 20G 5.2G 14G 28% / # Lihat block devices lsblk ↳ List semua disk dan partisi # NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT # sda 8:0 0 50G 0 disk # └─sda1 8:1 0 50G 0 part /
KOMPETENSI SUB-BAB 04
  • Memahami arsitektur Linux (hardware - kernel - shell - apps)
  • Mengenal struktur direktori FHS
  • Mampu cek info sistem dengan uname, lsb_release, cat /proc
05
SUB-BAB 05 FUNDAMENTAL

MENGENAL TERMINAL

Apa Itu Terminal?

Terminal (atau terminal emulator) adalah program yang memberikan akses ke shell. Di desktop Linux, terminal emulator yang populer: GNOME Terminal, Konsole, xterm. Di server, kamu langsung terhubung ke shell via SSH atau console.

Shell vs Terminal

KOMPONENFUNGSICONTOH
TerminalProgram GUI yang menampilkan shellGNOME Terminal, Konsole, PuTTY
ShellProgram yang menerima & menjalankan commandbash, zsh, fish
ConsoleTerminal fisik (keyboard + monitor)TTY1-TTY6 di Linux

Jenis Shell Populer

SHELLPATHKARAKTERISTIK
bash/bin/bashDefault di Debian, paling populer, scripting powerful
sh/bin/shBourne shell, symlink ke dash di Debian, POSIX-compliant
zsh/bin/zshDefault di macOS, auto-completion canggih
fish/usr/bin/fishUser-friendly, syntax highlighting, tidak POSIX
dash/bin/dashCepat, ringan, untuk system scripts

Cek Shell yang Dipakai

BASH
# Lihat shell default user echo $SHELL ↳ $SHELL = environment variable yang menyimpan path shell default # /bin/bash # Lihat shell saat ini (bisa berbeda dari default) echo $0 ↳ $0 = nama program yang sedang berjalan (shell saat ini) # -bash # Lihat semua shell yang terinstall cat /etc/shells ↳ File /etc/shells berisi daftar shell valid di sistem # /bin/sh # /bin/bash # /usr/bin/bash # /bin/dash # /usr/bin/dash # Ganti shell default user chsh -s /bin/zsh ↳ chsh = change shell, -s = specify shell baru ↳ Perlu logout & login agar perubahan berlaku # Lihat shell untuk user tertentu grep "^username" /etc/passwd ↳ Field terakhir di /etc/passwd adalah shell default user

Memahami Prompt Bash

Saat buka terminal, kamu melihat prompt seperti ini:

root@debian-server:~#
BAGIANARTI
rootUsername yang login
@Pemisah
debian-serverHostname server
:Pemisah
~Current directory (~ = home directory)
#Root user (jika $ =普通 user)
PENTING: # = root (superuser), $ =普通 user. Selalu perhatikan prompt sebelum menjalankan command. Command berbahaya sebagai root bisa merusak sistem!

Shortcut Terminal Penting

SHORTCUTFUNGSI
TabAuto-complete command/file/directory
Ctrl + CCancel/stop command yang sedang berjalan
Ctrl + ZSuspend command (bisa dilanjut dengan fg/bg)
Ctrl + DLogout / EOF
Ctrl + LClear screen (seperti clear command)
Ctrl + APindah ke awal baris
Ctrl + EPindah ke akhir baris
Ctrl + RSearch history command
↑ / ↓Navigate history command
Ctrl + UHapus dari cursor ke awal baris
Ctrl + KHapus dari cursor ke akhir baris
KOMPETENSI SUB-BAB 05
  • Memahami perbedaan terminal, shell, console
  • Mengenal berbagai jenis shell
  • Mampu cek dan ganti shell default
  • Menghafal shortcut terminal penting
06
SUB-BAB 06 CLI

COMMAND LINE DASAR

Struktur Command Linux

Command Linux umumnya mengikuti pola:

command [options] [arguments]
KOMPONENCONTOHARTI
CommandlsProgram yang dijalankan
Options/Flags-l, -a, -hModifikasi perilaku command
Arguments/home, file.txtObject yang dioperasikan

Mendapatkan Bantuan

BASH
# man - Manual pages (paling lengkap) man ls ↳ Tampilkan manual lengkap untuk command ls ↳ Tekan q untuk keluar, / untuk search # --help - Quick help (lebih singkat) ls --help ↳ Tampilkan help singkat untuk ls # whatis - Cari command berdasarkan keyword whatis ls ↳ Tampilkan deskripsi singkat ls # ls (1) - list directory contents # apropos - Cari command berdasarkan keyword apropos directory ↳ Cari semua command yang berhubungan dengan "directory" # type - Lihat jenis command type ls ↳ Cek apakah ls adalah alias, builtin, atau external # ls is aliased to `ls --color=auto' type cd # cd is a shell builtin # which - Lokasi executable which python3 ↳ Tampilkan path executable python3 # /usr/bin/python3

Switch User & Sudo

BASH
# su - Switch User su ↳ Switch ke root user (minta password root) su username ↳ Switch ke user tertentu su - username ↳ - = load environment user baru (recommended) # sudo - Super User DO sudo apt update ↳ Jalankan command sebagai root ↳ Minta password user saat ini (bukan root) sudo -i ↳ -i = interactive, buka root shell sudo -u username command ↳ -u = jalankan sebagai user tertentu sudo -l ↳ -l = list, lihat command apa saja yang bisa dijalankan dengan sudo # whoami - Siapa yang login whoami ↳ Tampilkan username yang login saat ini # who - Siapa saja yang login who ↳ List semua user yang sedang login # w - Siapa login + apa yang mereka lakukan w ↳ Detail lebih lengkap dari who # last - History login last ↳ Lihat history login user # id - Info user & group id ↳ Tampilkan UID, GID, dan groups user saat ini # uid=1000(admin) gid=1000(admin) groups=1000(admin),27(sudo) id username ↳ Info user tertentu

Shutdown & Reboot

BASH
# shutdown - Matikan sistem sudo shutdown -h now ↳ -h = halt (matikan), now = sekarang sudo shutdown -h +10 ↳ Matikan dalam 10 menit sudo shutdown -h 22:00 ↳ Matikan pada jam 22:00 sudo shutdown -c ↳ -c = cancel, batalkan shutdown yang dijadwalkan # reboot - Restart sistem sudo reboot ↳ Restart sistem sekarang sudo shutdown -r now ↳ -r = reboot, alternatif untuk reboot # poweroff - Matikan sistem (alternatif) sudo poweroff ↳ Sama dengan shutdown -h now # halt - Hentikan CPU (tidak matikan power) sudo halt ↳ Hentikan sistem tapi tidak matikan power
KOMPETENSI SUB-BAB 06
  • Memahami struktur command Linux
  • Mampu mendapatkan bantuan dengan man, --help
  • Mampu switch user dan gunakan sudo
  • Mampu shutdown dan reboot sistem
07
SUB-BAB 07 CLI

FILE & DIRECTORY

Navigasi Directory

BASH
# pwd - Print Working Directory pwd ↳ Tampilkan current directory # /home/admin # cd - Change Directory cd /var/log ↳ Pindah ke /var/log (absolute path) cd .. ↳ .. = parent directory (naik 1 level) cd ../.. ↳ Naik 2 level cd ~ ↳ ~ = home directory (cd tanpa argumen juga ke home) cd - ↳ - = previous directory (kembali ke directory sebelumnya) cd documents ↳ Relative path (dari current directory) # ls - List directory contents ls ↳ List file & directory di current directory ls -l ↳ -l = long format (detail: permission, owner, size, date) # -rw-r--r-- 1 admin admin 1234 Jan 15 10:30 file.txt ls -la ↳ -a = all (termasuk hidden file yang diawali .) ls -lh ↳ -h = human-readable (size dalam KB, MB, GB) ls -lt ↳ -t = sort by time (terbaru di atas) ls -lS ↳ -S = sort by size (terbesar di atas) ls -lR ↳ -R = recursive (list semua subdirectory) ls --color=auto ↳ Tampilkan dengan warna

Manipulasi File & Directory

BASH
# mkdir - Make Directory mkdir mydir ↳ Buat directory baru mkdir -p dir1/dir2/dir3 ↳ -p = parents, buat directory beserta parent-nya # touch - Buat file kosong atau update timestamp touch file.txt ↳ Buat file kosong. Jika file sudah ada, update timestamp # cp - Copy cp file.txt backup.txt ↳ Copy file cp -r dir1 dir2 ↳ -r = recursive, copy directory beserta isinya cp -i file.txt existing.txt ↳ -i = interactive, tanya sebelum overwrite # mv - Move/Rename mv old.txt new.txt ↳ Rename file mv file.txt /path/to/destination/ ↳ Pindah file ke directory lain mv -i file.txt existing.txt ↳ -i = tanya sebelum overwrite # rm - Remove rm file.txt ↳ Hapus file rm -r directory ↳ -r = recursive, hapus directory beserta isinya rm -rf directory ↳ -f = force, tidak tanya konfirmasi (HATI-HATI!) rm -i file.txt ↳ -i = interactive, tanya sebelum hapus # rmdir - Remove empty directory rmdir emptydir ↳ Hapus directory yang kosong saja # ln - Link ln file.txt hardlink.txt ↳ Buat hard link ln -s file.txt symlink.txt ↳ -s = symbolic link (shortcut)
PERINGATAN: rm -rf sangat berbahaya! Salah ketik bisa hapus data penting. Selalu double-check path sebelum eksekusi. Pertimbangkan pakai rm -ri (interactive) untuk safety.
KOMPETENSI SUB-BAB 07
  • Mampu navigasi file system dengan cd, pwd, ls
  • Mampu buat, copy, move, rename, hapus file & directory
  • Memahami flag umum (-r, -f, -i, -p, -l, -a)
08
SUB-BAB 08 CLI

TEXT PROCESSING

Melihat Isi File

BASH
# cat - Concatenate (lihat isi file) cat file.txt ↳ Tampilkan seluruh isi file cat -n file.txt ↳ -n = number lines (tampilkan nomor baris) # less - Pager (scroll file besar) less file.txt ↳ Buka file dengan pager, bisa scroll up/down ↳ Tekan q untuk keluar, / untuk search # more - Pager sederhana more file.txt ↳ Seperti less tapi hanya bisa scroll down # head - Lihat awal file head file.txt ↳ Tampilkan 10 baris pertama (default) head -n 20 file.txt ↳ -n 20 = tampilkan 20 baris pertama # tail - Lihat akhir file tail file.txt ↳ Tampilkan 10 baris terakhir (default) tail -n 20 file.txt ↳ -n 20 = tampilkan 20 baris terakhir tail -f /var/log/syslog ↳ -f = follow, tampilkan baris baru secara real-time ↳ Sangat berguna untuk monitoring log! # wc - Word Count wc file.txt ↳ Hitung baris, kata, karakter wc -l file.txt ↳ -l = lines only wc -w file.txt ↳ -w = words only wc -c file.txt ↳ -c = characters only

Search & Filter

BASH
# grep - Global Regular Expression Print (cari text) grep "error" /var/log/syslog ↳ Cari kata "error" di file syslog grep -i "error" /var/log/syslog ↳ -i = case-insensitive (Error, ERROR, error semua match) grep -r "pattern" /path/to/dir ↳ -r = recursive, cari di semua file dalam directory grep -n "pattern" file.txt ↳ -n = tampilkan nomor baris grep -v "pattern" file.txt ↳ -v = invert match (tampilkan baris yang TIDAK match) grep -c "pattern" file.txt ↳ -c = count (hitung jumlah match) grep -l "pattern" *.txt ↳ -l = files with matches (tampilkan nama file yang match) # find - Cari file berdasarkan kriteria find /home -name "*.txt" ↳ Cari semua file .txt di /home dan subdirectory find / -type f -size +100M ↳ -type f = file saja (bukan directory) ↳ -size +100M = ukuran lebih dari 100MB find /var/log -mtime +7 ↳ -mtime +7 = dimodifikasi lebih dari 7 hari lalu find /tmp -type f -delete ↳ -delete = hapus file yang ditemukan (HATI-HATI!) # locate - Cari file cepat (pakai database) sudo updatedb ↳ Update database locate (perlu dijalankan pertama kali) locate filename.txt ↳ Cari file berdasarkan nama (sangat cepat)

Text Processing Advanced

BASH
# sort - Urutkan baris sort file.txt ↳ Urutkan baris secara alfabetis sort -n file.txt ↳ -n = numeric sort (urutkan sebagai angka) sort -r file.txt ↳ -r = reverse (urutkan terbalik) sort -u file.txt ↳ -u = unique (hilangkan duplikat) # uniq - Hilangkan baris duplikat (bersebelahan) sort file.txt | uniq ↳ Sort dulu, baru uniq (uniq butuh input sorted) sort file.txt | uniq -c ↳ -c = count (tampilkan jumlah kemunculan) # cut - Potong kolom cut -d: -f1 /etc/passwd ↳ -d: = delimiter : (pemisah kolom) ↳ -f1 = field 1 (kolom pertama) ↳ Output: daftar username di sistem cut -d: -f1,3 /etc/passwd ↳ -f1,3 = field 1 dan 3 (username dan UID) # awk - Text processing powerful awk '{print $1}' file.txt ↳ Print kolom pertama (default delimiter: whitespace) awk -F: '{print $1, $3}' /etc/passwd ↳ -F: = field separator : ↳ Print kolom 1 dan 3 awk '$3 > 1000 {print $1}' /etc/passwd ↳ Print username dengan UID > 1000 (user biasa) # sed - Stream Editor (replace text) sed 's/old/new/g' file.txt ↳ s = substitute, old = text lama, new = text baru ↳ g = global (ganti semua, bukan hanya yang pertama) sed -i 's/old/new/g' file.txt ↳ -i = in-place (edit file langsung) sed '5d' file.txt ↳ 5d = delete baris ke-5

Pipe & Redirection

BASH
# Pipe (|) - Output command jadi input command berikutnya ls | grep ".txt" ↳ List file, lalu filter hanya yang .txt ps aux | grep "nginx" ↳ List process, cari yang nginx cat file.txt | sort | uniq -c | sort -nr ↳ Sort → unik → count → sort by count descending # Redirection ls > file.txt ↳ > = redirect output ke file (overwrite) ls >> file.txt ↳ >> = append (tambahkan ke akhir file) command 2> errors.txt ↳ 2> = redirect error (stderr) ke file command > output.txt 2>&1 ↳ stdout dan stderr ke file yang sama # Wildcard (globbing) ls *.txt ↳ * = match zero or more characters ls file?.txt ↳ ? = match exactly one character ls file[1-3].txt ↳ [] = match any character in brackets
KOMPETENSI SUB-BAB 08
  • Mampu melihat isi file dengan cat, less, head, tail
  • Mampu search dengan grep dan find
  • Mampu text processing dengan sort, uniq, cut, awk, sed
  • Mampu menggunakan pipe dan redirection
09
SUB-BAB 09 PREPARATION

PERSIAPAN HARDWARE

Opsi Instalasi

PHYSICAL SERVER
Hardware dedicated. Performa maksimal, butuh investasi awal.
VPS / CLOUD
Virtual Private Server. Fleksibel, scalable, pay-as-you-go.
VIRTUAL MACHINE
VirtualBox/VMware. Gratis, aman untuk belajar.

Requirements

KOMPONENMINIMUMRECOMMENDED (BELAJAR)
CPU1 GHz2 cores, 2 GHz
RAM512 MB1-2 GB
Storage2 GB20 GB SSD
Network1 NIC1 NIC (untuk VM)

Setup VirtualBox (Rekomendasi untuk Belajar)

1
DOWNLOAD VIRTUALBOX

1. Download VirtualBox dari virtualbox.org.

2. Install sesuai OS host (Windows/Linux/Mac).

2
BUAT VM BARU

1. Klik New.

2. Name: Debian-Server.

3. Type: Linux, Version: Debian (64-bit).

4. Memory: 2048 MB (2GB).

5. Hard disk: Create a virtual hard disk now.

6. Type: VDI.

7. Storage: Dynamically allocated.

8. Size: 20 GB.

3
KONFIGURASI VM

1. Klik Settings pada VM yang dibuat.

2. System → Motherboard: Enable EFI (opsional).

3. Network: Attached to = NAT (untuk internet) atau Bridged (untuk akses dari LAN).

4. Storage: Mount ISO Debian ke CD/DVD drive.

KOMPETENSI SUB-BAB 09
  • Memahami opsi instalasi (physical, VPS, VM)
  • Menentukan hardware requirements
  • Mampu setup VirtualBox untuk belajar
10
SUB-BAB 10 PREPARATION

DOWNLOAD ISO DEBIAN

Jenis ISO Debian

TIPE ISOUKURANISIUSE CASE
netinst~400 MBMinimal, download package via internetServer (PALING DIREKOMENDASIKAN)
DVD-1~3.7 GBDesktop environment + banyak packageDesktop, offline install
BD-1~50 GBSemua package officialOffline install lengkap
live~3 GBLive system, bisa coba tanpa installTesting, demo
UNTUK SERVER: Gunakan netinst. Kecil, cepat download, dan hanya install package yang dibutuhkan. Hemat bandwidth dan disk space.

Download & Verifikasi ISO

OFFICIAL LINK
# Website resmi Debian https://www.debian.org/ # Direct link Debian 12 (Bookworm) netinst https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/ # File yang didownload: # debian-12.5.0-amd64-netinst.iso # Verifikasi checksum (PENTING untuk keamanan!) # Download SHA256SUMS dan SHA256SUMS.sign dari website # Cek SHA256 ISO sha256sum debian-12.5.0-amd64-netinst.iso ↳ Bandingkan output dengan SHA256SUMS di website ↳ Jika match, ISO tidak rusak/tidak dimodifikasi # Atau gunakan SHA512 (lebih aman) sha512sum debian-12.5.0-amd64-netinst.iso # Verifikasi signature (opsional, lebih aman) sha256sum -c SHA256SUMS ↳ -c = check, verifikasi checksum dari file SHA256SUMS gpg --verify SHA256SUMS.sign SHA256SUMS ↳ Verifikasi signature dengan GPG
PENTING: Selalu verifikasi checksum ISO sebelum install! Ini memastikan ISO tidak rusak saat download dan tidak dimodifikasi oleh pihak ketiga.
KOMPETENSI SUB-BAB 10
  • Membedakan jenis ISO Debian
  • Mampu download ISO dari website resmi
  • Mampu verifikasi checksum ISO
11
SUB-BAB 11 PREPARATION

MEMBUAT BOOTABLE MEDIA

Alat yang Dibutuhkan

OSTOOLCARA
WindowsRufus, Balena EtcherGUI, mudah digunakan
Linuxdd, Balena Etcherdd untuk advanced, Etcher untuk GUI
macOSdd, Balena Etcherdd untuk advanced, Etcher untuk GUI
Cross-platformBalena EtcherGUI sederhana, 3 klik selesai

Cara Linux - dd Command

BASH
# PERINGATAN: dd sangat powerful, salah bisa hapus data! # 1. Cek nama USB drive lsblk ↳ Lihat daftar block device, cari USB (biasanya /dev/sdb atau /dev/sdc) # NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT # sda 8:0 0 465.8G 0 disk # ├─sda1 8:1 0 512M 0 part /boot/efi # └─sda2 8:2 0 465.3G 0 part / # sdb 8:16 1 14.9G 0 disk ← USB drive # └─sdb1 8:17 1 14.9G 0 part # 2. Unmount USB (jika auto-mounted) sudo umount /dev/sdb* ↳ Unmount semua partisi di USB # 3. Write ISO ke USB sudo dd if=debian-12.5.0-amd64-netinst.iso of=/dev/sdb bs=4M status=progress ↳ if = input file (ISO) ↳ of = output file (USB drive, BUKAN partisi! /dev/sdb bukan /dev/sdb1) ↳ bs = block size 4MB (lebih cepat) ↳ status=progress = tampilkan progress # 4. Sync untuk memastikan semua data tertulis sync # 5. USB siap digunakan untuk boot
PERINGATAN KERAS: Command dd sangat powerful. Salah tulis of= bisa hapus data penting di hardisk! Selalu double-check device name dengan lsblk. Jangan pernah tulis ke /dev/sda jika itu hardisk utama!

Cara Windows - Rufus

1
DOWNLOAD RUFUS

1. Download Rufus dari rufus.ac.id.

2. Jalankan rufus.exe (tidak perlu install).

2
CONFIGURE RUFUS

1. Device: Pilih USB drive yang benar.

2. Boot selection: Klik SELECT, pilih ISO Debian.

3. Partition scheme: Pilih GPT (untuk UEFI) atau MBR (untuk BIOS legacy).

4. File system: FAT32 (default).

5. Klik START.

6. Tunggu proses selesai.

Checklist Persiapan Selesai

CHECKLIST
[✓] Hardware/VM siap [✓] ISO Debian netinst didownload [✓] Checksum ISO diverifikasi [✓] Bootable media dibuat (USB atau mount di VM) [✓] Backup data penting (jika install di physical) [✓] Catatan konfigurasi network (IP, gateway, DNS) [✓] Siap install Debian Server!
SELAMAT! Kamu telah menyelesaikan Volume 01 - fondasi untuk perjalanan Debian Server. Di Volume 02, kita akan install Debian Server step-by-step. Sampai jumpa di volume berikutnya!
KOMPETENSI SUB-BAB 11
  • Mampu membuat bootable USB dengan Rufus/dd
  • Memahami perbedaan GPT dan MBR
  • Menyusun checklist persiapan install
VOLUME 01 SELESAI

SELAMAT!

Kamu telah menyelesaikan Volume 01 dari seri Debian Linux Server Fundamental. Dari mengenal Linux, sejarah Debian, perbedaan desktop vs server, struktur sistem, terminal, command line, hingga persiapan hardware dan bootable media. Kamu sekarang memiliki fondasi yang kuat untuk lanjut ke Volume 02: Installing Debian Server. Terus belajar!
SUB-BAB11 LEVELFUNDAMENTAL NEXTInstalling Debian
ABDURROZAK.MY.ID // TERHUBUNG

JARINGAN SOSIAL

Temukan saya di berbagai platform digital