138 psql
139 /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
140 history
-bash-4.2$ /usr/pgsql-9.6/bin
-bash: /usr/pgsql-9.6/bin: Is a directory
-bash-4.2$ cd /usr/pgsql-9.6/bin
-bash-4.2$ wpd
-bash: wpd: command not found
-bash-4.2$ pwd
/usr/pgsql-9.6/bin
-bash-4.2$ in
in infotocap install-info intltoolize
indent init installkernel intltool-merge
info innochecksum intel-microcode2ucode intltool-prepare
infocmp insmod interdiff intltool-update
infokey install intltool-extract
-bash-4.2$ in
in infotocap install-info intltoolize
indent init installkernel intltool-merge
info innochecksum intel-microcode2ucode intltool-prepare
infocmp insmod interdiff intltool-update
infokey install intltool-extract
-bash-4.2$ ls
clusterdb ecpg pg_controldata pg_resetxlog pg_xlogdump postmaster
createdb initdb pg_ctl pg_restore pltcl_delmod psql
createlang oid2name pg_dump pg_rewind pltcl_listmod reindexdb
createuser pg_archivecleanup pg_dumpall pg_standby pltcl_loadmod vacuumdb
dropdb pg_basebackup pg_isready pg_test_fsync postgres vacuumlo
droplang pgbench pg_receivexlog pg_test_timing postgresql96-check-db-dir
dropuser pg_config pg_recvlogical pg_upgrade postgresql96-setup
-bash-4.2$ ./initdb
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
creating directory /var/lib/pgsql/9.6/Data/pgdata ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
./pg_ctl -D /var/lib/pgsql/9.6/Data/pgdata -l logfile start
-bash-4.2$ ./pg_ctl -D /var/lib/pgsql/9.6/Data/pgdata -l logfile start
server starting
-bash-4.2$ /bin/sh: logfile: Permission denied
psql (9.6.5)
Type "help" for help.
postgres=# select * from pg_shadow;
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig
----------+----------+-------------+----------+---------+--------------+--------+----------+-----------
postgres | 10 | t | t | t | t | | |
(1 row)
postgres=# alter user postgres with password 'NEWPASSWORD';
ALTER ROLE
postgres=# select * from pg_shadow;
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd
| valuntil | useconfig
----------+----------+-------------+----------+---------+--------------+----------------------------------
---+----------+-----------
postgres | 10 | t | t | t | t | md5123123123123d71a6ca9e1231dad4816
3d | |
(1 row)
postgres-# \q
-bash-4.2$ ./create
createdb createlang createuser
-bash-4.2$ ./create
createdb createlang createuser
-bash-4.2$ ./create
createdb createlang createuser
-bash-4.2$ ./create
createdb createlang createuser
-bash-4.2$ ./createuser --interactive
Enter name of role to add: USERNAME
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
-bash-4.2$ ./psql
psql (9.6.5)
Type "help" for help.
postgres=# alter user USERNAME with password 'NEWPASSWORD';
ALTER ROLE
postgres=#
'Server > Centos' 카테고리의 다른 글
centos 6.x snmp.conf 예제 (0) | 2015.07.13 |
---|