Advertisement
hak8or

Arch linux setup script

Nov 3rd, 2017
954
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.80 KB | None | 0 0
  1. #!/usr/bin/bash
  2.  
  3. # To run this script, do the following:
  4.  
  5.  
  6. # For making the script stop if something fails like make.
  7. set -e
  8. set -o pipefail
  9.  
  10. # Enable and start sshd so we can ssh in here in the future.
  11. systemctl enable sshd
  12. systemctl start sshd
  13.  
  14. # Put my public SSH key in here.
  15. # ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1NDs/5sOUhwwrCl7vbwl4gwn7HA071bwyrBYKaVM1pMkEj2e6BEfvm9dWuGF3tEUH3RQN8L9dQIuFUO+tDp99IJPVpkzXnhhuqsQp7GtSklqLg4fnJ9oop/w5PbUnDjS1jPNDssB8tmVeY3L/j9n/omZ0WkncYgQ9vlWVokkxg6fe0lYqv5e6VesWlzd4nPk63k9JcSF2/F06jgLFdSZhmV/DXHFNy8e1s+HHAWA3lhfIuCTNCZH4vFoOMucBjv858rxfBa+06YJ69JKP6aOHvbun7o1NQ9TSkNvPpYa/vr+Wf7Eu3t5A322D7w7zEBkCrNAiKbIgapbJQnailyO45TldjtxnQV99i6NU3Hyt0nuDfLPMQjYocwqcjykmZm+sTOgfYwVYDO+CmKIiCLpA1P6seJ2g0BL969bN2VgmHKYbX3obhVmRPGncTTYy3QJ72r1j5I30BtJkZk6X2uaFsQUgnPQutHBd6dpmP+lsWA10s4mDMNGWHl/IkS1ZdTlWETXiQh2N0iLQryUHynJGXKEkyrYUMRwm4BAJopcJiXXoPybeenhbmjai4jwEIvOkLUvesKl8lYJOcop174e6fN/ERypZLPweW6eQNipPHxeSkqqDpiPvQzaZEaVjucr1n5LqBBIcWZ7VZcioRNve06rsFt4aonkyEbORKlKIyQ== hak8or@gmail.com
  16.  
  17. # Setup keys for pacman
  18. pacman-key --init
  19. pacman-key --populate archlinux
  20.  
  21. # Setup mirrors, hardcoded for now. Could have been done with rankmirror
  22. # with USA and worldwide mirrors but eh.
  23. mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
  24. cat > /etc/pacman.d/mirrorlist <<- EOM05594313219813
  25.     # Server list generated by rankmirrors on 2017-11-03
  26.     ##
  27.     ## Arch Linux repository mirrorlist
  28.     ## Generated on 2017-06-28
  29.     ##
  30.     ## Worldwide
  31.     ## United States
  32.     Server = http://mirror.nexcess.net/archlinux/$repo/os/$arch
  33.     Server = http://mirror.epiphyte.network/archlinux/$repo/os/$arch
  34.     Server = http://arch.mirror.constant.com/$repo/os/$arch
  35.     Server = http://mirrors.evowise.com/archlinux/$repo/os/$arch
  36.     Server = http://mirrors.advancedhosters.com/archlinux/$repo/os/$arch
  37.     Server = http://mirror.math.princeton.edu/pub/archlinux/$repo/os/$arch
  38. EOM05594313219813
  39.  
  40. # Do an update to make sure all is, well, updated!
  41. pacman -Syu
  42.  
  43. # Install base-devel which includes gcc and jazz.
  44. pacman -S base-devel
  45.  
  46. # Create temp dirs for installing stuff
  47. mkdir ~/tmp
  48. cd ~/tmp
  49.  
  50. # Install Yaourt. Why yaourt instead of pacaur? Because pacaur doesn't allow
  51. # itself to be ran as root, even though all we have is root in the container,
  52. # and I don't want to bother fiddling with users just for this. Yaourt on the
  53. # other hand works fine for this.
  54. # ----------- package query for yaourt -----------
  55. git clone https://aur.archlinux.org/package-query.git
  56. cd package-query
  57. makepkg -si
  58. cd ..
  59.  
  60. # ----------- yaourt itself -----------
  61. git clone https://aur.archlinux.org/yaourt.git
  62. cd yaourt
  63. makepkg -si
  64. cd ..
  65.  
  66. # Install htop and cowsay cause they are awesome
  67. yaourt -S htop cowsay
  68.  
  69. # And say what the IP address is to the terminal.
  70. cowsay "All Done!IP Address information: $(ip addr show)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement