CentOS8.2 (x86_64) + ruby2.5 + Rails5.2 + MariaDB (10.3.17) environment construction

Environment construction procedure memo

yum update -y
yum install -y git
yum install -y bzip2 gcc openssl-devel readline-devel zlib-devel
dnf module list ruby
dnf module -y install ruby:2.5
ruby -v
dnf -y install ruby-devel rpm-build make gcc gcc-c++ gcc-gdb-plugin libxml2 libxml2-devel mariadb-devel zlib-devel libxslt-devel nodejs
gem install bundler
gem install nokogiri -- --use-system-libraries
gem install rails --version="~>5.0" --no-ri --no-rdoc
rails -v
gem install mysql2 --no-ri --no-rdoc -- --with-mysql-config=/usr/bin/mysql_config
rails new SampleApp -d mysql
cd SampleApp
vi config/database.yml
default: &default
  adapter: mysql2
  encoding: utf8
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  username: root
  password: password   #MariaDB connection password
  socket: /var/lib/mysql/mysql.sock
dnf info mariadb-server mariadb mariadb-devel
dnf install -y mariadb-server mariadb mariadb-devel
systemctl start mariadb
systemctl enable mariadb
systemctl status mariadb
mysql_secure_installation
rails db:create
rails generate scaffold testapp name:string title:string body:text
rails db:migrate
rails server --binding=0.0.0.0

setenforce 0
firewall-cmd --zone=public --add-port=3000/tcp --permanent
firewall-cmd --reload


http://172.16.1.xxx:3000/


Recommended Posts

CentOS8.2 (x86_64) + ruby2.5 + Rails5.2 + MariaDB (10.3.17) environment construction
Rails engineer environment construction ruby2.7.1
Rails environment construction Rails5.2.1 ruby2.5.1 Catalina
Ruby on Rails 6.0 environment construction memo
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
Muscle Ruby on Rails Day 1 ~ Environment Construction ~
Rails Docker environment construction
[Personal memo] Ruby on Rails environment construction (Windows)
Ruby on Rails development environment construction on M1 Mac
Rails6 development environment construction [Mac]
[Environment construction] Ruby on Rails 5.2 system development environment construction [within 1 hour]
[Docker] Rails 5.2 environment construction with docker
A memorandum when building an environment with Ruby3.0 x Rails6.1 x Docker x CentOS Stream
Offline environment construction Ruby edition
Ruby on Rails environment construction using VirtualBox, Vagrant, cyberduck
[Super easy] Ruby environment construction
[Rails / MySQL] Mac environment construction
Offline environment construction CentOS edition
From 0 to Ruby on Rails environment construction [macOS] (From Homebrew installation to Rails installation)
[Procedure 1 for beginners] Ruby on Rails: Construction of development environment
[Environment construction] Get the Ruby on Rails 6 development environment within 1 hour
Rails + MySQL environment construction with Docker
Ruby environment construction summary ~ mac version ~
Rails on Docker environment construction procedure
[Environment construction with Docker] Rails 6 & MySQL 8
CentOS8 + Anaconda 4.9.2 + jupyterhub environment construction procedure
Troublesome Rails environment construction flow [Windows 10]
[Environment construction] Uninstall rails from local
[Rails] AWS EC2 instance environment construction
Ruby on Rails --From environment construction to simple application development on WSL2
Ruby on Rails development environment construction with Docker + VSCode (Remote Container)
"Rails 6 x MySQL 8" Docker environment construction procedure for sharing with teams
CentOS8 + Anaconda + Django development environment construction procedure
[Processing x Java] Construction of development environment
Rails environment construction with Docker (personal apocalypse)
Rails API server environment construction using docker-compose
Rails & React & Webpacker & MySQL Environment Construction Manual
[Rails API x Docker] Easy environment construction with shell & operation check with Flutter
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
Environment construction of Ruby on Rails from 0 [Cloud9] (From Ruby version change to Rails installation)
[Error] Switch environment construction to use Ruby on Rails oss (open source)
How to solve the local environment construction of Ruby on Rails (MAC)!
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
Install MariaDB (CentOS 8)
How to link Rails6 Vue (from environment construction)
Introducing Rspec with Ruby on Rails x Docker
[Java] Environment construction
Rails6 [API mode] + MySQL5.7 environment construction with Docker
Java environment construction
[Ruby on Rails] Let's build an environment on mac
[Spring] Environment construction
Docker environment construction
Build a Ruby on Rails development environment on AWS Cloud9
virtulbox + vagrant + Docker + nginx + puma + MySQL Rails environment construction
Docker the development environment of Ruby on Rails project
Stable development environment construction manual for "Rails6" with "Docker-compose"
Environment construction of Rails5 + MySQL8.0 + top-level volumes with docker-compose
CentOS8 + nginx1.18 + php-fpm7.4 + MariaDB10.5 + CodeIgniter4 development environment preparation memo
Build Rails (API) x MySQL x Nuxt.js environment with Docker
[Ruby on Rails] From MySQL construction to database change
Penronse environment construction [Windows]