Categories
linux webhosting

How to restart Linux services

Starting Services

Linux:

/etc/rc.d/init.d/ start

FreeBSD:

/usr/local/etc/rc.d/ start

Stopping Services

Linux:

/etc/rc.d/init.d/ stop

FreeBSD:

/usr/local/etc/rc.d/ stop

Restarting Services

Linux:

/etc/rc.d/init.d/ restart

FreeBSD:

/usr/local/etc/rc.d/ restart

An alternative method – and often more appropriate – is to stop and then start the service:

Linux:

/etc/rc.d/init.d/ stop

sleep 10

/etc/rc.d/init.d/ start

FreeBSD:

/usr/local/etc/rc.d/ stop

sleep 10

/usr/local/etc/rc.d/ start

Note: While restarting H-Sphere, run killall -9 java after you stop and before you start CP.

Warning: Don’t use kill -9 to stop named, as it may cause information loss!

Following are the commands to put in place of :

Service Linux FreeBSD
H-Sphere (tomcat) httpdcp apachecp.sh
H-Sphere Database
(PostgreSQL) postgresql 010.pgsql.sh
Apache httpd apache.sh
FTP proftpd proftpd.sh
Qmail qmaild qmaild.sh
SpamAssasin spamd spamd.sh
ClamAV clamd clamd.sh
PostgreSQL (User DB) postgresql 010.pgsql.sh
MySQL mysqld mysql-server.sh
DNS (Bind 9.3 and up) named named.sh
ImapProxy imapproxy imapproxy.sh

Leave a Reply

Your email address will not be published. Required fields are marked *