Arch Post-Installation Checklist: Difference between revisions
mNo edit summary |
m →Yay: Fixed some code blocks |
||
(148 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Passwords & User Creation = | = Passwords & User Creation = | ||
Make sure | Make sure {{ic|root}} has a password. | ||
Make sure you have a primary user set up. | Make sure you have a primary user set up. | ||
{{bc| | |||
sudo useradd -m -u <id -ge 1000> -g users -G wheel,games,video,audio,optical,storage,scanner,power <user> | |||
sudo passwd <user> | |||
}} | |||
= /etc/fstab = | |||
= Time Zone = | |||
{{bc| | |||
sudo ln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtime | |||
sudo hwclock --systohc | |||
}} | |||
= Localization = | |||
Un-comment your desired locales in {{ic|/etc/locale.conf}}, then run | |||
{{bc|sudo locale-gen}} | |||
If you don't have the default {{ic|/etc/locale.gen}} file: | |||
{{bc| | |||
sudo rm /etc/locale.gen | |||
sudo pacman -Syu glibc | |||
}} | |||
Edit {{ic|/etc/locale.conf}} as you see fit | |||
{{hc|/etc/locale.conf|2= | |||
<nowiki>LANG=en_US.UTF-8 | |||
LANGUAGE=en_US | |||
LC_COLLATE=POSIX | |||
LC_MESSAGES=C | |||
LC_CTYPE=en_US.UTF-8 | |||
LC_NUMERIC=en_US.UTF-8 | |||
LC_TIME=en_US.UTF-8 | |||
LC_MONETARY=en_US.UTF-8 | |||
LC_PAPER=en_US.UTF-8 | |||
LC_NAME=en_US.UTF-8 | |||
LC_ADDRESS=en_US.UTF-8 | |||
LC_TELEPHONE=en_US.UTF-8 | |||
LC_MEASUREMENT=en_US.UTF-8 | |||
LC_IDENTIFICATION=en_US.UTF-8</nowiki> | |||
}} | |||
Set up {{ic|/etc/vconsole.conf}} with a keymap and (optionally) a font: | |||
{{hc|/etc/vconsole.conf|2= | |||
KEYMAP=us | |||
FONT=Lat2-Terminus16 | |||
}} | |||
= Initramfs = | |||
Look for and edit the following lines: | |||
{{hc|/etc/mkinitcpio.conf|2= | |||
<nowiki>MODULES=([amdgpu|bochs_drm|cirrus|i915|nouveau|(nvidia nvidia_modeset nvidia_uvm nvidia_drm)] [ehci_pci usb_storage]>) | |||
HOOKS=(base udev autodetect modconf block [zfs] filesystems keyboard fsck [encrypt] keymap consolefont) | |||
COMPRESSION=lz4</nowiki> | |||
}} | |||
= Networking = | = Networking = | ||
== systemd-networkd == | == Host Name == | ||
Make sure a host name is set in {{ic|/etc/hostname}} | |||
Then edit {{ic|/etc/hosts}} | |||
{{hc|/etc/hosts|2= | |||
127.0.0.1 localhost.localdomain locahost | |||
::1 localhost.localdomain localhost | |||
127.0.1.1 <hostname>.localdomain <hostname> | |||
}} | |||
== Static Addressing == | |||
Use {{ic|systemd-networkd}} when a machine will use a static address without consulting a DHCP server. | |||
=== IPv4 Only === | |||
{{hc|/etc/systemd/network/network.network|2= | |||
[Match] | |||
MACAddress=<mac-address> | |||
[Network] | |||
Address=<ipv4-address>/<mask> | |||
DNS=<ipv4-address> | |||
Gateway=<ipv4-address> | |||
LinkLocalAddressing=no | |||
IPv6AcceptRA=no | |||
}} | |||
=== | === IPv4 & IPv6 === | ||
{{hc|/etc/systemd/network/network.network|2= | |||
[Match] | |||
MACAddress=<mac-address> | |||
[Network] | |||
Address=<ipv6-address>/<mask> | |||
DNS=<ipv6-address> | |||
Gateway=<ipv6-address> | |||
Address=<ipv4-address>/<mask> | |||
DNS=<ipv4-address> | |||
Gateway=<ipv4-address> | |||
}} | |||
=== Dynamic Addressing === | === Dynamic Addressing === | ||
It's preferable to use {{ic|connman}} or {{ic|Network Manager}} for dynamic addresses as {{ic|systemd-networkd}} doesn't play well with interfaces coming and going. | |||
If you'd rather use {{ic|systemd-networkd}} for DHCP: | |||
{{hc|/etc/systemd/network/network.network|2= | |||
[Match] | |||
MACAddress=<mac-address> | |||
[Network] | |||
DHCP=yes | |||
[DHCP] | |||
UseMTU=true | |||
}} | |||
= | = Packages = | ||
== Mirror List == | |||
Install and use {{ic|reflector}} to automate the use and selection of mirrors. | |||
{{bc| | |||
sudo pacman -Syu reflector | |||
sudo reflector -c <country> -p https -l 5 --sort rate --save /etc/pacman.d/mirrorlist | |||
}} | |||
== Yay == | |||
Make sure you have the {{ic|base-devel}} group installed. | |||
{{bc|sudo pacman -Syu --needed base-devel git}} | |||
Create a directory where AUR build files will go | |||
= | {{bc|1= | ||
sudo mkdir /var/lib/pacman/aur | |||
sudo chmod 1777 /var/lib/pacman/aur | |||
mkdir /var/lib/pacman/aur/$(whoami) | |||
}} | |||
Build {{ic|yay}}. | |||
{{bc|1=<nowiki> | |||
cd /var/lib/pacman/aur/$(whoami) | |||
git clone https://aur.archlinux.org/yay.git | |||
cd yay | |||
makepkg -Ccisr | |||
</nowiki>}} | |||
The create the configuration file. | |||
{{hc|~/.config/yay/config.json|2= | |||
{ | |||
"aururl": "https://aur.archlinux.org", | |||
"buildDir": "/var/lib/pacman/aur/$USER", | |||
"editor": "nano", | |||
"editorflags": "", | |||
"makepkgbin": "makepkg", | |||
"makepkgconf": "", | |||
"pacmanbin": "pacman", | |||
"pacmanconf": "/etc/pacman.conf", | |||
"tarbin": "bsdtar", | |||
"redownload": "no", | |||
"rebuild": "no", | |||
"answerclean": "none", | |||
"answerdiff": "all", | |||
"answeredit": "", | |||
"answerupgrade": "0", | |||
"gitbin": "git", | |||
"gpgbin": "gpg", | |||
"gpgflags": "", | |||
"mflags": "", | |||
"sortby": "votes", | |||
"gitflags": "", | |||
"removemake": "yes", | |||
"requestsplitn": 150, | |||
"sortmode": 0, | |||
"completionrefreshtime": 7, | |||
"sudoloop": false, | |||
"timeupdate": false, | |||
"devel": true, | |||
"cleanAfter": false, | |||
"gitclone": true, | |||
"provides": true, | |||
"pgpfetch": true, | |||
"upgrademenu": true, | |||
"cleanmenu": true, | |||
"diffmenu": true, | |||
"editmenu": true, | |||
"combinedupgrade": false, | |||
"useask": false | |||
} | |||
}} | |||
== General Utilities == | |||
These packages supplement the base system. | |||
{{bc|yay -Syu --needed adduser archey3 arj bind-tools bzip2 dmidecode dnsutils fail2ban git haveged htop hwdetect inxi iotop lshw lzop nano ncdu openssh p7zip pacman-contrib perl-rename pkgfile polkit ranger rsync strace sudo tmux unrar unzip vim whois zip}} | |||
If you are not running inside a VM, you may also wish to add these packages: | |||
{{bc|yay -Syu hddtemp lm_sensors memtest86+ smartmontools}} | |||
The {{ic|havaged}} service can be enabled and started right away as no configuration is needed. | |||
{{bc|sudo systemctl enable --now haveged}} | |||
Your sensors need to be configured before starting the {{ic|lm_sensors}} service. | |||
{{note|This package is useless inside a VM.}} | |||
{{bc| | |||
sudo sensors-detect | |||
sudo systemctl enable --now lm_sensors | |||
}} | |||
Don't start {{ic|fail2ban}} or {{ic|sshd}} quite yet as they have configuration that needs to be done. | |||
Latest revision as of 03:39, 28 December 2019
Passwords & User Creation
Make sure root
has a password.
Make sure you have a primary user set up.
sudo useradd -m -u <id -ge 1000> -g users -G wheel,games,video,audio,optical,storage,scanner,power <user> sudo passwd <user>
/etc/fstab
Time Zone
sudo ln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtime sudo hwclock --systohc
Localization
Un-comment your desired locales in /etc/locale.conf
, then run
sudo locale-gen
If you don't have the default /etc/locale.gen
file:
sudo rm /etc/locale.gen sudo pacman -Syu glibc
Edit /etc/locale.conf
as you see fit
/etc/locale.conf
LANG=en_US.UTF-8 LANGUAGE=en_US LC_COLLATE=POSIX LC_MESSAGES=C LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8
Set up /etc/vconsole.conf
with a keymap and (optionally) a font:
/etc/vconsole.conf
KEYMAP=us FONT=Lat2-Terminus16
Initramfs
Look for and edit the following lines:
/etc/mkinitcpio.conf
MODULES=([amdgpu|bochs_drm|cirrus|i915|nouveau|(nvidia nvidia_modeset nvidia_uvm nvidia_drm)] [ehci_pci usb_storage]>) HOOKS=(base udev autodetect modconf block [zfs] filesystems keyboard fsck [encrypt] keymap consolefont) COMPRESSION=lz4
Networking
Host Name
Make sure a host name is set in /etc/hostname
Then edit /etc/hosts
/etc/hosts
127.0.0.1 localhost.localdomain locahost ::1 localhost.localdomain localhost 127.0.1.1 <hostname>.localdomain <hostname>
Static Addressing
Use systemd-networkd
when a machine will use a static address without consulting a DHCP server.
IPv4 Only
/etc/systemd/network/network.network
[Match] MACAddress=<mac-address> [Network] Address=<ipv4-address>/<mask> DNS=<ipv4-address> Gateway=<ipv4-address> LinkLocalAddressing=no IPv6AcceptRA=no
IPv4 & IPv6
/etc/systemd/network/network.network
[Match] MACAddress=<mac-address> [Network] Address=<ipv6-address>/<mask> DNS=<ipv6-address> Gateway=<ipv6-address> Address=<ipv4-address>/<mask> DNS=<ipv4-address> Gateway=<ipv4-address>
Dynamic Addressing
It's preferable to use connman
or Network Manager
for dynamic addresses as systemd-networkd
doesn't play well with interfaces coming and going.
If you'd rather use systemd-networkd
for DHCP:
/etc/systemd/network/network.network
[Match] MACAddress=<mac-address> [Network] DHCP=yes [DHCP] UseMTU=true
Packages
Mirror List
Install and use reflector
to automate the use and selection of mirrors.
sudo pacman -Syu reflector sudo reflector -c <country> -p https -l 5 --sort rate --save /etc/pacman.d/mirrorlist
Yay
Make sure you have the base-devel
group installed.
sudo pacman -Syu --needed base-devel git
Create a directory where AUR build files will go
sudo mkdir /var/lib/pacman/aur sudo chmod 1777 /var/lib/pacman/aur mkdir /var/lib/pacman/aur/$(whoami)
Build yay
.
cd /var/lib/pacman/aur/$(whoami) git clone https://aur.archlinux.org/yay.git cd yay makepkg -Ccisr
The create the configuration file.
~/.config/yay/config.json
{ "aururl": "https://aur.archlinux.org", "buildDir": "/var/lib/pacman/aur/$USER", "editor": "nano", "editorflags": "", "makepkgbin": "makepkg", "makepkgconf": "", "pacmanbin": "pacman", "pacmanconf": "/etc/pacman.conf", "tarbin": "bsdtar", "redownload": "no", "rebuild": "no", "answerclean": "none", "answerdiff": "all", "answeredit": "", "answerupgrade": "0", "gitbin": "git", "gpgbin": "gpg", "gpgflags": "", "mflags": "", "sortby": "votes", "gitflags": "", "removemake": "yes", "requestsplitn": 150, "sortmode": 0, "completionrefreshtime": 7, "sudoloop": false, "timeupdate": false, "devel": true, "cleanAfter": false, "gitclone": true, "provides": true, "pgpfetch": true, "upgrademenu": true, "cleanmenu": true, "diffmenu": true, "editmenu": true, "combinedupgrade": false, "useask": false }
General Utilities
These packages supplement the base system.
yay -Syu --needed adduser archey3 arj bind-tools bzip2 dmidecode dnsutils fail2ban git haveged htop hwdetect inxi iotop lshw lzop nano ncdu openssh p7zip pacman-contrib perl-rename pkgfile polkit ranger rsync strace sudo tmux unrar unzip vim whois zip
If you are not running inside a VM, you may also wish to add these packages:
yay -Syu hddtemp lm_sensors memtest86+ smartmontools
The havaged
service can be enabled and started right away as no configuration is needed.
sudo systemctl enable --now haveged
Your sensors need to be configured before starting the lm_sensors
service.
sudo sensors-detect sudo systemctl enable --now lm_sensors
Don't start fail2ban
or sshd
quite yet as they have configuration that needs to be done.