No Description

anderson ls 64c33701db Update README.md 1 year ago
LICENSE 186f874750 Initial commit 3 years ago
README.md 64c33701db Update README.md 1 year ago

README.md

Minha Instalação de uso pessoal do ArchLinux com LUKS, LVM e Grub.

PREPARANDO A ISO

$ gpg --keyserver-options auto-key-retrieve --verify archlinux-versao-x86_64.iso.sig
	- verificar assinatura da ISO

$ pacman-key -v archlinux-versão-x86_64.iso.sig
	- verificar em um archlinux

# dd bs=4M if=archlinux-versão-x86_64.iso of=/dev/sdX status=progress && sync
	- gravar a ISO em um pendrive

INICIALIZAR A LIVE ISO

# loadkeys br-abnt2
	- layout do teclado

REALIZANDO CONEXÃO

wi-fi

# iwctl
[iwd]# help
[iwd]# device list
[iwd]# station wlan0 get-networks
[iwd]# station wlan0 connect SSID
	- para conexão wireless

# ping archlinux.org
	- testar a conexão

ethernet

# systemctl status systemd-networkd.service
	- para verificar conexão wired

# ping archlinux.org
	- testar a conexão

CRIANDO AS PARTIÇÕES

# lsblk
	- identificar o disco

# cfdisk /dev/sda
	- criar uma nova tabela de partições vazia tipo DOS
	- marcar '/dev/sda1' como bootável 

layout das partições necessárias

nome tamanho tipo montagem
sda1 512MiB linux /mnt/boot
sda2 *GiB linux /mnt

CRIPTOGRAFANDO1 A PARTIÇÃO LINUX LVM

# modprobe -a dm-mod dm-crypt
	- carregar módulos para criptografia

# cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda2
	- criptografar a partição '/dev/sda2'

# cryptsetup luksOpen /dev/sda2 aux
	- entrar na partição criptografada

# pvcreate /dev/mapper/aux
	- criar o physical volume (pv)

# pvs
# pvdisplay
	- informações sobre o pv

# vgcreate arch /dev/mapper/aux
	- criar o volume group (vg)
	- vgcreate <nome do grupo> <caminho do physical volume>

# lvcreate -L 3g arch -n swap
# lvcreate -l 100%FREE arch -n root
	- criar as logical volume (lv)
	- lvcreate -L <tamanho |M|G> <nome do grupo> -n <nome do logical volume>

# lvs
# pvdisplay
	- informações sobre o logical volume (lv)

FORMATANDO E MONTADO AS PARTIÇÕES

# mkfs.ext4 /dev/mapper/arch-root
# mount /dev/mapper/arch-root /mnt
	- formatar e montar a partição root

# mkdir /mnt/{boot,home}
	- criar os diretórios boot e home em '/mnt'

# mkswap /dev/mapper/arch-swap && swapon /dev/mapper/arch-swap
	- formatar e montar a partição swap

# mkfs.ext4 /dev/sda1
	- formatar a partição boot

# mount /dev/sda1 /mnt/boot
	- montar a partição boot
	
# lsblk
	- listando tipos de partições
	
# fdisk -l /dev/sdX
	- listando partições

INSTALAÇÃO INICIAL

# pacstrap /mnt base base-devel linux-lts linux-lts-headers linux-firmware grub lvm2 vim git
	- instalar o sistema base

# genfstab -U /mnt > /mnt/etc/fstab
	- gerar a tabela de partições

# arch-chroot /mnt
	- entrar no ambiente chroot

# echo "KEYMAP=br-abnt2" > /etc/vconsole.conf
	- configurar o teclado

# passwd root
	- senha para o usuário root

# useradd -m -G wheel -s /bin/bash archer
# passwd archer
	- adicionar um novo usuário e uma senha

# echo "archer ALL=(ALL) ALL" >> /etc/sudoers.d/archer
# echo "archer ALL=(root) NOPASSWD: /usr/lib" >> /etc/sudoers.d/archer
# chmod 0440 /etc/sudoers.d/archer
# sed -i '98i\#includedir /etc/sudoers.d' /etc/sudoers
# sed -i '83s//./' /etc/sudoers
# visudo -c
	- adicionar o usuário 'archer' ao sudoers

CONFIGURAÇÃO DE REDE

# echo "archerhost" > /etc/hostname
	- configuração do hostname

# echo "127.0.0.1     localhost" >> /etc/hosts
# echo "1::           localhost" >> /etc/hosts
# echo "127.0.3.1     archerhost.local	archerhost" >> /etc/hosts
	- criar configuração do hosts

CONEXÃO DE REDE

