postgressql

参考文章

FreeBSD10.0下ports安装postgresql9.4-server:

http://download.csdn.net/detail/machen_smiling/8425613

http://blog.csdn.net/heiyeshuwu/article/details/107969

http://www.jb51.net/article/61222.htm

http://blog.163.com/digoal@126/blog/static/163877040201451181344545/

-----------------------------------------------------------------------------------

一、安装postgresql9.4

http://www.pgsqldb.org/pgsqldoc-7.4/tutorial-start.html

1-  ports方式安装 postgresql9.4-server

cd /usr/ports/databases/postgresql94-server
make install celan

2-初始化数据库

//创建postgres用户
pw user add postgres
//创建数据库目录
mkdir -p /sql/pgsql/date
//目录权限
chown postgres /sql/pgsql/date
//切换用户
su postgres
//初始化数据库
/usr/local/bin/initdb -D /sql/pgsql/date

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:

    /usr/local/bin/postgres -D /sql/pgsql/date
or
    /usr/local/bin/pg_ctl -D /sql/pgsql/date -l logfile start

你可能感兴趣的:(postgressql)