The following explanations refer to »openSUSE Leap 15.1«.
Due to a bug in the version of the system repository of mozjs60
(see
apache/couchdb-pkg#65) an alternative is necessary.
In the upcoming version »openSUSE Leap 15.2« this is probably no longer
necessary.
sudo zypper addrepo \
https://download.opensuse.org/repositories/home:/WernerFink:/mozilla/openSUSE_Leap_15.1/home:WernerFink:mozilla.repo
sudo zypper refresh 'home_WernerFink_mozilla'
sudo zypper install -t pattern devel_C_C++
sudo zypper install --allow-vendor-change \
erlang erlang-rebar erlang-reltool erlang-epmd \
mozjs60-devel mozjs60 libmozjs-60 help2man libcurl-devel \
libicu-devel pkg-config autoconf213 mozilla-nspr-devel rpmbuild libffi-devel
sudo chmod o+r /usr/lib64/erlang/lib/crypto-4.2.2.2/priv/obj/*
The following example relates to »CouchDB 3.1.0«.
git clone https://github.com/apache/couchdb-pkg.git
cd couchdb-pkg
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
make download-couch openSUSE \
URL=http://mirror.23media.de/apache/couchdb/source/3.1.0/apache-couchdb-3.1.0.tar.gz
# or if the tar source archive has already been downloaded:
make openSUSE
sudo zypper install --allow-unsigned-rpm \
~/rpmbuild/RPMS/x86_64/couchdb-3.1.0-1.x86_64.rpm
Add in /opt/couchdb/etc/local.ini
:
[admins]
admin = mysecretpassword
sudo systemctl start couchdb.service
sudo systemctl enable couchdb.service
curl http://127.0.0.1:5984/
Creation of possibly necessary databases:
sudo curl -X PUT http://admin:[email protected]:5984/_users
sudo curl -X PUT http://admin:[email protected]:5984/_replicator