vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, I'm afraid the method of starting applications/daemons on boot with OpenBSD leaves me a little confused. I've tried googling and looking through the manuals but haven't been able to find a definitive answer. I've used package add to install the mysql client and server applications to OpenBSD 3.6. What I'm now having trouble doing (I think) is creating a startup script to make mysqld start at boot. I'm trying to install and run qmail on my box and you can follow my progress at: http://www.linuxquestions.org/quest...480#post1443480 I have a startup script in place which is listed in my qmail thread (link above) - but I'm having trouble with it. If anyone could please help me with starting mysqld at boot or trouble shooting my problem from an OBSD perspective it would be greatly appreciated. Sh4d03 |
| |||
| On Mon, 07 Feb 2005 10:15:07 +1100, Sh4d03 wrote: > Hi all, > > I'm afraid the method of starting applications/daemons on boot with OpenBSD > leaves me a little confused. > > I've tried googling and looking through the manuals but haven't been able to > find a definitive answer. I've used package add to install the mysql client > and server applications to OpenBSD 3.6. What I'm now having trouble doing (I > think) is creating a startup script to make mysqld start at boot. > > I'm trying to install and run qmail on my box and you can follow my progress > at: > > http://www.linuxquestions.org/quest...480#post1443480 > > I have a startup script in place which is listed in my qmail thread (link > above) - but I'm having trouble with it. > > If anyone could please help me with starting mysqld at boot or trouble > shooting my problem from an OBSD perspective it would be greatly > appreciated. > > Sh4d03 Hi .. Ive just installed mysql on my OpenBSD 3.6 for my webserver following these step by step instructions http://www.bsdforums.org/forums/show...&threadid=9986 specifically they recommend this # vi /etc/rc.local rm -R /var/www/var/run/mysql mkdir -p /var/www/var/run/mysql /usr/local/bin/mysqld_safe --user=mysql -log & sleep 10 ln /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock HTH -- Hardware, n.: The parts of a computer system that can be kicked |
| |||
| In article <4206a51c$1@dnews.tpgi.com.au>, Sh4d03 <sh4d03@TPG.com.au> wrote: >Hi all, > >I'm afraid the method of starting applications/daemons on boot with OpenBSD >leaves me a little confused. > >I've tried googling and looking through the manuals but haven't been able to >find a definitive answer. I've used package add to install the mysql client >and server applications to OpenBSD 3.6. What I'm now having trouble doing (I >think) is creating a startup script to make mysqld start at boot. I've got no experience with mysql, so I can't help there. >I'm trying to install and run qmail on my box and you can follow my progress >at: > >http://www.linuxquestions.org/quest...480#post1443480 However -- I can offer at least one caveat about qmail on an OpenBSD. Note that qmail normally installs in "/var/qmail". Now, all of /var is mounted "nosuid". Unfortunately, one of the daemons has to be installed suid, so it will not work there. On my system, I have added two symlinks in the initial /var/qmail directory: ================================================== ==================== lrwxr-xr-x 1 root wheel 16 Jun 24 2004 bin@ -> /usr/local/qmail lrwxr-xr-x 1 root wheel 10 Jun 24 2004 control@ -> /etc/qmail ================================================== ==================== The first is to put the bin directory on a different filesystem, to allow it to be mounted allowing suid programs Here is the suid program in question. If you really want to keep almost all of qmail: in /var, you can do an individual link to that one file someplace safe. ================================================== ==================== -rws--x--x 1 qmailq qmail 14104 Jun 24 2004 qmail-queue* ================================================== ==================== No -- you *don't* want to turn off the "nosuid" mount for /var. Several security features depend upon it. The other is to put the configuration files in /etc, along with all the other standard configuration files. Note also that "sendmail" runs through a few (security) hoops, and the best way to set that up is to edit the configuration file that the "sendmail" redirector uses. Look into /etc/mailer.conf. Here is my modification to that: ================================================== ==================== # $OpenBSD: mailer.conf,v 1.3 2000/04/06 18:24:19 millert Exp $ # # Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail # #sendmail /usr/libexec/sendmail/sendmail #send-mail /usr/libexec/sendmail/sendmail #mailq /usr/libexec/sendmail/sendmail #newaliases /usr/libexec/sendmail/sendmail #hoststat /usr/libexec/sendmail/sendmail #purgestat /usr/libexec/sendmail/sendmail sendmail /var/qmail/bin/sendmail send-mail /var/qmail/bin/sendmail mailq /usr/libexec/sendmail/mailq ================================================== ==================== This is needed because sendmail is called from many other programs to inject mail into the net, and you want all of them to get the qmail substitute for sendmail. >I have a startup script in place which is listed in my qmail thread (link >above) - but I'm having trouble with it. I've done what you are not supposed to, and modified /etc/rc. Just after the part which starts spamd (which I don't use), I have the following: ================================================== ==================== # Start qmail instead of sendmail -- DoN. if [ "X${qmail_flags}" != X"NO" -a -f /etc/mailer.conf ]; then echo -n ' qmail'; ( csh -cf '/var/qmail/rc &' ) fi ================================================== ==================== And in /etc/rc.conf, I have: ================================================== ==================== # For normal use: "-L sm-mta -bd -q30m", and note there is a cron job #sendmail_flags="-L sm-mta -C/etc/mail/localhost.cf -bd -q30m" spamd_flags=NO # for normal use: "" and see spamd-setup(8) # # Run qmail instead of sendmail # qmail_flags="YES" ================================================== ==================== I put this here, instead of in /etc/rc.local, because it was truly replacing something normally started from /etc/rc, I hope that this helps. I can't look at your website to see what your progress was, since I've got a gigantic download going (Solaris-10, FWIW) in my browser. Hmm ... maybe one of the OpenBSD systems can visit it. Yep -- but I don't see much specific to your qmail question. Separating them into two threads might help more. >If anyone could please help me with starting mysqld at boot or trouble >shooting my problem from an OBSD perspective it would be greatly >appreciated. That, I will have to leave to others. I hope that my qmail info is some help. Good Luck, DoN. -- Email: <dnichols@d-and-d.com> | Voice (all times): (703) 938-4564 (too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html --- Black Holes are where God is dividing by zero --- |
| ||||
| I use this setup: -----> /etc/rc.conf ---- add the following: mysqld="" # for normal use: "" -----> /etc/rc.local ----- add the following: # start the MySQL daemon if [ $securelevel -le 1 -a X"${mysqld}" != X"NO" \ -a -x /usr/local/share/mysql/mysql.server ]; then echo -n ' mysqld' /usr/local/share/mysql/mysql.server start \ ${mysqld} >/dev/null & fi ---------------------------------------------------------- All you have to do to stop the daemon from starting up on boot is set "mysqld" in rc.conf to "NO". To start it, set it to "" or put whatever commandline arguments in it that are to be passed when it's started. |
| Thread Tools | |
| Display Modes | |
|
|