Skip to content

Instantly share code, notes, and snippets.

@muhammadyana
Last active May 2, 2020 11:46
Show Gist options
  • Save muhammadyana/ac7673e065a008c21309eddaddf5197f to your computer and use it in GitHub Desktop.
Save muhammadyana/ac7673e065a008c21309eddaddf5197f to your computer and use it in GitHub Desktop.
UBUNTU SETUP FOR RAILS AND REACT

INSTALL ZSH

sudo apt install zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

AUTO SUGGESTION

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions plugins=(zsh-autosuggestions)

INSTALL REDIS

sudo apt update && sudo apt install redis-server

sudo nano /etc/redis/redis.conf

supervised systemd

sudo systemctl restart redis.service

INSTALL RVM

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

curl -sSL https://get.rvm.io | bash -s stable

source ~/.rvm/scripts/rvm

rvm requirements

nano ~/.gemrc

gem: --no-document

INSTALL POSTGRE

sudo apt update && sudo apt install postgresql postgresql-contrib

CREATE USER

sudo -i -u postgres

createuser --interactive

\password deploy

INSTALL MINIMAGICK

sudo apt-get update -y

sudo apt-get install -y ruby-mini-magick

INSTALL YARN

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 update && sudo apt install yarn

INSTALL NGINX

sudo apt update && sudo apt install nginx

sudo ufw app list

sudo ufw allow 'Nginx HTTP'

sudo ufw status

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