Skip to content

Instantly share code, notes, and snippets.

@mhmdAljefri
Forked from ali-sheiba/install.sh
Last active February 27, 2019 14:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mhmdAljefri/a5a101094b71cdc38aac99231a04ac10 to your computer and use it in GitHub Desktop.
Save mhmdAljefri/a5a101094b71cdc38aac99231a04ac10 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 update
sudo apt upgrade -y
sudo apt install curl git-core nginx build-essential tcl8.5 -y
sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
# mysql
# sudo apt install libmysqlclient-dev mysql-server
# PG
sudo apt 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 ~
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm reload
rvm requirements
rvm install 2.6.0
rvm use 2.6.0 --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
@MohamedBasaleh
Copy link

thnx

Copy link

ghost commented Dec 28, 2017

Thanks

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