Install Ruby on Sakura's VPS

Please refer to the following articles for the environment etc. Ssh connection to Sakura's VPS + minimum security measures

Install Git

First, install git to use git clone.

$ sudo yum -y install git
$ git --version

Install rbenv

Install rbenv, a tool for managing Ruby versions.

$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build #'rbenv install'Plugins required to execute commands

Install dependent packages

This is a related package for installing ruby. Without this, it seems to be moss when rbenv install.

$ yum -y install bzip2 gcc openssl-devel readline-devel zlib-devel

rbenv read settings

Edit the bash_profile that is loaded at shell startup so that you can use the rbenv command.

$ vi ~/.bash_profile

~/.bash_profile


#abridgement
PATH=$PATH:$HOME/bin

export PATH
export PATH="$HOME/.rbenv/bin:$PATH" #Postscript
eval "$(rbenv init -)" #Postscript
$ source ~/.bash_profile
$ rbenv -v

Install Ruby

Now that the rbenv settings are complete, it's time to install Ruby.

$ rbenv install 2.4.1
$ rbenv global 2.4.1
$ rbenv rehash
$ ruby -v

Install bundler

Install the tool bundler that makes managing gems nice.

$ gem install bundler

Install node.js and yarn

Yarn is required to run Rails6.

$ yum install -y nodejs npm --enablerepo=epel
$ npm install -g yarn

reference

-[(For beginners) Until you sign up for vps and deploy the Rails app on capistrano3 [Part 1 Server Settings]](https://qiita.com/ryo2132/items/f62690f0b16ec11270fe#5-mysql%E3%81 % AE% E8% A8% AD% E5% AE% 9A)

Recommended Posts

Install Ruby on Sakura's VPS
Install tomcat on Sakura's VPS
Install Ruby on Ubuntu 20.04
Install Ruby 2.7 on RHEL 8 (AppStream)
Install Ruby 2.7 on CentOS 7 (SCL)
Install Ruby on MSYS2 with pacman
[Ruby on Rails] yarn install --check-files
Install Ruby 2.5 on CentOS 7 using SCL
Install ruby on Ubuntu 20.04 with rbenv
Install Ruby / Rails on Mac M1 Big Sur 2021-01
[Ruby on Rails] How to install Bootstrap in Rails
Install gradle on mac
Install Corretto 8 on Windows
Install Ruby 3.0.0 with asdf
Install OpenJDK on macOS
Install Java on Mac
Install Golang on CentOS 8
Install pyqt5 on ubuntu
Install Neo4j 4.1.3 on centOS
Install Docker on Manjaro
Install Vertica 10.0 on CentOS 6.10
Install PostgreSQL 12 on Centos8
Install nginx on centOS7
Install lombok on SpringToolSuite4
Ruby on Rails Elementary
Ruby on Rails basics
Install Python 3 on CentOS 7
Install kuromoji on CentOS7
Install Autoware on Ubuntu 18.04.5
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
Install openjdk11 on mac
Ruby On Rails Association
Install Homebrew on Ubuntu 20.04
Install Redmine 4.1.1 on CentOS 7
Install OpenJDK 8 on mac
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
How to install Ruby on an EC2 instance on AWS
[Ruby] I can't install puma on Mac [Rails, etc.]
Install Ruby 3.0.0-preview1 on macOS (also without Homebrew ruby-build)
Install rbenv with apt on ubuntu and put ruby
Install Docker on Raspberry Pi
Install Docker on Windows 10 PRO
Install OpenJDK7 (JAVA) on ubuntu 14.04
Ruby on rails learning record -2020.10.03
Install Cybozu Office 10 on Ubuntu 20.4
Install Docker on Ubuntu Server 20.04
Portfolio creation Ruby on Rails
Install Sidekiq pro on Rails
Ruby on rails learning record -2020.10.04
Ruby on rails learning record -2020.10.09
Ruby on Rails config configuration
Install rbenv on Amazon Linux
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
Ruby on Rails basic learning ①
Install OpenFOAM v2006 on CentOS
[Ruby on Rails] about has_secure_password
Install Arudino IDE on Ubuntu 20
Ruby on rails learning record-2020.10.07 ②