©2015 -
COUCHBASE MOBILE SYNC GATEWAY -
COUCHBASE SYNC GATEWAY ROOT INSTALLATION
For purposes of vendor support and production deployments, an installation of Sync Gateway by root is recommended.
Here are some of my notes that demonstrates the process.
[couchbas@lxnode4 ~]$ cp couchbase-
[couchbas@lxnode4 ~]$ ls -
-
[couchbas@lxnode4 ~]$ chmod a+r /tmp/couchbase-
[couchbas@lxnode4 ~]$ ls -
-
[couchbas@lxnode4 ~]$ su -
Password:
[root@lxnode4 ~]#
[root@lxnode4 ~]# rpm -
sync_gateway start/running, process 5637
You have successfully installed Couchbase sync_gateway.
You can find sample sync_gateway configuration files in the /opt/couchbase-
You can control the Couchbase sync_gateway service by using the following command:
initctl start sync_gateway
That's it! sync_gateway is now running on port 4984. We've setup a simple in-
which works great for exploring sync_gateway's capabilities. A limited console is available
by opening your browser to http://localhost:4985/_admin/.
The command-
-
-
-
-
-
-
-
-
-
-
By using this software you agree to the End User License Agreement.
See /opt/couchbase-
[root@lxnode4 ~]#
The installation creates 2 OS accounts and group:
couchbase:couchbase
sync_gateway:sync_gateway
The couchbase user owns the installed binaries in /opt/couchbase-
While the sync_gateway user owns the Sync Gateway config file sync_gateway.json in /home/sync_gateway directory. This file is the only file referenced when starting the service.
After the installation by root, the sync_gateway process will be running using the default configuration that uses a local walrus database.
[sync_gateway@lxnode4 ~]$ ps -
root 2951 2950 0 16:48 ? 00:00:00 su -
911 2953 2951 0 16:48 ? 00:00:00 bash -
911 2954 2953 0 16:48 ? 00:00:03 /opt/couchbase-
root 5561 5545 0 22:45 pts/0 00:00:00 su -
911 5586 5563 0 22:45 pts/0 00:00:00 grep sync_gateway
[sync_gateway@lxnode4 ~]$
Here is a sample content of the default config file:
[sync_gateway@lxnode4 ~]$ pwd
/home/sync_gateway
[sync_gateway@lxnode4 ~]$
[sync_gateway@lxnode4 ~]$ ls -
total 12
drwxr-
drwxr-
-
[sync_gateway@lxnode4 ~]$
[sync_gateway@lxnode4 ~]$ cat sync_gateway.json
{
"log": ["HTTP+"],
"adminInterface": "127.0.0.1:4985",
"interface": "0.0.0.0:4984",
"databases": {
"db": {
"server": "walrus:data",
"users": {
"GUEST": {"disabled": false, "admin_channels": ["*"] }
}
}
}
}
[sync_gateway@lxnode4 ~]$
As an administrator, you need the following sudo privileges:
initctl start sync_gateway
initctl stop sync_gateway
su – sync_gateway
su -