nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

OpenBSD 3.8 Service commands

This is a discussion on OpenBSD 3.8 Service commands within the All about FreeBSD/OpenBSD/NetBSD forums, part of the *BSD Operating systems category; I am looking for the proper commands to start, restart and stop services manually. In Redhat you typed "service name ...


Go Back   nixCraft Linux Forum > *BSD Operating systems > All about FreeBSD/OpenBSD/NetBSD

Linux answers from nixCraft.


All about FreeBSD/OpenBSD/NetBSD Discuss all about the Rock solid FreeBSD/OpenBSD/NetBSD. You are free to talk about any issues related to BSD administration, networking, services and other stuff, share information or ask doubts.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 13-09-2008, 01:27 AM
Junior Member
User
 
Join Date: Sep 2008
OS: OpenBSD
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ljgross is on a distinguished road
Default OpenBSD 3.8 Service commands

I am looking for the proper commands to start, restart and stop services manually. In Redhat you typed "service name stop, start or restart and chose enter.

I have seen several ways to do this on the internet but am not real sure that some are correct.
Reply With Quote
  #2 (permalink)  
Old 13-09-2008, 01:55 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

OpenBSD follows different method to start, stop services. There is no service or /etc/init.d kind of stuff.

OpenBSD uses an rc style startup. /etc/rc.conf file used by rc to know what daemons should start with the system.For example httpd can be automatically started by modifying following line into /etc/rc.conf:
Code:
httpd_flags=""
To disable httpd set it to "NO":
Code:
httpd_flags=NO
To restart any service after changes:
Code:
/bin/kill -HUP `cat /var/run/httpd.pid`
/bin/kill -HUP `cat /var/run/crond.pid`
/bin/kill -HUP `cat /path/to/pid.file`
To stop simply send kill single
Code:
/bin/kill `cat /var/run/httpd.pid`
To start either write a shell script or use /etc/rc.local file.

See example how to install mysql server and update files to start or stop mysql service:
OpenBSD Install MySQL Server

Here is default rc.conf:
http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/etc/rc.conf?content-type=text/plain

Read man page rc for more info and FAQ:
http://openbsd.org/faq/index.html

If you have specific question about services such as smtp or mysql just post it...
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help

Last edited by nixcraft; 13-09-2008 at 01:57 AM.
Reply With Quote
Reply

Tags
openbsd , openbsd kill service , openbsd start service , openbsd stop service


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
basic commands? seshaionline Getting started tutorials 7 24-03-2008 11:30 PM
OpenBSD won't let me set offset php111 All about FreeBSD/OpenBSD/NetBSD 0 07-09-2007 11:33 PM
OpenBSD configure change DNS name server IP address - DNS Client Resolution rockdalinux Getting started tutorials 0 15-06-2007 10:14 PM
OpenBSD get or display network card IP address Subnet mask information rockdalinux Getting started tutorials 0 15-06-2007 10:06 PM
Openbsd Howto backup data on tape - tutorial raj All about FreeBSD/OpenBSD/NetBSD 1 20-12-2006 01:44 AM


All times are GMT +5.5. The time now is 04:47 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38