Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3235454
  • 博文数量: 367
  • 博客积分: 9916
  • 博客等级: 中将
  • 技术积分: 7199
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-29 23:27
个人简介

简单!

文章分类

全部博文(367)

文章存档

2013年(51)

2012年(269)

2011年(47)

分类: Mysql/postgreSQL

2012-11-11 15:42:58

If we don't already have PostgreSQL installed, we must install it.

$ sudo apt-get install postgresql

This command installs the PostgreSQL server and various other packages.


$ sudo update-rc.d -f postgresql remove
Removing any system startup links for /etc/init.d/postgresql ...
 /etc/rc0.d/K21postgresql
 /etc/rc1.d/K21postgresql
/etc/rc2.d/S19postgresql
 /etc/rc3.d/S19postgresql
 /etc/rc4.d/S19postgresql
/etc/rc5.d/S19postgresql
/etc/rc6.d/K21postgresql

If we install the PostgreSQL database from packages, it is automatically added to the start up scripts of the operating system. If we are only learning to work with the database, it is unnecessary to start the database each time we boot the system. The above command removes any system startup links for the PostgreSQL database.


$ /etc/init.d/postgresql status
Running clusters: 9.1/main
$ service postgresql status
Running clusters: 9.1/main

We check if the PostgreSQL server is running. If not, we need to start the server.


$ sudo service postgresql start
* Starting PostgreSQL 9.1 database server [ OK ]

On Ubuntu Linux we can start the server with the service postgresql start command.


$ sudo service postgresql stop
 * Stopping PostgreSQL 9.1 database server [ OK ]

We use the service postgresql stop command to stop the PostgreSQL server.

阅读(13803) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册