Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 32 lines (22 sloc) 1.125 kb
#!/bin/sh -e
# Meant to be run after installing couchbase (e.g., after rpm/dpkg -i).
#
# Example: ./after-install.sh $NUM_VBUCKETS
#
cp /opt/couchbase/etc/couchdb/default.ini /opt/couchbase/etc/couchdb/default.ini.orig
sed -e "s,os_process_limit = 50,os_process_limit = 0,g" /opt/couchbase/etc/couchdb/default.ini.orig | \
sed -e "s,;bind_address = 127.0.0.1,bind_address = 0.0.0.0,g" | \
sed -e "s,;socket_options,socket_options,g" > /opt/couchbase/etc/couchdb/default.ini
echo -e "[native_query_servers]\nerlang = {couch_native_process, start_link, []}\n" >> /opt/couchbase/etc/couchdb/default.ini
cp /opt/couchbase/bin/membase-server /opt/couchbase/bin/membase-server.orig || true
sudo /etc/init.d/couchbase-server stop || true
sudo killall heart beam.smp || true
if [ "$1" -gt 0 ]
then
rm -f membase-server.num_vbuckets
wget -O membase-server.num_vbuckets https://raw.github.com/couchbaselabs/rampup/master/membase-server.num_vbuckets
sed -e "s,@@MEMBASE_NUM_VBUCKETS@@,$1,g" membase-server.num_vbuckets > \
/opt/couchbase/bin/membase-server
fi
sudo /etc/init.d/couchbase-server start
sleep 5 $2
Jump to Line
Something went wrong with that request. Please try again.