bitnami couchdb for huawei enterprise cloud · bitnami couchdb for huawei enterprise cloud ... use...
TRANSCRIPT
Bitnami CouchDB for Huawei
Enterprise Cloud
Description
CouchDB completely embraces the web. It stores your data with JSON
documents, which you can access with your browser, via HTTP. CouchDB
allows you to index, combine and transform your documents with JavaScript.
How to start or stop the services?
Each Bitnami stack includes a control script that lets you easily stop, start and
restart services. The script is located at /opt/bitnami/ctlscript.sh. Call it without
any service name arguments to start all services:
sudo /opt/bitnami/ctlscript.sh start
Or use it to restart a single service, such as Apache only, by passing the
service name as argument:
sudo /opt/bitnami/ctlscript.sh restart apache
Use this script to stop all services:
sudo /opt/bitnami/ctlscript.sh stop
Restart the services by running the script without any arguments:
sudo /opt/bitnami/ctlscript.sh restart
Obtain a list of available services and operations by running the script without
any arguments:
sudo /opt/bitnami/ctlscript.sh
How to upload files to the server with SFTP?
NOTE: Bitnami applications can be found in /opt/bitnami/apps.
When uploading files via SFTP, you must have the server's IP address,
username and password or, if you chose to deploy the server with an SSH key
instead of a password, you must have the server username and corresponding
SSH private key in .ppk format (for Windows) or in .pem format (for Linux and
Mac OS X).
To obtain the IP address for your server, follow these steps:
Log in to the Huawei Cloud Server Console.
Navigate to the "Computing -> Elastic Cloud Server" section.
Note the public IP address for the server you wish to connect to.
Once you have confirmed that you have the IP address and correct SSH
credentials for your server, follow the instructions below depending on the
platform you wish to use.
Although you can use any SFTP/SCP client to transfer files to your server, this
guide documents FileZilla (Windows, Linux and Mac OS X), WinSCP
(Windows) and Cyberduck (Mac OS X).
Using an SSH Key
Once you have your server's SSH key, choose your preferred application and
follow the steps below to connect to the server using SFTP.
FileZilla
IMPORTANT: To use FileZilla, your server private key should be in PPK
format.
Follow these steps:
Download and install FileZilla.
Launch FileZilla and use the "Edit -> Settings" command to bring up
FileZilla's configuration settings.
Within the "Connection -> SFTP" section, use the "Add keyfile"
command to select the private key file for the server. FileZilla will use
this private key to log in to the server
Use the "File -> Site Manager -> New Site" command to bring up the
FileZilla Site Manager, where you can set up a connection to your
server.
Enter your server host name and specify bitnami as the user name.
Select "SFTP" as the protocol and "Ask for password" as the logon type.
Use the "Connect" button to connect to the server and begin an SFTP
session. You might need to accept the server key, by clicking "Yes" or
"OK" to proceed.
You should now be logged into the /home/bitnami directory on the server. You
can now transfer files by dragging and dropping them from the local server
window to the remote server window.
If you have problems accessing your server, get extra information by use the
"Edit -> Settings -> Debug" menu to activate FileZilla's debug log.
WinSCP
IMPORTANT: To use WinSCP, your server private key should be in PPK
format.
Follow these steps:
Download and install WinSCP.
Launch WinSCP and in the "Session" panel, select "SFTP" as the file
protocol.
Enter your server host name and specify bitnami as the user name.
Click the "Advanced…" button and within the "SSH -> Authentication ->
Authentication parameters" section, select the private key file for the
server. WinSCP will use this private key to log in to the server.
From the "Session" panel, use the "Login" button to connect to the
server and begin an SCP session.
You should now be logged into the /home/bitnami directory on the server. You
can now transfer files by dragging and dropping them from the local server
window to the remote server window.
If you need to upload files to a location where the bitnami user doesn't have
write permissions, you have two options:
Once you have configured WinSCP as described above, click the
"Advanced…" button and within the "Environment -> Shell" panel, select
sudo su - as your shell. This will allow you to upload files using the
administrator account.
Upload the files to the /home/bitnami directory as usual. Then, connect
via SSH and move the files to the desired location with the sudo
command, as shown below:
sudo mv /home/bitnami/uploaded-file /path/to/desired/location/
Cyberduck
IMPORTANT: To use Cyberduck, your server private key should be in PEM
format.
Follow these steps:
Select the "Open Connection" command and specify "SFTP" as the
connection protocol.
In the connection details panel, under the "More Options" section,
enable the "Use Public Key Authentication" option and specify the path
to the private key file for the server.
Use the "Connect" button to connect to the server and begin an SFTP
session.
You should now be logged into the /home/bitnami directory on the server. You
can now transfer files by dragging and dropping them from the local server
window to the remote server window.
Using a Password
Once you have your server's SSH credentials, choose your preferred
application and follow the steps below to connect to the server using SFTP.
FileZilla
Follow these steps:
Download and install FileZilla.
Launch FileZilla and use the "File -> Site Manager -> New Site"
command to bring up the FileZilla Site Manager, where you can set up a
connection to your server.
Enter your server host name.
Select "SFTP" as the protocol and "Ask for password" as the logon type.
Use bitnami as the server username and the password generated
during the server deployment process.
Use the "Connect" button to connect to the server and begin an SFTP
session. You might need to accept the server key, by clicking "Yes" or
"OK" to proceed.
You should now be logged into the /home/bitnami directory on the server. You
can now transfer files by dragging and dropping them from the local server
window to the remote server window.
If you have problems accessing your server, get extra information by use the
"Edit -> Settings -> Debug" menu to activate FileZilla's debug log.
WinSCP
Follow these steps:
Download and install WinSCP.
Launch WinSCP and in the "Session" panel, select "SFTP" as the file
protocol.
Enter your server host name and set bitnami as the server username.
From the "Session" panel, use the "Login" button to connect to the
server and begin an SCP session. Enter the password when prompted.
You should now be logged into the /home/bitnami directory on the server. You
can now transfer files by dragging and dropping them from the local server
window to the remote server window.
Cyberduck
Follow these steps:
Select the "Open Connection" command and specify "SFTP" as the
connection protocol.
In the connection details panel, enter the server IP address, bitnami as
the username, and the password generated during the deployment
process
Use the "Connect" button to connect to the server and begin an SFTP
session.
You should now be logged into the /home/bitnami directory on the server. You
can now transfer files by dragging and dropping them from the local server
window to the remote server window.
What is the default configuration of
CouchDB?
The default access port for CouchDB's HTTP server is 5984. HTTPS is
disabled and remote access is disabled by default.
Learn how to enable SSL for HTTPS on CouchDB.
Learn how to connect to CouchDB from a different machine.
How to connect to CouchDB from a different
machine?
IMPORTANT: Making this application's network ports public and allowing
connections on all interfaces is a significant security risk . You are strongly
advised to only allow access to those ports from non-routable IP addresses. If
access is required from outside of a trusted network, do not allow access to
those ports via a public IP address. Instead, use a secure channel such as a
VPN or an SSH tunnel. Follow these instructions to remotely connect safely
and reliably.
To connect to CouchDB from a different machine, you must open port 5984 for
remote access. Refer to the FAQ for more information on this.
Once the firewall rule is in place, perform these additional steps:
Stop your CouchDB server and edit the
/opt/bitnami/couchdb/etc/local.ini file. If required, change the
bind_address from 127.0.0.1 to 0.0.0.0:
[httpd]
port = YOUR_PORT
bind_address = 0.0.0.0
...
Restart your server for the changes to take effect.
sudo /opt/bitnami/ctlscript.sh restart couchdb
How to change the CouchDB admin
password?
You can modify the CouchDB admin password with these steps:
Stop your server.
sudo /opt/bitnami/ctlscript.sh stop couchdb
Edit your /opt/bitnami/couchdb/etc/local.ini configuration file, editing the
respective admin password to what you want, in the [admin] section.
For example:
admin = my_new_password
CouchDB will take care of hashing your password, so the only thing you
need is to start your server again.
sudo /opt/bitnami/ctlscript.sh restart couchdb
How to enable SSL (for HTTPS) on
CouchDB?
You can enable SSL on CouchDB using these steps:
Stop CouchDB.
sudo /opt/bitnami/ctlscript.sh stop couchdb
Edit your /opt/bitnami/couchdb/etc/local.ini file and edit the [daemons]
section so that the line activating the httpsd daemon is uncommented.
[daemons]
httpsd = {couch_httpd, start_link, [https]}
Within the same file, make sure your [ssl] section includes at least the
following lines uncommented:
[ssl]
port = 6984
cert_file = /opt/bitnami/couchdb/conf/server.crt
key_file = /opt/bitnami/couchdb/conf/server.key
The certificates Bitnami includes are self-signed so you might get a
warning when trying to access your site. To avoid this warning, you
should get new certificates signed by a Certificate Authority, and
uncomment the following line:
;cacert_file = /full/path/to/cacertf
Open the CouchDB HTTPS port in the server firewall. For more
information, refer to the FAQ.
Finally, start your CouchDB server again and you will be able to access
CouchDB over SSL at the selected port eg. at
https://SERVER-IP:6984/.
sudo /opt/bitnami/ctlscript.sh restart couchdb
How to connect to Fauxton?
By default, CouchDB is configured to listen on the local interface only, so an
SSH tunnel is needed to access it. Follow these instructions to remotely
connect safely and reliably.
Once your SSH tunnel is running, you can connect to Fauxton, CouchDB's
management panel, by browsing to http://127.0.0.1:LOCAL_PORT/_utils/. To
log in, use the username and password obtained from the server dashboard.
Remember to replace LOCAL-PORT with the local port number specified
during the SSH tunnel creation.
How to debug CouchDB errors?
To debug CouchDB's errors, use the log files at
/opt/bitnami/couchdb/var/log/couchdb/.