# pacman -S networkmanager wireless_tools nm-connection-editor network-manager-applet dhcpcd wpa_supplicant net-tools
	- aplicativos necessários para conexão ethernet ou wi-fi

wi-fi

# systemctl disable dhcpcd.service
	- desativar-lo pois ele pode causar instabilidade na conexão wi-fi

# systemctl enable NetworkManager.service
	- habilitar o serviço na inicialização

# systemctl enable wpa_supplicant.service
	- habilitar o serviço na inicialização

ethernet

# systemctl enable dhcpcd.service 
	- habilitar o serviço na inicialização

# systemctl enable NetworkManager.service
	- habilitar o serviço na inicialização

# systemctl disable wpa_supplicant.service
	- desabilitar o serviço na inicialização

LOCALIZAÇÃO

# sed -i '393s/.//' /etc/locale.gen
	- descomentar a localidade para valores monetários regionais, formatos de hora e data, idiossincrasias alfabéticas e outros padrões específicos de localidade.

# locale-gen
	- gerar localidade

# echo "LANG=pt_BR.UTF-8" > /etc/locale.conf
# export LANG=pt_BR.UTF-8
	- idioma do sistema

# rm -f /etc/localtime
# ln -s /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
	- localidade do sistema

# sed -i '14c\[TIME]' /etc/systemd/timesyncd.conf
# sed -i '15c\NTP=pool.ntp.br' /etc/systemd/timesyncd.conf
# sed -i '16c\FallbackNTP=a.ntp.br b.ntp.br c.ntp.br' /etc/systemd/timesyncd.conf
# sed -i '17s/.//' /etc/systemd/timesyncd.conf
# sed -i '18s/.//' /etc/systemd/timesyncd.conf
# sed -i '19s/.//' /etc/systemd/timesyncd.conf
# timedatectl set-ntp true
# timedatectl set-timezone "America/Sao_Paulo"
	- cliente ntp

# hwclock --systohc --utc
	- ajuste o relógio do sistema em '/etc/adjtime'

INITRAMFS

# sed -i '52c\HOOKS=(base udev resume autodetect modconf block encrypt lvm2 keyboard keymap filesystems fsck)' /etc/mkinitcpio.conf
	- editar mkinitcpio.conf

# mkinitcpio -p linux-lts
	- recriar o initramfs

GRUB-BIOS2

# vim /etc/default/grub
	- procurar e adicionar a linha abaixo

-------------------------------------------------------------------------------------------------------------------------
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=/dev/sda2:aux root=/dev/mapper/arch-root resume=/dev/mapper/arch-swap loglevel=3"
-------------------------------------------------------------------------------------------------------------------------

# grub-install /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
	- instalar o grub e carregar as configurações

REINICIAR SISTEMA

# exit
# umount -R /mnt && swapoff /dev/sda2
# reboot

PÓS INSTALAÇÃO

CONEXÃO

wi-fi

$ nmcli device wifi list
	- lista as redes

$ nmcli device wifi connect <SSID> password <SSID_password>
	- conecta a rede

$ nmcli connection show
	- lista as redes conectadas

$ ping archlinux.org
	- checar conexão

ethernet

$ systemctl status NetworkManager.service
	- verificar conexão

$ ping archlinux.org
	- checar conexão

PACMAN.CONF

# sed -i '92,93s/.//' /etc/pacman.conf
# sed -i '33,34,35,36s/.//' /etc/pacman.conf
	- adicionar repositório multilib

# pacman -Syu --noconfirm
	- atualizar o archlinux e o 'multilib'

INTERFACE GRÁFICA

Qual driver de vídeo instalar?

# lspci | grep -e VGA -e 3D

XORG4

# pacman -S xorg xf86-input-synaptics xf86-video-ati

XFCE45

# pacman -S xfce4 xfce4-goodies xdg-user-dirs slim archlinux-themes-slim
	- instalando o xfce como desktop

SEGURANÇA

# pacman -S nftables clamav linssid seahorse gpa openssh sshguard kleopatra rkhunter

UTILIDADES

# pacman -S nmap lsof opencl-mesa tree acpid acpi llvm numlockx ethtool dialog gparted gpart redshift exfat-utils reiserfsprogs nilfs-utils f2fs-tools xfsprogs jfsutils ntfs-3g mtools polkit iputils gvfs ntp wol psutils t1utils usbutils baobab zenity dnsutils nyx

VIRTUALIZAÇÃO

# pacman -S wine

COMPARTILHAMENTO DE ARQUIVOS

# pacman -S transmission-gtk filezilla netcat wget github-cli

AUR6 TRIZEN7

$ git clone https://aur.archlinux.org/trizen.git
	- fazer o download do trizen para administração de pacotes AUR

