main $ sudo pg_createcluster -e UTF-8 --locale C --start 11 main ίϯϑΟάϑΝΠϧ"/etc/postgresql/11/main/"ʹଘࡏ͠·͢ɻ ίϯϑΟάઃఆʹ͍ͭͯผͰઆ໌Λߦ͍·͢ɻ # cd /etc/postgresql/11/main/ # ls *.conf pg_ctl.conf pg_hba.conf pg_ident.conf postgresql.conf start.conf
restart -D /Library/PostgreSQL/11/data/“ $ sudo su postgres -c "/Library/PostgreSQL/11/bin/psql -c 'select version();'" version ———————————————————————————————————————————————— PostgreSQL 11.1 on x86_64-apple-darwin, compiled by Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit (1 row)
OPTIONS local all all peer host all all 127.0.0.1/32 ident host test1 all 192.168.2.8/30 reject host test1 all 192.168.2.0/24 md5 host all all 192.168.3.0/24 ident map=test1 - pg_ident.conf # MAPNAME SYSTEM-USERNAME PG-USERNAME test1 foo user1