Skip to content

Instantly share code, notes, and snippets.

@nick-orton
Created July 5, 2012 01:57
Show Gist options
  • Save nick-orton/3050547 to your computer and use it in GitHub Desktop.
Save nick-orton/3050547 to your computer and use it in GitHub Desktop.
arch installation 7/4/12

My Arch Configuration

These are the instructions for setting up an Arch Linux box the way I like it. This setup includes X windows using xmonad, mpd, zsh, vim, screen, and cups.

Install from CD

  • Choose core-local packages and vi as editor.

  • Set the time and zone.

  • Use the default partition.

  • Choose grub as the bootloader.

  • Add base-dev to the selected packages with the SPACE bar.

  • Add the following packages:

  • openssh
  • openssl
  • pacman-mirrorlist
  • sudo
  • Choose install Packages, BE PATIENT
  • Config:
  • uncomment US mirrors (not fit)
  • in rc.d:
  • set interface=eth0
  • set hostname
  • remove myhost from fstab
  • Install Grub.
  • Reboot (take out CD)

Update System to latest

Get ready for pacman update:

 mv /usr/bin/tzselect        /tmp/us.bin.tzselect
 mv /usr/sbin/zdump          /tmp/us.sbin.zdump
 mv /usr/sbin/zic            /tmp/us.sbin.zic
 mv /etc/profile.d/locale.sh /tmp/etc.profile.d.locale.sh
 mv /var/run                 /tmp/var.run

Update system. pacman -Syu

Thia will prompt to first update pacman. After that will prompt for updating the key database.

 pacman-key --init; pacman-key --populate archlinux

This requires a lot of entropy, something a new system doesnt have much of. Open another TTY and do:

 pacman -Syu --ignore filesystem && pacman -S filesystem --force
 pacman -Syu

You may need to wait for the key population finishes in the 1st tty.

Install command line essentials

 pcaman -S screen zsh git vim most

Create user

 useradd -m -g users -G \
   audio,lp,optical,storage,video,wheel,games,power,scanner,log \
   -s /bin/zsh no  

Allow wheel users to use sudo visudo

Now log in as that new user in another tty.

Clone this file from GitHub

After this, most things will be scripted.

mkdir -p ~/src/gists
cd ~/src/gists
git clone git://gist.github.com/3050547.git arch-config

Install configurations

Here we are going to configure git to use our name and email. We will install "dots" files, vim configuration, and my private configuration backups.

 ~/src/gists/arch-config/install-dots.sh

Install X

For this we will install X, copy over our backed-up monitor config, and set up Xmonad.

~/src/gists/arch-config/install-X.sh

Install things from the AUR

Install yaourt, dropbox, cdm

~/src/gists/arch-config/install-yaourt.sh

Install st

My favorite xterm from suckless.org

~/src/gists/arch-config/install-st.sh

Now reboot the computer and start in X

Setup github cert

Create SSH Keys

 ~/src/gists/arch-config/build-ssh-key.sh

Then upload ~/.ssh/id_rsa.pub to Github

The following need to be done after the ssh key has been uploaded to github.

install bin scripts

~/src/gists/arch-config/install-bin-scripts.sh

Mount okeanos

Remove the /media directory, install packages, and create the mount point sudo rm -r /media pacman -S cifs-utils samba sudo mkdir /mnt/okeanos

Now over the samba line from ~/src/conf/kronos/etc/fstab to /etc/fstab

ALSA

sudo pacman -S alsa-utils
alsamixer

The label MM below a channel indicates that the channel is muted, and 00 indicates that it is open. Alsa does not start muted no matter what the arch wiki page says.

 aplay /usr/share/sounds/alsa/Front_Center.wav

add @alsa to rc.conf DAEMONS array

Hosts

sudo cp ~/src/conf/kronos/etc/hosts /etc/hosts 

install mpd

~/src/gists/arch-config/install-mpd.sh

add @mpd to rc.conf DAEMONS array

Other software

Install other software that I use

audacity - sound editing tig - curses git viewer firefox - zipping utils - p7z rar zip zathura - pdf viewer

 ~/src/gists/arch-config/install-other-software.sh

Cups / Orpheus

sudo pacman -S cups cups-filters ghostscript gsfonts hplip
sudo cp ~/src/conf/kronos/etc/cups/cupsd.conf /etc/cups/
  • add @cupsd to rc.conf DAEMONS ARRAY
  • http://localhost:631
  • choose AppSocket/HP JetDirect
  • socket://orpheus:9100
  • hp printer
  • HP Photosmart 7510 Series hpijs, 3.12.6 (en)
  • set as server default
  • print test page

