-
Notifications
You must be signed in to change notification settings - Fork 7
install opensuse
- Install couchapp
zypper install python-pip
pip install couchapp
- Install couchdb
zypper install couchdb
- Install couchdb source
zypper source-install couchdb
- Install geocouche make depends
zypper install erlang
export COUCH_SRC=/usr/src/packages/SOURCES/apache-couchdb-1.2.0/src/couchdb/
- Install geocouch
git clone https://github.com/couchbase/geocouch.git
cd geocouch
git checkout -b remotes/origin/couchdb1.2.x
git checkout couchdb1.2.x
make
cp etc/couchdb/default.d/geocouch.ini /etc/couchdb/default.d/
cp share/www/script/test/* /usr/share/couchdb/www/script/test/
mkdir -p /usr/local/ebin/
cp -a ebin/* /usr/local/ebin/
- Add erlang PATH
nano /etc/init.d/couchdb
export ERL_FLAGS="-pa /usr/local/ebin"
- Add Vhost to simplify the url
nano /etc/couchdb/local.ini
[vhosts]
map.pberg.freifunk.net = /openwifimap/_design/openwifimap/_rewrite
- Restart the couchdb server
service couchdb restart
cat /var/log/couchdb/couchdb.stderr
-
Webserver config
-
nginx vhost config
server { listen [::]:80; server_name couch.pberg.freifunk.net; access_log /var/log/nginx/couch.pberg.freifunk.net.access.log main; error_log /var/log/nginx/couch.pberg.freifunk.net.error.log info; location / { proxy_pass http://127.0.0.1:5984; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } -
lighttpd vhost config
$HTTP["host"] == "map.pberg.freifunk.net" { var.server_name = "map.pberg.freifunk.net" server.name = server_name server.document-root = "/srv/www/vhosts/pberg" proxy.server = ( "/" => (("host" => "127.0.0.1", "port" => 5984)) ) accesslog.filename = log_root + "/" + server_name + "/access.log" }