DSpace CRIS
การติดตั้ง PostgreSQL เพื่อใช้งานกับ DSpace CRIS
สิ่งที่จำเป็นต้องทำเพื่อให้สามารถเข้าถึง PostgreSQL ได้
เมื่อเข้าติดตั้งและเข้า
psql
ได้แล้วให้ทำการแก้ไขรหัสผ่านของผู้ใช้postgres
ก่อนเลยALTER USER postgres WITH PASSWORD 'postgres'; // ALTER USER <username> WITH PASSWORD '<password>';
เมื่อทำการเปลี่ยนรหัสผ่านแล้วก็ให้เข้าไปแก้ไฟล์
pg_hba.conf
เพื่อใช้ MD5ไฟล์อยู่
/var/lib/pgsql/data/pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 # Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres peer #host replication postgres 127.0.0.1/32 ident #host replication postgres ::1/128 ident
เริ่มติดตั้งด้วยคำสั่ง
$ sudo yum install postgresql-contrib postgresql-server
สั่งให้ทำการ Initial Database
$ sudo postgresql-setup initdb
$ sudo systemctl start postgresql
$ sudo systemctl enable postgresql
สร้าง User และ Database
$ createuser --username=postgres --no-superuser --pwprompt dspace
$ createdb --username=postgres --owner=dspace --encoding=UNICODE dspace