TBD:

ssh

mount a remote dir on iceland for easy file transfer

ssh-agent

For Proxying to proxies

Host internalmachine.mynet.com
   ProxyCommand ssh gateway.mynet.com exec nc %h %p

Newsbeuter

proxy

#!/bin/sh
# Create SSH Keys
# requires install-dots.sh
cd ~/.ssh
ssh-keygen -t rsa -C "nick@kronos" -b 4096
ln -nfs ~/src/conf/kronos/home/no/ssh/config ~/.ssh/config
ssh-copy-id iceland
#!/bin/sh
# install bin scripts
# this should be done after you have registered your public key with github
cd ~/src
git clone git@github.com:nick-orton/dumb-scripts.git
cd dumb-scripts
./install.sh
#!/bin/sh
# Set up git and clone the repos as read only
#configure git the way I like it
git config --global user.name "mr. no"
git config --global user.email "no@kronos"
#cache pwd for 15 mins
git config --global credential.helper cache
cd ~/src
# get my dots file
#
git clone git://github.com/nick-orton/dots.git
cd dots
./install.sh
ln -nfs ~/src/conf/kronos/http-proxies ~/.zsh/
# Install vim configuration
#
cd ~/src
git clone git://github.com/nick-orton/vim-config.git
cd vim-config
./README
# Other configs
#
cd ~/src
git clone https://github.com/nick-orton/conf.git
sudo cp ~/src/conf/kronos/etc/man_db.conf /etc/man_db.conf
sudo cp ~/src/conf/kronos/etc/inittab /etc/inittab
#!/bin/sh
# install mpd
# requires install-dots.sh install-okeanos
sudo pacman -S mpd ncmpc mpc
sudo cp ~/src/conf/kronos/etc/mpd.conf /etc/mpd.conf
cd /var/lib/mpd
sudo touch mpd.db mpd.pid mpdstate
sudo chown mpd mpd.db mpd.pid mpdstate
sudo chgrp mpd mpd.db mpd.pid mpdstate
echo "now go add @mpd to rc.conf DAEMONS array"
#!/bin/sh
# Other software
sudo pacman -S tig \
unzip unrar p7zip\
firefox \
audacity \
easytag \
zathura
#!/bin/sh
# Install st - suckless.org terminal
# requires install-dots.sh
cd /tmp/
wget http://hg.suckless.org/st/archive/0.2.1.tar.gz
tar xvf 0.2.1.tar.gz
cd st-0.2.1
cp ~/src/dots/st/st.config.h .
sudo make install
#!/bin/sh
# Install X and friends
# rewuires install-dots.sh has been run first
# install packages
#
sudo pacman -S xorg-server xorg-xinit xorg-twm xterm xorg-server-utils xf86-video-intel \
xmonad dmenu cabal-install feh trayer xmobar xmonad-contrib gmrun \
parcellite unclutter chromium flashplugin
# copy over the configuration for my monitor
#
sudo cp ~/src/conf/kronos/etc/X11/xorg.conf.d/90-monitor.conf /etc/X11/xorg.conf.d
# install xmonad desktop including yagenesh and xmobar
cd ~/src/dots/xmonad
./install-arch.sh
#!/bin/sh
# Install Packages from the AUR
# requires install-dots.sh
# install yaourt
#
cd /tmp
wget http://aur.archlinux.org/packages/package-query/package-query.tar.gz
tar zxvf package-query.tar.gz
cd package-query
makepkg -si
cd ..
wget http://aur.archlinux.org/packages/yaourt/yaourt.tar.gz
tar zxvf yaourt.tar.gz
cd yaourt
makepkg -si
cd ..
# Install DropBox
#
echo "choose option 6"
yaourt dropbox
yaourt dropbox-cli
dropbox start &
# Install CDM
#
yaourt cdm-git
sudo cp ~/src/conf/kronos/etc/cdmrc /etc/cdmrc
#!/bin/sh
# redownload stuff now that we have a key on file
cd ~/src
mv conf conf.bak
git clone git@github.com:nick-orton/conf.git
mv dots dots.bak
git clone git@github.com:nick-orton/dots.git
mv dots dots.bak
git clone git@github.com:nick-orton/dots.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment