Guide to setting up a new Ubuntu 22.04 dev environment with Ruby, Elixir and Node.js installed with the asdf version management tool, as well as Flutter and Rust along with PostgreSQL w/ PostGIS.
Some of these packages may already be installed
sudo apt-get install autoconf automake make binutils build-essential curl \
bison dnsutils g++ gcc gdal-bin git \
htop imagemagick libaio-dev libacl1-dev libbz2-dev libcurl4-openssl-dev libevent-dev \
libexpat1-dev libffi-dev libgdal-dev libgeos3.10.2 libgeos-dev libgeos++-dev \
libjpeg-turbo8-dev liblzma-dev libmapnik-dev libncurses-dev \
libpcre3-dev libproj-dev libpq-dev libreadline-dev libssl-dev libtool libxml2-dev \
libxml2-utils libxslt1-dev libyaml-dev mapnik-utils \
nginx postfix postgresql-14 postgresql-14-postgis-3 postgresql-14-pgrouting \
python3-dev python3-gdal python3-pip python3-numpy python3-numpy python3-pip \
python3-setuptools redis-server unixodbc-dev libmagickwand-dev \
xfonts-75dpi xsltproc zlib1g-dev p7zip-full libncurses-dev libncurses5-dev \
libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libssh-dev xsltproc fop \
libxml2-utils tmux vim emacs libgdbm-dev inotify-tools openjdk-11-jdk libvips42
When postfix install prompt shows up (Choose satellite system)
Set name and email for commits
git config --global user.name "Your Name"
git config --global user.email [email protected]
Generate an SSH keypair
ssh-keygen -t ed25519 -C "[email protected]"
Copy the output of this command and paste into github SSH key settings.
cat ~/.ssh/id_ed25519.pub
Check to make sure SSH to github works with your key
ssh -T [email protected]
Set postgres user password
sudo -u postgres createuser myuser -s
sudo -u postgres psql
postgres=# \password myuser
# set postgres password as postgres
postgres=# \password
sudo apt-get install zsh fonts-powerline
chsh -s $(which zsh)
# logout and back in
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.12.0
add asdf plugin to ohmyzsh plugins
vim ~/.zshrc
Find the plugins line and update to this:
plugins=(git asdf)
Reload your shell
source ~/.zshrc
Double check asdf command works
asdf
asdf plugin-add ruby
asdf install ruby 3.2.2
asdf global ruby 3.2.2
ruby -v
Install bundler and rails
gem install bundler
gem install rails
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs lts
asdf global nodejs lts
node -v
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install --no-install-recommends yarn
asdf plugin-add erlang
asdf install erlang 26.0.2
asdf global erlang 26.0.2
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
asdf install elixir 1.15.2-otp-26
asdf global elixir 1.15.2-otp-26
elixir -v
mix local.hex
mix archive.install hex phx_new
- https://ubuntu.com/blog/getting-started-with-flutter-on-ubuntu
- https://docs.flutter.dev/get-started/install/linux
Install rust with rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Download the latest ubuntu deb package
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
Install
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb