How to effectively shutdown the servers

Jephe Wu -

Objective:  Need to shutdown all servers in office for building power maintenance.
Environment: Linux(CentOS, Redhat, Fedora), Solaris 8, OpenBSD and FreeBSD

1.  If the server is running tomcat, websphere, oracle or db2 databases, login as application user or database user to shutdown them properly first.

2. become root, make the system halt for Solaris, openbsd, freebsd by the following command:
shutdown -h now
For Linux, you might want to power off it directly.
halt -p 
shutdown -p now 

note: for Solaris, you might also use 'init 5' to poweroff.  For openbsd and freebsd, some version of these OS might reboot instead of power off or halt if you try to use above commands.


If for rebooting the server only, try the following commands:
reboot, shutdown -r now