Skip to content

Instantly share code, notes, and snippets.

@iangow
Forked from anonymous/setup_ubuntu.md
Last active July 25, 2017 22:37
Show Gist options
  • Save iangow/2beffd769499b5063efc0f47031ff157 to your computer and use it in GitHub Desktop.
Save iangow/2beffd769499b5063efc0f47031ff157 to your computer and use it in GitHub Desktop.
Setting up my Ubuntu computer

1. Install Ubuntu

I installed 17.04 ("Zesty Zapus")

2. Install drivers

I have an HP machine and I installed drivers for it from the CD.

3. Install PostgreSQL

I followed instructions found here. Except I should have replaced

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

with

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ zesty-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

4. Install R

I followed instructions here except that I replaced xenial with zesty in step 1. (Also I did not follow instructions here for installing RStudio.)

5. Install RStudio

I followed instructions here.

6. Install SSH server

See here:

sudo apt-get install openssh-server
@iangow
Copy link
Author

iangow commented Jul 20, 2017

pg_dumpall -h 10.101.13.21 --no-tablespaces | psql -d postgres

@iangow
Copy link
Author

iangow commented Jul 20, 2017

Add users following instructions here.

@iangow
Copy link
Author

iangow commented Jul 20, 2017

Edit pg_hba.conf to include line host all all 0.0.0.0/0 md5.

To locate pg_hba.conf do this:

igow@igow-z640:~$ psql -d crsp
psql (9.6.3)
Type "help" for help.

crsp=# SHOW hba_file ;
               hba_file               
--------------------------------------
 /etc/postgresql/9.6/main/pg_hba.conf
(1 row)

@iangow
Copy link
Author

iangow commented Jul 20, 2017

Using this code (obtained here:

comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

I get the following output

cmake
gdebi-core
git
htop
iotop
jupyter-core
jupyter-nbextension-jupyter-js-widgets
jupyter-notebook
libbz2-dev
libdbd-pg-perl
libgstreamer0.10-0
libgstreamer-plugins-base0.10-0
libjpeg62
libpam0g-dev
libreadline-dev
libxml2-dev
libxslt1-dev
openssh-server
pgadmin3
postgresql
postgresql-9.6-plr
postgresql-contrib
postgresql-plperl-9.6
postgresql-plpython-9.6
postgresql-server-dev-9.6
python3-dev
python3-notebook
python3-pandas
python3-paramiko
python3-pip
python3-psycopg2
python3-sqlalchemy
r-base
r-base-core
r-cran-httr
rstudio
rstudio-server
texlive
vim-gtk
vnc4server

@iangow
Copy link
Author

iangow commented Jul 21, 2017

Last step in installing RPostgreSQL:

devtools::install_github("tomoakin/RPostgreSQL", subdir="RPostgreSQL")

@iangow
Copy link
Author

iangow commented Jul 22, 2017

sudo shutdown -r now

@iangow
Copy link
Author

iangow commented Jul 22, 2017

sudo apt-get update        # Fetches the list of available updates
sudo apt-get upgrade       # Strictly upgrades the current packages
sudo apt-get dist-upgrade  # Installs updates (new ones)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment