Last active
February 5, 2025 18:21
-
-
Save ali-sheiba/4081df7701f8820bb51b2b9ee8e55192 to your computer and use it in GitHub Desktop.
Setup Ubuntu Server with Ngnix + MySQL + Redis + Git + RVM + Ruby 2.5.0 + Ruby On Rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# Install ImageMagick | |
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev libmagic-dev | |
# 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 ~ | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
curl -sSL https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
rvm requirements | |
rvm install 2.5.0 | |
rvm use 2.5.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 '0.19.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