how to set up automatically startup database when the server boot or reboot.

Started by leaf_yxjalmost 14 years ago14 messagesgeneral
Jump to latest
#1leaf_yxj
leaf_yxj@163.com

My company want to setup automatically startup database. For oracle database,
there is a bullitin script and configuration of auto start when the server
boot or reboot? Hi Guys, Please help. Thanks. Regards.Grace

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670442.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: leaf_yxj (#1)
Re: how to set up automatically startup database when the server boot or reboot.

PostgreSQL runs on numerous operating systems. If you do not specify which one you are using, as well as how you went about installing PostgreSQl, no one is going to be able to help you. The PostgreSQL version would probably help as well.

David J.

On Apr 27, 2012, at 10:26, leaf_yxj <leaf_yxj@163.com> wrote:

Show quoted text

My company want to setup automatically startup database. For oracle database,
there is a bullitin script and configuration of auto start when the server
boot or reboot? Hi Guys, Please help. Thanks. Regards.Grace

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670442.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3leaf_yxj
leaf_yxj@163.com
In reply to: David G. Johnston (#2)
Re: how to set up automatically startup database when the server boot or reboot.

David, Thanks for your reminder. My database version is 8.2.15. And My os platform is Linux 5.5. Thanks I really appreciate it. Grace

At 2012-04-27 22:38:11,"David Johnston [via PostgreSQL]" <ml-node+s1045698n5670481h53@n5.nabble.com> wrote:
PostgreSQL runs on numerous operating systems. If you do not specify which one you are using, as well as how you went about installing PostgreSQl, no one is going to be able to help you. The PostgreSQL version would probably help as well.

David J.

On Apr 27, 2012, at 10:26, leaf_yxj <[hidden email]> wrote:

My company want to setup automatically startup database. For oracle database,
there is a bullitin script and configuration of auto start when the server
boot or reboot? Hi Guys, Please help. Thanks. Regards.Grace

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670442.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
Sent via pgsql-general mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

If you reply to this email, your message will be added to the discussion below:
http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670481.html
To unsubscribe from how to set up automatically startup database when the server boot or reboot., click here.
NAML

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670496.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

#4leaf_yxj
leaf_yxj@163.com
In reply to: David G. Johnston (#2)
Re: how to set up automatically startup database when the server boot or reboot.

David, Thanks for your reminder. My database version is 8.2.15. And My os platform is Linux 5.5. Thanks I really appreciate it. Grace

At 2012-04-27 22:36:51,"David Johnston" <polobo@yahoo.com> wrote:

Show quoted text

PostgreSQL runs on numerous operating systems. If you do not specify which one you are using, as well as how you went about installing PostgreSQl, no one is going to be able to help you. The PostgreSQL version would probably help as well.

David J.

On Apr 27, 2012, at 10:26, leaf_yxj <leaf_yxj@163.com> wrote:

My company want to setup automatically startup database. For oracle database,
there is a bullitin script and configuration of auto start when the server
boot or reboot? Hi Guys, Please help. Thanks. Regards.Grace

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670442.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5leaf_yxj
leaf_yxj@163.com
In reply to: leaf_yxj (#1)
Re: how to set up automatically startup database when the server boot or reboot.

David, Thanks for your reminder. My database version is 8.2.15. And My os
platform is Linux 5.5. Thanks I really appreciate it. Grace

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670504.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

#6David G. Johnston
david.g.johnston@gmail.com
In reply to: leaf_yxj (#4)
Re: how to set up automatically startup database when the server boot or reboot.

FYI: While is won’t impact this particular response the 8.2 release is no
longer supported.

Also, Linux has various flavors and while they are similar in many ways the
distribution that you are using is good information to provide.

I will assume you installed PostgreSQL via a package manager but you should
also state that explicitly.

Dave

From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of yxj
Sent: Friday, April 27, 2012 10:46 AM
To: David Johnston
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] how to set up automatically startup database when the
server boot or reboot.

David, Thanks for your reminder. My database version is 8.2.15. And My os
platform is Linux 5.5. Thanks I really appreciate it. Grace

At 2012-04-27 22:36:51,"David Johnston" <polobo@yahoo.com> wrote:

PostgreSQL runs on numerous operating systems. If you do not specify which

one you are using, as well as how you went about installing PostgreSQl, no
one is going to be able to help you. The PostgreSQL version would probably
help as well.

David J.

On Apr 27, 2012, at 10:26, leaf_yxj <leaf_yxj@163.com> wrote:

My company want to setup automatically startup database. For oracle

database,

there is a bullitin script and configuration of auto start when the

server

boot or reboot? Hi Guys, Please help. Thanks. Regards.Grace

--
View this message in context:

http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-
database-when-the-server-boot-or-reboot-tp5670442p5670442.html

Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

_____

<http://www.lofter.com&gt; 网易Lofter,专注兴趣,分享创作!

#7Alban Hertroys
haramrae@gmail.com
In reply to: leaf_yxj (#5)
Re: Re: how to set up automatically startup database when the server boot or reboot.

On 27 April 2012 16:47, leaf_yxj <leaf_yxj@163.com> wrote:

David, Thanks for your reminder. My database version is 8.2.15. And My os
platform is Linux 5.5.  Thanks I really appreciate it. Grace

There is no such thing as Linux 5.5.

But since you're on _a_ Linux distribution (there are many), you'll
probably find some script in /etc/init.d/ that's used to start the DB
at boot. Check the documentation of your OS for how to go about that.

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

#8leaf_yxj
leaf_yxj@163.com
In reply to: Alban Hertroys (#7)
Re: how to set up automatically startup database when the server boot or reboot.

My os is redhat linux 5.5. And My database is greenplum 4.2.1( postgresql
8.2.15). I will take a look about the init.d directory.

Thanks. Guys. Any opinion is welcome. Please help.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670905.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

#9hb@101-factory.eu
hb@101-factory.eu
In reply to: leaf_yxj (#8)
Re: Re: how to set up automatically startup database when the server boot or reboot.

are there any usefull startup script when eiunning in master slave setup with pg pool?

Henk

On 27 apr. 2012, at 19:22, leaf_yxj <leaf_yxj@163.com> wrote:

Show quoted text

My os is redhat linux 5.5. And My database is greenplum 4.2.1( postgresql
8.2.15). I will take a look about the init.d directory.

Thanks. Guys. Any opinion is welcome. Please help.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670905.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#10Michael Nolan
htfoot@gmail.com
In reply to: leaf_yxj (#8)
Re: Re: how to set up automatically startup database when the server boot or reboot.

Your options range from doing something simple to something complex.

A simple option on a Linux server would be placing a command like this in
/etc/rc/rc.local:

su - postgres -C "/usr/local/pgsql/bin/pg_ctl -D ;/usr/local/pgsql/data -l
/usr/local/pgsql/logfile start"

However, that might not be the optimal choice for every situation, because
it doesn't take into account WHY the system rebooted. A system that
rebooted because of a power/UPS issue might need to be treated differently
than one that rebooted because of a hardware failure or kernel panic. (And
just because postgres can restart the database, that doesn't always mean it
should. Even a well-written startup script might not know enough to make
that decision for you.)

This might be good material for a tutorial on the wiki site, with some
system-specific sections.
--
Mike Nolan

#11John R Pierce
pierce@hogranch.com
In reply to: leaf_yxj (#8)
Re: Re: how to set up automatically startup database when the server boot or reboot.

On 04/27/12 10:22 AM, leaf_yxj wrote:

My os is redhat linux 5.5. And My database is greenplum 4.2.1( postgresql
8.2.15). I will take a look about the init.d directory.

greenplum is a highly modified and custom version of postgres, you
should consult with them as to how they have it setup.

the standard postgresql distributions for RHEL/CentOS come with the
SysVinit scripts, you merely need to..

# chkconfig postgresql-9.1 on
# service postgresql-9.1 start

to configure it to autostart with the OS, and to start it right now.

--
john r pierce N 37, W 122
santa cruz ca mid-left coast

#12Welty, Richard
rwelty@ltionline.com
In reply to: leaf_yxj (#1)
Re: Re: how to set up automatically startup database when the server boot or reboot.

in the RHEL and related linux systems (Fedora, CentOS, Amazon EC2 Linux), use this
command:

chkconfig postgresql on

to set up postgresql to start at boot. it needs to be executed as root.

richard

-----Original Message-----
From: pgsql-general-owner@postgresql.org on behalf of leaf_yxj
Sent: Fri 4/27/2012 1:22 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Re: how to set up automatically startup database when the server boot or reboot.

My os is redhat linux 5.5. And My database is greenplum 4.2.1( postgresql
8.2.15). I will take a look about the init.d directory.

Thanks. Guys. Any opinion is welcome. Please help.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5670905.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#13Jasen Betts
jasen@xnet.co.nz
In reply to: leaf_yxj (#1)
Re: how to set up automatically startup database when the server boot or reboot.

On 2012-04-27, leaf_yxj <leaf_yxj@163.com> wrote:

My os is redhat linux 5.5. And My database is greenplum 4.2.1( postgresql
8.2.15). I will take a look about the init.d directory.

if you installed it from the RPM repository it should have installed all it
needs.

In redhat there should be a command "ntsysv" that lets you select what
services to start on boot the controls are the cursor keys, tab, and
space.

--
⚂⚃ 100% natural

#14leaf_yxj
leaf_yxj@163.com
In reply to: Jasen Betts (#13)
Re: how to set up automatically startup database when the server boot or reboot.

Hi Guys, I got the support from Greenplum. I will give a feedback to
everybody after I test. Thanks.

They told me to add in /etc/rc.d.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-set-up-automatically-startup-database-when-the-server-boot-or-reboot-tp5670442p5676185.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.