You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Mohammad Prabowo <ri...@gmail.com> on 2011/12/02 02:31:12 UTC
build-couchdb start, stop, restart
Hi. I'm new to CouchDB and would like to join the mailing list.
Also, i have a problem. I'm using build-couchdb method as recomended
from this wiki, http://wiki.apache.org/couchdb/Installing_on_Ubuntu
but, i don't know how to make the couchdb start automatically when i
start Ubuntu.
Also, after i start the CouchDB manually, i can't seem to find a way
to restart the process (i want to change the admin password, and to do
that, i need to edit the local.ini file, and restart the CouchDB).
So, to be clear, here's my problem:
- How to make the build-couchdb start automatically?
- How to start, stop, and restart build-couchdb?
Thanks!
Re: build-couchdb start, stop, restart
Posted by Mohammad Prabowo <ri...@gmail.com>.
Hi. Sorry my response took a while. I'm trying to recompiled
build-couchdb as suggested by Marcello, after deleting the
build-couchdb folder, and then starting from scratch:
git clone git://github.com/iriscouch/build-couchdb
cd build-couchdb
git submodule init
git submodule update
rake install=/home/rizalp #my home folder
But the installer always report that the checkout is not clean. I
don't know why.
While exploring and reading about couchdb, i found out about
couchbase. Fortunately, they provide a Couchbase Single Server that is
compatible with CouchDB. Even better, they provide binary installer
to!
And so, i download and installed it:
sudo dpkg -i couchbase-server-community_x86_1.2.0.deb
And it's working like a charm. I can start, stop and restart server with
sudo /etc/init.d/couchbase-server {start | stop | restart}
Thanks for the help guys! Maybe later i will try to build couchdb from source.
On Sun, Dec 4, 2011 at 11:57 PM, Marcello Nuccio
<ma...@gmail.com> wrote:
> It may be useful, at least as a guide on how to setup a CouchDB for
> production, i.e. with service management, log rotation, regular db
> compaction, ...
>
> However I think it could be more useful to provide some ready-to-use
> Chef recipes, or Puppet modules. There are so many things to keep in
> mind while setting up a CouchDB server, and so many little differences
> between distributions (and different versions of one distribution),
> that a bunch of configuration files could became unmanageable.
>
> I've only basic knowledge of Puppet, but I can share what I've learnt
> so far if there's any interest.
>
> Marcello
>
> 2011/12/4 Jason Smith <jh...@iriscouch.com>:
>> Wow, Marcello. That's excellent!
>>
>> Do you think there should be a Rake target like "install" which does
>> this sort of thing for known distributions?
>>
>> On Fri, Dec 2, 2011 at 2:51 PM, Marcello Nuccio
>> <ma...@gmail.com> wrote:
>>> Hi Mohammad,
>>> on Ubuntu-11.10 I create the following file:
>>>
>>> # /etc/init/build-couchdb.conf
>>> description "CouchDB service built with build-couchdb"
>>>
>>> start on filesystem
>>> stop on runlevel [!2345]
>>>
>>> respawn
>>> respawn limit 10 5
>>> umask 022
>>>
>>> pre-start script
>>> test -x '/home/couchdb/bin/couchdb' || { stop; exit 0; }
>>> end script
>>>
>>> script
>>> exec sudo -u couchdb dash -c '"/home/couchdb/bin/couchdb" 2>&1 |
>>> logger -t "build-couchdb" -p local0.error'
>>> end script
>>> # END OF /etc/init/build-couchdb.conf
>>>
>>>
>>> Here I'm assuming that:
>>> - there's a "couchdb" user
>>> - you compiled with "rake install=/home/couchdb"
>>>
>>> Obviously you can change those assumptions as you like.
>>>
>>> One important WARNING: by default couchdb will log to
>>> /home/boutique/var/log/couchdb/couch.log
>>> then it's important to rotate this log, for example creating the following file:
>>>
>>> ===== Contents of /etc/logrotate.d/boutique =======
>>> /home/boutique/var/log/couchdb/couch.log {
>>> weekly
>>> rotate 10
>>> copytruncate
>>> delaycompress
>>> compress
>>> notifempty
>>> missingok
>>> }
>>>
>>> HTH,
>>> Marcello
>>>
>>> 2011/12/2 Mohammad Prabowo <ri...@gmail.com>:
>>>> Hi Jason! Thanks for the reply. Sadly, the method you described didn't work.
>>>> I'm guessing, it has something to do with build/env.sh. Since that
>>>> file will make couchdb availlable to the PATH.
>>>> I haven't had installed any program for source before, so i don't know
>>>> how to make it startup scripts
>>>>
>>>> Would you please post the instructions as to how to do it in the
>>>> build-couchdb github page? I'm sure for many novice people like me the
>>>> instructions will be a great help.
>>>>
>>>> Thank you
>>>>
>>>> On Fri, Dec 2, 2011 at 9:08 AM, Jason Smith <jh...@iriscouch.com> wrote:
>>>>> Hi, Mohammad. I maintain build-couchdb. I didn't' even realize it was
>>>>> mentioned in the wiki. That's cool!
>>>>>
>>>>> The first thing to understand is, when build-couchdb completes, it is
>>>>> exactly as if you had manually run `make install` from a traditional
>>>>> build from the source code. If you see any instructions about what to
>>>>> do after `make install`, then they also apply to build-couchdb.
>>>>>
>>>>> The basic strategy is to make your startup scripts execute CouchDB
>>>>> during boot, and stop it during shutdown.
>>>>>
>>>>> My guess about this process (untested, may not be exactly correct):
>>>>>
>>>>> ln -s $PWD/build/etc/init.d/couchdb /etc/init.d/couchdb
>>>>> update-rc.d couchdb defaults
>>>>>
>>>>> On Fri, Dec 2, 2011 at 8:36 AM, Mohammad Prabowo <ri...@gmail.com> wrote:
>>>>>> Hi. I'm new to CouchDB and would like to join the mailing list.
>>>>>> Also, i have a problem. I'm using build-couchdb method as
>>>>>> recomendedfrom this wiki,
>>>>>> http://wiki.apache.org/couchdb/Installing_on_Ubuntubut, i don't know
>>>>>> how to make the couchdb start automatically when istart Ubuntu.
>>>>>> Also, after i start the CouchDB manually, i can't seem to find a wayto
>>>>>> restart the process (i want to change the admin password, and to
>>>>>> dothat, i need to edit the local.ini file, and restart the CouchDB).
>>>>>> So, to be clear, here's my problem:
>>>>>> - How to make the build-couchdb start automatically?- How to start,
>>>>>> stop, and restart build-couchdb?
>>>>>> Thanks!
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Iris Couch
>>
>>
>>
>> --
>> Iris Couch
Re: build-couchdb start, stop, restart
Posted by Marcello Nuccio <ma...@gmail.com>.
It may be useful, at least as a guide on how to setup a CouchDB for
production, i.e. with service management, log rotation, regular db
compaction, ...
However I think it could be more useful to provide some ready-to-use
Chef recipes, or Puppet modules. There are so many things to keep in
mind while setting up a CouchDB server, and so many little differences
between distributions (and different versions of one distribution),
that a bunch of configuration files could became unmanageable.
I've only basic knowledge of Puppet, but I can share what I've learnt
so far if there's any interest.
Marcello
2011/12/4 Jason Smith <jh...@iriscouch.com>:
> Wow, Marcello. That's excellent!
>
> Do you think there should be a Rake target like "install" which does
> this sort of thing for known distributions?
>
> On Fri, Dec 2, 2011 at 2:51 PM, Marcello Nuccio
> <ma...@gmail.com> wrote:
>> Hi Mohammad,
>> on Ubuntu-11.10 I create the following file:
>>
>> # /etc/init/build-couchdb.conf
>> description "CouchDB service built with build-couchdb"
>>
>> start on filesystem
>> stop on runlevel [!2345]
>>
>> respawn
>> respawn limit 10 5
>> umask 022
>>
>> pre-start script
>> test -x '/home/couchdb/bin/couchdb' || { stop; exit 0; }
>> end script
>>
>> script
>> exec sudo -u couchdb dash -c '"/home/couchdb/bin/couchdb" 2>&1 |
>> logger -t "build-couchdb" -p local0.error'
>> end script
>> # END OF /etc/init/build-couchdb.conf
>>
>>
>> Here I'm assuming that:
>> - there's a "couchdb" user
>> - you compiled with "rake install=/home/couchdb"
>>
>> Obviously you can change those assumptions as you like.
>>
>> One important WARNING: by default couchdb will log to
>> /home/boutique/var/log/couchdb/couch.log
>> then it's important to rotate this log, for example creating the following file:
>>
>> ===== Contents of /etc/logrotate.d/boutique =======
>> /home/boutique/var/log/couchdb/couch.log {
>> weekly
>> rotate 10
>> copytruncate
>> delaycompress
>> compress
>> notifempty
>> missingok
>> }
>>
>> HTH,
>> Marcello
>>
>> 2011/12/2 Mohammad Prabowo <ri...@gmail.com>:
>>> Hi Jason! Thanks for the reply. Sadly, the method you described didn't work.
>>> I'm guessing, it has something to do with build/env.sh. Since that
>>> file will make couchdb availlable to the PATH.
>>> I haven't had installed any program for source before, so i don't know
>>> how to make it startup scripts
>>>
>>> Would you please post the instructions as to how to do it in the
>>> build-couchdb github page? I'm sure for many novice people like me the
>>> instructions will be a great help.
>>>
>>> Thank you
>>>
>>> On Fri, Dec 2, 2011 at 9:08 AM, Jason Smith <jh...@iriscouch.com> wrote:
>>>> Hi, Mohammad. I maintain build-couchdb. I didn't' even realize it was
>>>> mentioned in the wiki. That's cool!
>>>>
>>>> The first thing to understand is, when build-couchdb completes, it is
>>>> exactly as if you had manually run `make install` from a traditional
>>>> build from the source code. If you see any instructions about what to
>>>> do after `make install`, then they also apply to build-couchdb.
>>>>
>>>> The basic strategy is to make your startup scripts execute CouchDB
>>>> during boot, and stop it during shutdown.
>>>>
>>>> My guess about this process (untested, may not be exactly correct):
>>>>
>>>> ln -s $PWD/build/etc/init.d/couchdb /etc/init.d/couchdb
>>>> update-rc.d couchdb defaults
>>>>
>>>> On Fri, Dec 2, 2011 at 8:36 AM, Mohammad Prabowo <ri...@gmail.com> wrote:
>>>>> Hi. I'm new to CouchDB and would like to join the mailing list.
>>>>> Also, i have a problem. I'm using build-couchdb method as
>>>>> recomendedfrom this wiki,
>>>>> http://wiki.apache.org/couchdb/Installing_on_Ubuntubut, i don't know
>>>>> how to make the couchdb start automatically when istart Ubuntu.
>>>>> Also, after i start the CouchDB manually, i can't seem to find a wayto
>>>>> restart the process (i want to change the admin password, and to
>>>>> dothat, i need to edit the local.ini file, and restart the CouchDB).
>>>>> So, to be clear, here's my problem:
>>>>> - How to make the build-couchdb start automatically?- How to start,
>>>>> stop, and restart build-couchdb?
>>>>> Thanks!
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Iris Couch
>
>
>
> --
> Iris Couch
Re: build-couchdb start, stop, restart
Posted by Jason Smith <jh...@iriscouch.com>.
Wow, Marcello. That's excellent!
Do you think there should be a Rake target like "install" which does
this sort of thing for known distributions?
On Fri, Dec 2, 2011 at 2:51 PM, Marcello Nuccio
<ma...@gmail.com> wrote:
> Hi Mohammad,
> on Ubuntu-11.10 I create the following file:
>
> # /etc/init/build-couchdb.conf
> description "CouchDB service built with build-couchdb"
>
> start on filesystem
> stop on runlevel [!2345]
>
> respawn
> respawn limit 10 5
> umask 022
>
> pre-start script
> test -x '/home/couchdb/bin/couchdb' || { stop; exit 0; }
> end script
>
> script
> exec sudo -u couchdb dash -c '"/home/couchdb/bin/couchdb" 2>&1 |
> logger -t "build-couchdb" -p local0.error'
> end script
> # END OF /etc/init/build-couchdb.conf
>
>
> Here I'm assuming that:
> - there's a "couchdb" user
> - you compiled with "rake install=/home/couchdb"
>
> Obviously you can change those assumptions as you like.
>
> One important WARNING: by default couchdb will log to
> /home/boutique/var/log/couchdb/couch.log
> then it's important to rotate this log, for example creating the following file:
>
> ===== Contents of /etc/logrotate.d/boutique =======
> /home/boutique/var/log/couchdb/couch.log {
> weekly
> rotate 10
> copytruncate
> delaycompress
> compress
> notifempty
> missingok
> }
>
> HTH,
> Marcello
>
> 2011/12/2 Mohammad Prabowo <ri...@gmail.com>:
>> Hi Jason! Thanks for the reply. Sadly, the method you described didn't work.
>> I'm guessing, it has something to do with build/env.sh. Since that
>> file will make couchdb availlable to the PATH.
>> I haven't had installed any program for source before, so i don't know
>> how to make it startup scripts
>>
>> Would you please post the instructions as to how to do it in the
>> build-couchdb github page? I'm sure for many novice people like me the
>> instructions will be a great help.
>>
>> Thank you
>>
>> On Fri, Dec 2, 2011 at 9:08 AM, Jason Smith <jh...@iriscouch.com> wrote:
>>> Hi, Mohammad. I maintain build-couchdb. I didn't' even realize it was
>>> mentioned in the wiki. That's cool!
>>>
>>> The first thing to understand is, when build-couchdb completes, it is
>>> exactly as if you had manually run `make install` from a traditional
>>> build from the source code. If you see any instructions about what to
>>> do after `make install`, then they also apply to build-couchdb.
>>>
>>> The basic strategy is to make your startup scripts execute CouchDB
>>> during boot, and stop it during shutdown.
>>>
>>> My guess about this process (untested, may not be exactly correct):
>>>
>>> ln -s $PWD/build/etc/init.d/couchdb /etc/init.d/couchdb
>>> update-rc.d couchdb defaults
>>>
>>> On Fri, Dec 2, 2011 at 8:36 AM, Mohammad Prabowo <ri...@gmail.com> wrote:
>>>> Hi. I'm new to CouchDB and would like to join the mailing list.
>>>> Also, i have a problem. I'm using build-couchdb method as
>>>> recomendedfrom this wiki,
>>>> http://wiki.apache.org/couchdb/Installing_on_Ubuntubut, i don't know
>>>> how to make the couchdb start automatically when istart Ubuntu.
>>>> Also, after i start the CouchDB manually, i can't seem to find a wayto
>>>> restart the process (i want to change the admin password, and to
>>>> dothat, i need to edit the local.ini file, and restart the CouchDB).
>>>> So, to be clear, here's my problem:
>>>> - How to make the build-couchdb start automatically?- How to start,
>>>> stop, and restart build-couchdb?
>>>> Thanks!
>>>>
>>>
>>>
>>>
>>> --
>>> Iris Couch
--
Iris Couch
Re: build-couchdb start, stop, restart
Posted by Marcello Nuccio <ma...@gmail.com>.
Hi Mohammad,
on Ubuntu-11.10 I create the following file:
# /etc/init/build-couchdb.conf
description "CouchDB service built with build-couchdb"
start on filesystem
stop on runlevel [!2345]
respawn
respawn limit 10 5
umask 022
pre-start script
test -x '/home/couchdb/bin/couchdb' || { stop; exit 0; }
end script
script
exec sudo -u couchdb dash -c '"/home/couchdb/bin/couchdb" 2>&1 |
logger -t "build-couchdb" -p local0.error'
end script
# END OF /etc/init/build-couchdb.conf
Here I'm assuming that:
- there's a "couchdb" user
- you compiled with "rake install=/home/couchdb"
Obviously you can change those assumptions as you like.
One important WARNING: by default couchdb will log to
/home/boutique/var/log/couchdb/couch.log
then it's important to rotate this log, for example creating the following file:
===== Contents of /etc/logrotate.d/boutique =======
/home/boutique/var/log/couchdb/couch.log {
weekly
rotate 10
copytruncate
delaycompress
compress
notifempty
missingok
}
HTH,
Marcello
2011/12/2 Mohammad Prabowo <ri...@gmail.com>:
> Hi Jason! Thanks for the reply. Sadly, the method you described didn't work.
> I'm guessing, it has something to do with build/env.sh. Since that
> file will make couchdb availlable to the PATH.
> I haven't had installed any program for source before, so i don't know
> how to make it startup scripts
>
> Would you please post the instructions as to how to do it in the
> build-couchdb github page? I'm sure for many novice people like me the
> instructions will be a great help.
>
> Thank you
>
> On Fri, Dec 2, 2011 at 9:08 AM, Jason Smith <jh...@iriscouch.com> wrote:
>> Hi, Mohammad. I maintain build-couchdb. I didn't' even realize it was
>> mentioned in the wiki. That's cool!
>>
>> The first thing to understand is, when build-couchdb completes, it is
>> exactly as if you had manually run `make install` from a traditional
>> build from the source code. If you see any instructions about what to
>> do after `make install`, then they also apply to build-couchdb.
>>
>> The basic strategy is to make your startup scripts execute CouchDB
>> during boot, and stop it during shutdown.
>>
>> My guess about this process (untested, may not be exactly correct):
>>
>> ln -s $PWD/build/etc/init.d/couchdb /etc/init.d/couchdb
>> update-rc.d couchdb defaults
>>
>> On Fri, Dec 2, 2011 at 8:36 AM, Mohammad Prabowo <ri...@gmail.com> wrote:
>>> Hi. I'm new to CouchDB and would like to join the mailing list.
>>> Also, i have a problem. I'm using build-couchdb method as
>>> recomendedfrom this wiki,
>>> http://wiki.apache.org/couchdb/Installing_on_Ubuntubut, i don't know
>>> how to make the couchdb start automatically when istart Ubuntu.
>>> Also, after i start the CouchDB manually, i can't seem to find a wayto
>>> restart the process (i want to change the admin password, and to
>>> dothat, i need to edit the local.ini file, and restart the CouchDB).
>>> So, to be clear, here's my problem:
>>> - How to make the build-couchdb start automatically?- How to start,
>>> stop, and restart build-couchdb?
>>> Thanks!
>>>
>>
>>
>>
>> --
>> Iris Couch
Re: build-couchdb start, stop, restart
Posted by Mohammad Prabowo <ri...@gmail.com>.
Hi Jason! Thanks for the reply. Sadly, the method you described didn't work.
I'm guessing, it has something to do with build/env.sh. Since that
file will make couchdb availlable to the PATH.
I haven't had installed any program for source before, so i don't know
how to make it startup scripts
Would you please post the instructions as to how to do it in the
build-couchdb github page? I'm sure for many novice people like me the
instructions will be a great help.
Thank you
On Fri, Dec 2, 2011 at 9:08 AM, Jason Smith <jh...@iriscouch.com> wrote:
> Hi, Mohammad. I maintain build-couchdb. I didn't' even realize it was
> mentioned in the wiki. That's cool!
>
> The first thing to understand is, when build-couchdb completes, it is
> exactly as if you had manually run `make install` from a traditional
> build from the source code. If you see any instructions about what to
> do after `make install`, then they also apply to build-couchdb.
>
> The basic strategy is to make your startup scripts execute CouchDB
> during boot, and stop it during shutdown.
>
> My guess about this process (untested, may not be exactly correct):
>
> ln -s $PWD/build/etc/init.d/couchdb /etc/init.d/couchdb
> update-rc.d couchdb defaults
>
> On Fri, Dec 2, 2011 at 8:36 AM, Mohammad Prabowo <ri...@gmail.com> wrote:
>> Hi. I'm new to CouchDB and would like to join the mailing list.
>> Also, i have a problem. I'm using build-couchdb method as
>> recomendedfrom this wiki,
>> http://wiki.apache.org/couchdb/Installing_on_Ubuntubut, i don't know
>> how to make the couchdb start automatically when istart Ubuntu.
>> Also, after i start the CouchDB manually, i can't seem to find a wayto
>> restart the process (i want to change the admin password, and to
>> dothat, i need to edit the local.ini file, and restart the CouchDB).
>> So, to be clear, here's my problem:
>> - How to make the build-couchdb start automatically?- How to start,
>> stop, and restart build-couchdb?
>> Thanks!
>>
>
>
>
> --
> Iris Couch
Re: build-couchdb start, stop, restart
Posted by Jason Smith <jh...@iriscouch.com>.
Hi, Mohammad. I maintain build-couchdb. I didn't' even realize it was
mentioned in the wiki. That's cool!
The first thing to understand is, when build-couchdb completes, it is
exactly as if you had manually run `make install` from a traditional
build from the source code. If you see any instructions about what to
do after `make install`, then they also apply to build-couchdb.
The basic strategy is to make your startup scripts execute CouchDB
during boot, and stop it during shutdown.
My guess about this process (untested, may not be exactly correct):
ln -s $PWD/build/etc/init.d/couchdb /etc/init.d/couchdb
update-rc.d couchdb defaults
On Fri, Dec 2, 2011 at 8:36 AM, Mohammad Prabowo <ri...@gmail.com> wrote:
> Hi. I'm new to CouchDB and would like to join the mailing list.
> Also, i have a problem. I'm using build-couchdb method as
> recomendedfrom this wiki,
> http://wiki.apache.org/couchdb/Installing_on_Ubuntubut, i don't know
> how to make the couchdb start automatically when istart Ubuntu.
> Also, after i start the CouchDB manually, i can't seem to find a wayto
> restart the process (i want to change the admin password, and to
> dothat, i need to edit the local.ini file, and restart the CouchDB).
> So, to be clear, here's my problem:
> - How to make the build-couchdb start automatically?- How to start,
> stop, and restart build-couchdb?
> Thanks!
>
--
Iris Couch
build-couchdb start, stop, restart
Posted by Mohammad Prabowo <ri...@gmail.com>.
Hi. I'm new to CouchDB and would like to join the mailing list.
Also, i have a problem. I'm using build-couchdb method as
recomendedfrom this wiki,
http://wiki.apache.org/couchdb/Installing_on_Ubuntubut, i don't know
how to make the couchdb start automatically when istart Ubuntu.
Also, after i start the CouchDB manually, i can't seem to find a wayto
restart the process (i want to change the admin password, and to
dothat, i need to edit the local.ini file, and restart the CouchDB).
So, to be clear, here's my problem:
- How to make the build-couchdb start automatically?- How to start,
stop, and restart build-couchdb?
Thanks!