[Note] Setup PostgreSQL
因為練習上的需要,所以架設了一個PosgreSQL服務,想想還是紀錄一下比較保險:
// Install required packages
dnf install php-pgsql postgresql-server
// Change user to "postgres"
su postgres
//Initial DB
initdb -D /var/lib/pgsql/data/;
psql --> enter postgresql shell--
CREATE DATABASE ;
create user root with encrypted password '111111';
GRANT ALL PRIVILEGES ON DATABASE larablog TO root;
//Exit the command mode
\q --> exit