11.2. Setting up the database
Rails applications are almost always used with a database. For local development use the PostgreSQL database.
Procedure
Install the database:
$ sudo yum install -y postgresql postgresql-server postgresql-develInitialize the database:
$ sudo postgresql-setup initdbThis command creates the
/var/lib/pgsql/datadirectory, in which the data is stored.Start the database:
$ sudo systemctl start postgresql.serviceWhen the database is running, create your
railsuser:$ sudo -u postgres createuser -s railsNote that the user created has no password.