SETUP POSTGRESQL

Run the following command to initialize Postgresql on your “VPS” href=”https://www.rosehosting.com” target=”_blank”>VPS and start the Postgresql database server using:

## postgresql-setup initdb
## systemctl start postgresql

check the status of the postgresql database server and add it to system’s startup using systemctl

## systemctl status postgresql
## systemctl enable postgresql

SETUP DATABASE

We need to create a new Postgresql database user and set a password for it. This user will be used by Stringer to access its database.

Create the user using:

## sudo -u postgres createuser -D -A -P stringer

Create a new database using:

## sudo -u postgres createdb -O stringer stringer_live

SETUP USER

For security reasons it is recommended to run Stringer under a separate user account on the VPS. So let’s create a new user named stringer using the following command:

## useradd stringer -m -s /bin/bash

next, switch to this newly created user account using su:

## su -l stringer

SETUP RUBY

For easier management of Ruby, we will use rbenv to setup specific Ruby version for the newly created account. So, make sure you are logged into your system with the stringer user account and located in your home directory which should be /home/stringer. Once you’re there, clone the rbenv repository using:

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Stringer and Ruby for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.