sudo-s (root into the folder)
export PGDATA=/var/lib/pgsql/9.6/data
Restart postgres: ./pg_ctl restart
/var/lib/pgsql/data
/usr/bin/pg_ctl /usr/pgsql-9.6/bin/pg_ctl
postgres change password
sudo su postgres
psql
alter user postgres with password 'new password';
psql reads the .sql file and initializes the database
psql -d qing_lapp -f /data/init.sql
psql modify field type ALTER TABLE tbl_name ALTER COLUMN col_name TYPE varchar (11);
Postgres installation steps:
yum install postgresql-server (pg will be installed by the way)
service postgresql initdb (initialize database, and configuration file)
Then modify pg_hba.conf and postgresql.conf under data
Some addresses of pg_hba.conf do not support all, you can write 0.0.0.0/0 or not write all, it is safe