Basic software setup
After a fresh install of an operating system (Ubuntu 16.04 this afternoon for the record) there is the probably bigger task of getting all the applications etc set up and working. None of this is particularly rocket science but the quite a few caveats and little bits and pieces to getting everything how I want it. These are my notes to save me forgetting steps in the future.
Update all the packages in the repositories
sudo apt-get update
sudo apt-get upgrade
Gdebi is worth having around to help with other installations.
sudo apt-get install gdebi-core
Some straightforward things
Some occasionally used programmes and bits and bobs, nothing with much in the way terribly difficult installation.
sudo snap install inkscape
sudo apt-get install dia
sudo apt-get install texlive-full texstudio
sudo apt-get install haskell-platform
sudo apt-get install gawk
Snap is available by default on Ubuntu 16.04 but install with sudo apt install snapd
if not.
Ruby and Jekyll
ruby --version
Ubuntu 16.04 doesn’t seem to come with Ruby as default, but it is needed for Jekyll so grab both.
sudo apt-get install ruby-full
sudo gem install jekyll bundler
There are some other necessary ruby gems still missing. Making a test Jekyll website will flush these out. (It will ask for a password to allow it to “sudo” RubyGems).
jekyll new test1
Pandoc
Pandoc can be installed with a straightforward sudo apt-get install pandoc
but the Pandoc website advises against this as the version in the repository is rather out of date. Instead get the latest version from the pandoc github page - check the filename for the wget
command.
wget https://github.com/jgm/pandoc/releases/download/1.17.0.1/pandoc-1.17.0.1-1-amd64.deb
sudo gdebi pandoc-1.17.0.1-1-amd64.deb
rm pandoc-1.17.0.1-1-amd64.deb
Atom
This text editor continues to grow on me. It is not in the official repositories so add a PPA. Git is required for atom so is installed if not already.
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
Atom has highlighting for a number of languages out of the box but not R or Haskell so add these along with AWK (for pure bloodimindedness reasons) from Install a package on the “Get to know atom” page.
Git
Git should have been installed with Atom (git --version
to check, otherwise sudo apt-get install git
). Git wants some configuration information:-
git config --global user.name "<name>"
git config --global user.email <email address>
git config --list
Create an SSH key to connect to Github with. There is clear documentation of this here and I’m basically following that here. Can check for an existing SSH key with ls -al ~/.ssh
, but obviously there shouldn’t be one on a clean install.
ssh-keygen -t rsa -b 4096 -C "<email address>"
Press enter to save in the default location. Type and repeat a passphrase. The passphrase can be given to an SSH agent to avoid retyping it frequently and the key given to github:-
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
sudo apt-get install xclip
xclip -sel clip < ~/.ssh/id_rsa.pub
The public key should now be on the clipboard and can be pasted into github (“Settings” > “SSH and GPG keys”). Test this with ssh -T git@github.com
and answer “yes” at the prompt.
LibreOffice
LibreOffice should be installed by default but the UK dictionary isn’t. From Writer, select Tools, Spelling and Grammer, Options, Get more dictionaries online. A British dictionary is bundled with other English (US, Australian, etc) dictionaries, so search for “English”.
R and R Studio
It seems best to add one of the R mirrors to apt’s list of sources:-
sudo gedit /etc/apt/sources.list
and add a couple of lines at the bottom:-
# Repository for R
deb https://www.stats.bris.ac.uk/R/bin/linux/ubuntu xenial/
Now add the R key to Ubuntu’s keyring and install R.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install r-base-dev
R Studio doesn’t seem to be in a PPA or similar, which is a bit irritating so need to install it manually. Gdebi helps. Check the R studio website to make sure the wget
command is getting the latest version.
wget https://download1.rstudio.org/rstudio-1.0.143-amd64.deb
Lets check the download integrity with md5sum
before installing. The checksums are on the R studio website. md5sum
expects to be passed a file as input with each line containing a checksum and a matching file name. echo
will create such a file - one line long as there is only one file to check.
echo 75761eae209158d8415d562b3771fbec rstudio-1.0.143-amd64.deb >rstudio.md5
md5sum -c rstudio.md5
Carry on with the installation:-
sudo gdebi -n rstudio-1.0.143-amd64.deb
rm rstudio-1.0.143-amd64.deb rstudio.md5
I want to install the tidyverse set of R packages. This seems to require a couple of other things to be in place before running the install.packages()
command in R, otherwise there are errors with a couple of the packages. The last library is not necessary for the tidyverse libraries but is for googleAuthR.
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libxml2-dev
sudo apt-get install libssl-dev
sudo apt-get install libssh2-1-dev
Load up R Studio and hopefully we can now install the R packages.
install.packages(c("tidyverse", "googleAuthR"))
It is probably still worth watching the R output to make sure there are no futher errors to sort out.
Cochrane RevMan
Cochrane RevMan is a bit of software for systematic reviews. It is a slight pain to set up under linux so I’m going to put this in a separate post. I think they are planning to replace it with a web based version in due course.
Qt
Qt is free to download provided you use the LGPLv3 for stuff created with it. It also requires registration. As always, check the current filename.
wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
chmod +x qt-unified-linux-x64-online.run
./qt-unified-linux-x64-online.run
The installer will ask for an email address and password. It is possible that Qt wants some additional libraries but these were all in place already for me. Finally clean up the installer.
rm qt-unified-linux-x64-online.run
Cleaning up at the end
May need to remove any downloaded .deb etc files with rm
if not done so after individual programme installs. There may also be a need to run autoremove:-
sudo apt autoremove