Difference between revisions of "Box"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
See also [[Stack]], [[*nix#Configuration_2]] | See also [[Stack]], [[*nix#Configuration_2]] | ||
− | == | + | == Setting up Arch Linux == |
− | Arch Linux, bspwm, sxhkd, | + | Arch Linux, bspwm, sxhkd, dmenu_run.pl, xfce4-panel, urxvt(c), zsh, vim |
+ | |||
+ | * https://wiki.archlinux.org/index.php/Installation_guide | ||
+ | * https://wiki.archlinux.org/index.php/Beginners%27_guide - more detail | ||
<pre> | <pre> | ||
− | # arch linux install from usb | + | # arch linux install from archiso usb drive |
− | |||
− | # check for potentially failed services | + | # set keyboard for UK qwerty |
+ | loadkeys /usr/share/kbd/keymaps/i386/qwerty/uk.map.gz | ||
+ | |||
+ | # check for potentially failed services (i.e. network dhcp) | ||
systemctl --failed | systemctl --failed | ||
Line 18: | Line 23: | ||
timedatectl set-ntp true | timedatectl set-ntp true | ||
− | # | + | # create drive partitions |
cfdisk | cfdisk | ||
− | # format | + | # see also https://wiki.archlinux.org/index.php/Partitioning |
+ | # there can be only 4 'primary' partitions | ||
+ | # make the fourth 'extended' so it can contain further 'logical' partitions | ||
+ | # only primary and logical partitions are formatted | ||
+ | |||
+ | # / - root partition, will contain /usr (includes installed programs) - 20/25Gb - Bootable - Type: linux (83) | ||
+ | # /boot - contains boot kernel images, 100Mb for no extra kernel images, 200Mb safer for additional images (linux-ck, linux-lts, etc.) - Type: linux (83) | ||
+ | # /var - contains misc. including spools, logs, packages downloaded for installation. separate to avoid running out of space. 10Gb | ||
+ | # /home - contains user home folders, where media will be stored - size: remainder Type: linux (83) | ||
+ | # [swap] - swap partition - 1Gb - Type: linux swap (82) | ||
+ | |||
+ | # check and format drive partitions | ||
lsblk | lsblk | ||
− | |||
+ | mkfs.ext4 /dev/[partition] | ||
+ | # repeat for each partition, excluding swap | ||
+ | |||
+ | # create swap partition | ||
+ | mkswap /dev/[swappartition] | ||
+ | swapon /dev/[swappartition] | ||
+ | |||
+ | # mount partitions | ||
+ | mount /dev/sda1 /mnt | ||
+ | |||
+ | mkdir /mnt/boot | ||
+ | mount /dev/sda2 /mnt/boot | ||
+ | |||
+ | mkdir /mnt/var | ||
+ | mount /dev/sda3 /mnt/var | ||
+ | |||
+ | mkdir /mnt/home | ||
+ | mount /dev/sda5 /mnt/home | ||
+ | |||
+ | # use geographically close arch package mirror | ||
+ | vi /etc/pacman.d/mirrorlist | ||
+ | # put selected mirror at top of the list. this is copied across in the next step | ||
# install pacman and bootstrap | # install pacman and bootstrap |
Revision as of 01:20, 26 January 2016
Quick setup snippets for my personal dotconfigs, etc.
See also Stack, *nix#Configuration_2
Setting up Arch Linux
Arch Linux, bspwm, sxhkd, dmenu_run.pl, xfce4-panel, urxvt(c), zsh, vim
- https://wiki.archlinux.org/index.php/Installation_guide
- https://wiki.archlinux.org/index.php/Beginners%27_guide - more detail
# arch linux install from archiso usb drive # set keyboard for UK qwerty loadkeys /usr/share/kbd/keymaps/i386/qwerty/uk.map.gz # check for potentially failed services (i.e. network dhcp) systemctl --failed # turn ntp time updates on timedatectl set-ntp true # create drive partitions cfdisk # see also https://wiki.archlinux.org/index.php/Partitioning # there can be only 4 'primary' partitions # make the fourth 'extended' so it can contain further 'logical' partitions # only primary and logical partitions are formatted # / - root partition, will contain /usr (includes installed programs) - 20/25Gb - Bootable - Type: linux (83) # /boot - contains boot kernel images, 100Mb for no extra kernel images, 200Mb safer for additional images (linux-ck, linux-lts, etc.) - Type: linux (83) # /var - contains misc. including spools, logs, packages downloaded for installation. separate to avoid running out of space. 10Gb # /home - contains user home folders, where media will be stored - size: remainder Type: linux (83) # [swap] - swap partition - 1Gb - Type: linux swap (82) # check and format drive partitions lsblk mkfs.ext4 /dev/[partition] # repeat for each partition, excluding swap # create swap partition mkswap /dev/[swappartition] swapon /dev/[swappartition] # mount partitions mount /dev/sda1 /mnt mkdir /mnt/boot mount /dev/sda2 /mnt/boot mkdir /mnt/var mount /dev/sda3 /mnt/var mkdir /mnt/home mount /dev/sda5 /mnt/home # use geographically close arch package mirror vi /etc/pacman.d/mirrorlist # put selected mirror at top of the list. this is copied across in the next step # install pacman and bootstrap pacstrap /mnt base # generate file system configuration info genfstab -p /mnt >> /mnt/etc/fstab # chroot into new system arch-chroot /mnt # set a hostname echo computer_name > /etc/hostname # set timezone ln -s /usr/share/zoneinfo/Europe/London /etc/localtime # uncomment en_GB* vi /etc/locale.gen # build boot images mkinitcpio -p linux # change root password passwd [stuff] # add your own user account useradd -m USERNAME # add sudo rights to new user vi /etc/sudoers # uncomment %wheel ALL=(ALL) ALL # USERNAME HOST_NAME= NOPASSWD: /usr/bin/halt,/usr/bin/poweroff,/usr/bin/reboot,/usr/bin/pacman -Syu # add user to wheel group for sudo/etc, access gpasswd -a USERNAME wheel # set network device names in relation to their MAC vi /etc/udev/rules.d/10-network.rules # SUBSYSTEM etc. w/ MAC address (todo - dynamic man alteration?) # set network devices for DHCP (dynamic ip) vi /etc/systemd/network/net0.network [Match] Name=net0 [Network] DHCP=ipv4 # set dns resolver (router) vi /etc/resolv.conf hostname 192.168.1.254 # make systemd-networkd start automatically systemctl enable systemd-networkd # make slim login desktop manager start automatically systemctl enable slim.service # edit slim config - default_user, focus_password, current_theme sleep-openbox vi /etc/slim.conf # update system pacman -Syu # find out graphics chipset lspci | grep -e VGA -e 3D # find gfx chipset drivers to install pacman -Ss xf86-video | grep ##something## # install gfx drivers pamna -S xf86-video-ati # etc. # bootstrap AUR access with AUR helper yaourt # https://www.digitalocean.com/community/tutorials/how-to-use-yaourt-to-easily-download-arch-linux-community-packages echo "[archlinuxfr]" >> /etc/pacman.conf echo "SigLevel = Never" >> /etc/pacman.conf echo "Server = http://repo.archlinux.fr/$arch" >> /etc/pacman.conf # install required basic commands pacman -Syu yaourt # now remove last three pacman.conf lines # install various apps yaourt -S binutils fakeroot base-devel pm-utils yaourt -S zsh vim openssh terminus-font htop tree ipcalc yaourt -S xorg-server xorg-initrc xorg-xsetroot xorg-xrdb xorg-xset slim slim-themes bspwm-git sxhkd-git dmenu xfce4-panel urxvtcd hsetroot redshift unclutter udiskie volti radiotray compton dunst autocutsel lxapperance friendly-find # setup encrypted dns dnscrypt-autoinstall python # uncomment en_GB* fuck about with syslinux *.c32 symbolic links (on the same boot partition) git config --global user.name USERNAME git config --global user.email MAILADDRESS
dotfiles
# install: vcsh myrepos vcsh clone git@github.com:milkmiruku/vcsh-mr.git # edit config.d symlinks to available.d mr up
old Ubuntu setup
hostname new.host.name sudo apt-get update sudo apt-get install tmux git git clone git@github.com:milkmiruku/dottmux.git ~/.tmux ln -s ~/.tmux/.tmux.conf ~/.tmux.conf tmux sudo apt-get install curl zsh ncdu htop tree mercurial build-essential gcc libc6-dev ncurses-dev sudo git clone git@github.com:milkmiruku/zsh.git ~/.zsh && cd ~/.zsh && sudo git submodule init && sudo git submodule update # edit zshrc location config useradd -m -s /usr/bin/zsh milk passwd milk adduser milk sudo sudo apt-get remove vim vim-runtime gvim # (disable distro vim. not possible with apt on ubuntu [1]) mkdir ~/src && mkdir ~/src/vim hg clone https://vim.googlecode.com/hg/ ~/src/vim && cd ~/src/vim && ./configure --enable-pythoninterp=yes && make && sudo make install cd git clone git@github.com:milkmiruku/dotvim.git ~/.vim ln -s ~/.vim/vimrc ~/.vimrc mkdir ~/.vim/bundle git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim echo ':NeoBundleInstall' > ~/viminit.txt echo ':q' >> ~/viminit.vim vim -s ~/viminit.vim rm ~/viminit.vim wget -O src/atop.tar.gz http://www.atoptool.nl/download/atop-2.0.2.tar.gz && cd ~/src && tar zxvf atop.tar.gz && cd ~/src/atop && ./configure && make && make install cd vim /etc/ssh/sshd_config # disable root, change port, etc.
ssh-keygen -t rsa # (for user and root?)
To sort: multiuser config. permissions? Or /usr/share/config/ ...
apt-get install php mariadb apt-get install ruby rubygems apt-get install python pip
Install
- https://wiki.debian.org/DebianInstaller/Preseed
- http://fai-project.org/
- http://www.50ply.com/blog/2012/07/16/automating-debian-installs-with-preseed-and-puppet/
Backup
See also Backup
Attick
Release date.
List of installed programs, dependencies.
Paths
/home/* /etc /var /boot etc..