Skip to content

Instantly share code, notes, and snippets.

@majedbojan
Forked from mhmdAljefri/install.sh
Last active July 16, 2020 08:20
Show Gist options
  • Save majedbojan/0aca7b3ba3dd60c17a531fb11f305aa3 to your computer and use it in GitHub Desktop.
Save majedbojan/0aca7b3ba3dd60c17a531fb11f305aa3 to your computer and use it in GitHub Desktop.
Setup Ubuntu Server with Ngnix + MySQL + Redis + Git + RVM + Ruby 2.4.0 + Ruby On Rails
#!/bin/sh
# ngix + required packages
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install curl git-core nginx build-essential tcl8.5 -y
# mysql
# sudo apt-get install libmysqlclient-dev mysql-server
# PG
sudo apt-get install libpq-dev postgresql postgresql-contrib
# redis
cd ~
wget http://download.redis.io/releases/redis-stable.tar.gz
tar xzf redis-stable.tar.gz
cd redis-stable
make
make test
sudo make install
cd utils
sudo ./install_server.sh
# rvm
cd ~
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm requirements
rvm install 2.7.1
rvm use 2.7.1 --default
# Auto update rvm
echo rvm_autoupdate_flag=2 >> ~/.rvmrc
# rails
gem install rails -V --no-ri --no-rdoc
gem install bundler -V --no-ri --no-rdoc
gem install mysql2 -v '0.4.3'
gem install pg -v '1.0.0'
# generate ssh key
# ssh-keygen -t rsa
# cat ~/.ssh/id_rsa.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment