| Enter password for new role: (新密码)
Enter it again: (确认密码)
Shall the new role be a superuser? (y/n) y (使该用户拥有超级用户权限y/n) 如果输入y,下面两项将不再出现
Shall the new role be allowed to create databases?(y/n) (使该用户拥有创建新数据库的权限y/n)
Shall the new role be allowed to create more new roles?(y/n) (使该用户拥有新用户创建的权限y/n)
$/usr/local/bin/createdb -O admin -E UNICODE phpbb
*(为admin用户创建一个编码为UTF-8的phpbb数据库,注意大小写,admin必须拥有superuser权限)*
CREATE DATABASE
$exit
七、配置postgresql
#vi /var/postgresql/data/pg_hba.conf
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only local postgres all trust # IPv4 local connections: host all all 0.0.0.0 0.0.0.0 md5 * 密码认证
#vi /var/postgresql/data/postgresql.conf
改:
CODE:[Copy to clipboard]#listen_addresses = 'localhost'
#port = 5432
#unix_socket_permissions = 0777
#authentication_timeout = 60
#password_encryption = on
#db_user_namespace = off
为:
listen_addresses = '*'
port = 5432
unix_socket_permissions = 0700
authentication_timeout = 60
password_encryption = on
db_user_namespace = off :wq
上一页 [1] [2] [3] 下一页
八、安装并配置phpPgAdmin-4.0.1
#pkg_add -r php5-pgsql-5.1.4.tgz
#/usr/local/sbin/phpxs -a pgsql
网上下载phpPgAdmin-4.0.1.tar.gz 到 /var/www/htdocs
#tar zxf phpPgAdmin-4.0.1.tar.gz
#mv phpPgAdmin-4.0.1 pgadmin
*改个容易记住的名字,当然你喜欢长文件名不改也行~_~
#vi /var/www/htdocs/pgadmin/conf/config.inc.php
CODE:[Copy to clipboard]改:
$conf['servers'][0]['host'] = '';
$conf['servers'][0]['defaultdb'] = 'Template1';
$conf['extra_login_security'] = true;
为:
$conf['servers'][0]['host'] = 'localhost'; * 指定postgresql 在本机
&nb 上一页 [1] [2] [3] 下一页
|