$ cd trizen
$ makepkg -si
	- instalar o Trizen

SNAP

$ git clone https://aur.archlinux.org/snapd.git
	- download do Snap

$ cd snapd
$ makepkg -si
	- instalar o Snap

# systemctl enable --now snapd.socket
	- ativar soquete de comunicação principal do Snap

# ln -s /var/lib/snapd/snap /snap
	- criar link simbólico entre '/var/lib/snapd/snape /snap'

NAVEGADORES

# pacman -S firefox-i18n-pt-br links lynx

$ gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org
$ trizen -S tor-browser google-chrome

EDITORES DE TEXTO

# pacman -S leafpad xed mousepad

TTF

# pacman -S xorg-fonts-alias-cyrillic xorg-fonts-alias-misc xorg-fonts-misc xorg-fonts-type1 font-bh-ttf noto-fonts noto-fonts-extra sdl2_ttf ttf-bitstream-vera ttf-caladea ttf-carlito ttf-croscore ttf-dejavu ttf-hack ttf-junicode gnu-free-fonts ttf-linux-libertine perl-font-ttf ttf-anonymous-pro ttf-cormorant ttf-droid ttf-fantasque-sans-mono ttf-fira-code ttf-fira-mono ttf-fira-sans ttf-ibm-plex ttf-inconsolata ttf-indic-otf ttf-ionicons ttf-jetbrains-mono ttf-joypixels ttf-linux-libertine-g ttf-nerd-fonts-symbols-mono ttf-opensans ttf-proggy-clean ttf-roboto ttf-roboto-mono ttf-ubuntu-font-family

$ trizen -S ttf-ms-fonts

GERENCIADORES DE ARQUIVOS

# pacman -S trash-cli catfish rclone rsync meld 

$ trizen -S timeshift

ARQUIVAMENTO

# pacman -S xarchiver-gtk2 p7zip unzip unrar zip

MULTIMÍDIA E CODECS

# pacman -S libdc1394 libdvdcss libgme vcdimager smbclient libnfs protobuf libmicrodns lua-socket live-media libdvdread libdvdnav zvbi libkate libtiger chromaprint lirc projectm libgoom2 ffmpeg schroedinger libtheora libvorbis libmpeg2 xine-lib libde265 xvidcore gst-libav inkscape wavpack jasper a52dec libmad libvpx geeqie libdca dav1d libdv faad2 x265 x264 faac aom flac lame libxv opus gimp

$ trizen -S codecs64

AUDIO PIPEWIRE

# pacman -S xdg-desktop-portal-gtk archlinux-xdg-menu gst-plugin-pipewire libpipewire02 pipewire pipewire-alsa pipewire-docs pipewire-jack pipewire-media-session pipewire-pulse pulseeffects wireplumber

VÍDEO

# pacman -S vlc

OFFICE

# pacman -S libreoffice-still libreoffice-still-pt-br galculator-gtk2 retext xsane cups

$ trizen -S pdfsam

CLIENTES EMAIL

# pacman -S claws-mail mutt

LEITORES

# pacman -S calibre mcomix xpdf

$ trizen -S rss2email

WEBCAM

# pacman -S cheese

IRC

# pacman -S hexchat

ÁREA DE TRABALHO REMOTA

# pacman -S x11vnc

$ trizen -S real-vnc-viewer

DESENVOLVIMENTO

# pacman -S tk tcl

MONITORES DE SISTEMA

# pacman -S conky

INFORMAÇÕES DO SISTEMA

# pacman -S hwdetect neofetch hwinfo htop

LOG

# pacman -S pacmanlogviewer

LIMPEZA

# pacman -S bleachbit

AGENDADORES

# pacman -S cronie

PERSONALIZAÇÃO

# pacman -S archlinux-wallpaper capitaine-cursors xcursor-neutral papirus-icon-theme

$ trizen -S numix-themes-archblue

GAMES

# pacman -S dwarffortress asciiportal stone-soup 0ad 0ad-data

$ snap install cncra
    - instalar C&C: Red Alert

$ snap install cnctsun
	- instalar C&C: Red Alert Tiberium Sun

$ snap install cncra2yr
	- instalar C&C: Red Alert 2 Yuri's Revenge

$ snap install the-powder-toy
  	- instalar The Powder Toy

LEITURA COMPLEMENTAR

1 DM-CRYPT

2 GRUB

3 INTERFACE GRÁFICA

4 XORG

5 XFCE

6 AUR

7 TRIZEN

^top

Copyright © 2002-2021 Judd Vinet, Aaron Griffin and Levente Polyák.

The Arch Linux name and logo are recognized trademarks. Some rights reserved.

Linux® is a registered trademark of Linus Torvalds.