From c25c4844ee441cea5e1d756141482fe68962379c Mon Sep 17 00:00:00 2001 From: James Blair Date: Sun, 1 Sep 2019 17:42:15 +1200 Subject: [PATCH] Added wsl-setup.org. --- readme.org | 17 +++++------ wsl-setup.org | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 9 deletions(-) create mode 100644 wsl-setup.org diff --git a/readme.org b/readme.org index 0770cf3..4ac115c 100644 --- a/readme.org +++ b/readme.org @@ -3,19 +3,18 @@ #+EMAIL: mail@jamesblair.net #+DATE: 1st September 2019 -* Introduction - This document captures my standard development environment for future replication - and aims to make it as easy as possible to setup and use. +This document captures my standard development environment for future replication +and aims to make it as easy as possible to setup and use. - The environment is based on Windows 10 using [[https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux][Windows Subsystem for Linux]] for a - command line interface. +The environment is based on Windows 10 using [[https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux][Windows Subsystem for Linux]] for a +command line inter face. - For pair programming I rely on [[https://www.gnu.org/software/emacs/][emacs]], specifically [[https://github.com/syl20bnr/spacemacs][spacemacs]] with [[https://tmate.io/][tmate]]. +For pair programming I rely on [[https://www.gnu.org/software/emacs/][emacs]], specifically [[https://github.com/syl20bnr/spacemacs][spacemacs]] with [[https://tmate.io/][tmate]]. - This documentation is split into two main sections: - - [[windows-setup.org][Windows 10]] - - [[wsl-setup.org][Windows Subsystem for Linux]] +This documentation is split into two main sections: + - [[windows-setup.org][Windows 10]] + - [[wsl-setup.org][Windows Subsystem for Linux]] diff --git a/wsl-setup.org b/wsl-setup.org new file mode 100644 index 0000000..493315a --- /dev/null +++ b/wsl-setup.org @@ -0,0 +1,84 @@ +#+TITLE: Windows Subsystem for Linux Setup +#+AUTHOR: James Blair +#+EMAIL: mail@jamesblair.net +#+DATE: 1st September 2019 + + +* Update and install packages + + To get started we ensure the package manager is up to date. + + #+NAME: Update system packages + #+BEGIN_SRC tmate + sudo apt-get update && sudo apt-get upgrade + #+END_SRC + + + Next we install a series of standard packages that form part of our workflow or + are dependencies for other tools in our environment. + + #+NAME: Install standard packages + #+BEGIN_SRC tmate + sudo apt-get install -y git curl wget tmate locales xclip tmux net-tools less + \ software-properties-common htop wget + #+END_SRC + + + We use [[https://pandoc.org/][pandoc]] for documentation export from spacemacs. + + #+NAME: Install pandoc + #+BEGIN_SRC tmate + curl -L -O https://github.com/jgm/pandoc/releases/download/2.7.3/pandoc-2.7.3-1-amd64.deb + sudo dpkg -i /tmp/pandoc-2.7.3-1-amd64.deb + #+END_SRC + + +* Install spacemacs + + A key component in our environment is spacemacs. The section below will setup + version ~27.0.50~ of emacs and then spacemacs on top. + + #+NAME: Clone the emacs repository + #+BEGIN_SRC tmate + git clone -b stable --depth=1 https://github.com/ii/emacs + #+END_SRC + + #+NAME: Install dependencies + #+BEGIN_SRC tmate + sudo apt-get install autoconf make gcc texinfo libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff5-dev libgnutls28-dev libncurses5-dev + #+END_SRC + + #+NAME: Compile and install emacs + #+BEGIN_SRC tmate + cd /emacs/ + ./autogen.sh + ./configure.sh + make + sudo make install + #+END_SRC + + After compiling and installing emacs we should verify that version ~27.0.50~ is + installed. + + #+BEGIN_SRC tmate + emacs --version + #+END_SRC + + +* Setup a local emacs pacakge mirror + + To save time we will setup a local mirror for all the LISP files that we need as part of spacemacs. + Depending on your machine and internet connection it may take some time to download, configure and compile. + + #+NAME: Setup local emacs elpa mirror + #+BEGIN_SRC tmate + sudo git clone --depth 1 -b stable https:/github.com/ii/elpa-mirror /usr/local/elpa-mirror + #+END_SRC + + Setup spacemacs within our home folder. + + #+BEGIN_SRC tmate + git clone --depth 1 -b stable --recurse-submodules https://github.com/ii/spacemacs.git ~/.emacs.d + ln -sf ~/.emacs.d/private/local/dot-spacemacs/.spacemacs ~/.spacemacs + emacs --batch -l ~/.emacs.d/init.el + #+END_SRC