Install Ruby Slate NodeJS on CentOS 7

Slate is Beautiful static documentation for your API

Slate

Required

– Linux or OS X or Windows
– Ruby version 2.3.1 or newer
– NodeJS
– Bundler — gem install bundler

# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

Install Ruby 2.4 – CentOS 7

# yum update
# yum groupinstall “Development Tools”
# yum install epel-release

# yum install readline-devel zlib-devel libffi-devel libyaml-devel openssl-devel sqlite-devel

RVM (Ruby Version Manager) Allow you to install and manage multiple ruby environments.

# curl -sSL https://rvm.io/mpapis.asc | gpg --import -
# curl -L get.rvm.io | bash -s stable

# source /etc/profile.d/rvm.sh
# rvm reload

# rvm requirements run

Show available ruby versions
# rvm list known

Install Ruby 2.4

# rvm install 2.4
# rvm use 2.4 --default

Install Ruby Bundler

# gem install bundler

Install NodeJS for JavaScript Run-time Environment

# yum install nodejs npm

# cd /home/centos

Fork / Clone repository

# git clone https://github.com/svnlabs/slate.git

# cd slate

Allow / Open firewall port 4567 for Slate

# systemctl status firewalld

Like firewall-cmd –add-port=[YOUR PORT]/tcp

# firewall-cmd --permanent --add-port=4567/tcp

# systemctl restart firewalld

Run Slate locally

# bundle install
# bundle exec middleman server

Open URL in Browser http://server-ip-address:4567/#introduction

Now edit source files here “/home/centos/slate” as you need 😉

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch