Bitnami OSQA for Huawei Enterprise Cloud

Similar documents
Bitnami Re:dash for Huawei Enterprise Cloud

Bitnami ez Publish for Huawei Enterprise Cloud

Bitnami Coppermine for Huawei Enterprise Cloud

Bitnami ERPNext for Huawei Enterprise Cloud

Bitnami ProcessMaker Community Edition for Huawei Enterprise Cloud

Bitnami Dolibarr for Huawei Enterprise Cloud

Bitnami Piwik for Huawei Enterprise Cloud

Bitnami OroCRM for Huawei Enterprise Cloud

Bitnami Tiny Tiny RSS for Huawei Enterprise Cloud

Bitnami Trac for Huawei Enterprise Cloud

Bitnami TestLink for Huawei Enterprise Cloud

Bitnami Mantis for Huawei Enterprise Cloud

Bitnami Pimcore for Huawei Enterprise Cloud

Bitnami JFrog Artifactory for Huawei Enterprise Cloud

Bitnami DokuWiki for Huawei Enterprise Cloud

Bitnami Open Atrium for Huawei Enterprise Cloud

Bitnami Spree for Huawei Enterprise Cloud

Bitnami Moodle for Huawei Enterprise Cloud

Bitnami Phabricator for Huawei Enterprise Cloud

Bitnami Subversion for Huawei Enterprise Cloud

Bitnami MediaWiki for Huawei Enterprise Cloud

Bitnami Magento for Huawei Enterprise Cloud

Bitnami ELK for Huawei Enterprise Cloud

Bitnami Apache Solr for Huawei Enterprise Cloud

Bitnami Alfresco Community for Huawei Enterprise Cloud

Bitnami JRuby for Huawei Enterprise Cloud

Bitnami Ruby for Huawei Enterprise Cloud

Bitnami MEAN for Huawei Enterprise Cloud

Bitnami HHVM for Huawei Enterprise Cloud

Bitnami MariaDB for Huawei Enterprise Cloud

Bitnami MySQL for Huawei Enterprise Cloud

Bitnami Node.js for Huawei Enterprise Cloud

Bitnami Kafka for Huawei Enterprise Cloud

Bitnami Cassandra for Huawei Enterprise Cloud

An internal CA that is part of your IT infrastructure, like a Microsoft Windows CA

0. Introduction On-demand. Manual Backups Full Backup Custom Backup Store Your Data Only Exclude Folders.

BriCS. University of Bristol Cloud Service Simulation Runner. User & Developer Guide. 1 October John Cartlidge & M.

VMware Identity Manager Connector Installation and Configuration (Legacy Mode)

SONOTON storage server

Setting Up the Server

Ftp Command Line Manual Windows User Password

Ftp Command Line Manual Windows Username Password Linux

SUREedge MIGRATOR INSTALLATION GUIDE FOR HYPERV

System Setup. Accessing the Administration Interface CHAPTER

SUREedge MIGRATOR INSTALLATION GUIDE FOR NUTANIX ACROPOLIS

Installing and Configuring VMware Identity Manager Connector (Windows) OCT 2018 VMware Identity Manager VMware Identity Manager 3.

Automated Installation Guide for CentOS (PHP 7.x)

Teradici PCoIP Connection Manager 1.8 and Security Gateway 1.14

Cisco Prime Service Catalog Virtual Appliance Quick Start Guide 2

Upgrade Instructions. NetBrain Integrated Edition 7.1. Two-Server Deployment

DCLI User's Guide. Data Center Command-Line Interface 2.9.1

System Administration

How To Start Mysql Use Linux Command Line Client In Xampp

How To Start Mysql Use Linux Command Line Client In Ubuntu

Server Installation Guide

Ftp Command Line Manual Windows Example Port 22

VMware AirWatch Content Gateway for Linux. VMware Workspace ONE UEM 1811 Unified Access Gateway

Cisco CTL Client setup

CUSTOMER CONTROL PANEL... 2 DASHBOARD... 3 HOSTING &

How To Start Mysql Using Linux Command Line Client In Ubuntu

Online Backup Client User Manual

Hypertext Transfer Protocol Over Secure Sockets Layer (HTTPS)

Using Hypertext Transfer Protocol over Secure Sockets Layer (HTTPS)

DCLI User's Guide. Modified on 20 SEP 2018 Data Center Command-Line Interface

DCLI User's Guide. Data Center Command-Line Interface

Buzztouch Server 2.0 with Amazon EC2

Online Backup Client User Manual

Performing Maintenance Operations

Storage Made Easy Cloud Appliance installation Guide

SUREedge MIGRATOR INSTALLATION GUIDE FOR VMWARE

SUREedge DR Installation Guide for Windows Hyper-V

Hypertext Transfer Protocol over Secure Sockets Layer (HTTPS)

IBM Aspera Application On Demand / Server On Demand (APOD / SOD) 3.7.3

Alliance Key Manager AKM for AWS Quick Start Guide. Software version: Documentation version:

AWS Remote Access VPC Bundle

Install and upgrade Qlik Sense. Qlik Sense 3.2 Copyright QlikTech International AB. All rights reserved.

Author A.Kishore/Sachin WinSCP

LiveNX Upgrade Guide from v5.2.0 to v5.2.1

VisibleThread - Server Configuration Help

Net LineDancer v13. Install Guide for Linux. Revision History

Installing an SSL certificate on your server

Using SSL/TLS with Active Directory / LDAP

SafeConsole On-Prem Install Guide. version DataLocker Inc. July, SafeConsole. Reference for SafeConsole OnPrem

Amazon Web Services Hands on EC2 December, 2012

WinSCP. Author A.Kishore/Sachin

Topics. What is a RaspberryPi? Why should I want one? What is Raspbian? What is SSH? What is FTP? What is LAMP? Making a LAMP Stack!

2. Installing OpenBiblio 1.0 on a Windows computer

Immersion Day. Getting Started with Linux on Amazon EC2

Install Certificate on the Cisco Secure ACS Appliance for PEAP Clients

Backing Up And Restoring Your Nagios XI System

InControl 2 Software Appliance Setup Guide

Transport Gateway Installation / Registration / Configuration

Adobe Marketing Cloud Bloodhound for Mac 3.0

Upgrading Cisco UCS Director to Release 6.6

LifeSize Control Installation Guide

JAMF Software Server Installation and Configuration Guide for Linux. Version 9.31

Contents. Upgrading Contents 2

Please select your version

Moab Viewpoint. Reference Guide August 2016

Kollaborate Server. Installation Guide

Transcription:

Bitnami OSQA for Huawei Enterprise Cloud Description OSQA is a question and answer system that helps manage and grow online communities similar to Stack Overflow. First steps with the Bitnami OSQA Stack Welcome to your new Bitnami application running on Huawei Enterprise Cloud! Here are a few questions (and answers!) you might need when first starting with your application. What is the administrator username set for me to log in to the application for the first time? Username: user What is the administrator password? To obtain the administrator password, click the "Remote Login" menu option next to the server name in the Huawei Cloud Server Console. This will launch a new browser window with an encrypted login session. The application password will be displayed on the login welcome screen. What SSH username should I use for secure shell access to my application? SSH username: root How to connect to the PostgreSQL database? You can connect to the PostgreSQL database from the same computer where it is installed with the psql client tool. psql -U postgres You will be prompted to enter the postgres user password. Find out how to obtain application credentials. 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 Updating the IP address or hostname OSQA requires updating the IP address/domain name if the machine IP address/domain name changes. The bnconfig tool also has an option which updates the IP address, called machine_hostname (use help to check if that option is available for your application). Note that this tool changes the URL to http://new_domain/osqa. sudo /opt/bitnami/apps/osqa/bnconfig --machine_hostname NEW_DOMAIN If you have configured your machine to use a static domain name or IP address, you should rename or remove the /opt/bitnami/apps/osqa/bnconfig file. sudo mv /opt/bitnami/apps/osqa/bnconfig /opt/bitnami/apps/osqa/bnconfig. disabled NOTE: Be sure that your domain is propagated. Otherwise, this will not work. You can verify the new DNS record by using the Global DNS Propagation Checker and entering your domain name into the search field. You can also change your hostname by modifying it in your hosts file. Enter the new hostname using your preferred editor. sudo nano /etc/hosts Add a new line with the IP address and the new hostname. Here's an example. Remember to replace the IP-ADDRESS and DOMAIN placeholders with the correct IP address and domain name. IP-ADDRESS DOMAIN

How to create a full backup of OSQA? Backup The Bitnami OSQA Stack is self-contained and the simplest option for performing a backup is to copy or compress the Bitnami stack installation directory. To do so in a safe manner, you will need to stop all servers, so this method may not be appropriate if you have people accessing the application continuously. Follow these steps: Change to the directory in which you wish to save your backup: cd /your/directory Stop all servers: sudo /opt/bitnami/ctlscript.sh stop Create a compressed file with the stack contents: sudo tar -pczvf application-backup.tar.gz /opt/bitnami Restart all servers: sudo /opt/bitnami/ctlscript.sh start You should now download or transfer the application-backup.tar.gz file to a safe location. Restore Follow these steps: Change to the directory containing your backup: cd /your/directory Stop all servers: sudo /opt/bitnami/ctlscript.sh stop Move the current stack to a different location: sudo mv /opt/bitnami /tmp/bitnami-backup

Uncompress the backup file to the original directoryv sudo tar -pxzvf application-backup.tar.gz -C / Start all servers: sudo /opt/bitnami/ctlscript.sh start If you want to create only a database backup, refer to these instructions for MySQL and PostgreSQL. How to upload files to the server with SFTP? Although you can use any SFTP/SCP client to transfer files to your server, the link below explains how to configure FileZilla (Windows, Linux and Mac OS X), WinSCP (Windows) and Cyberduck (Mac OS X). It is required to use your server's private SSH key to configure the SFTP client properly. Choose your preferred application and follow the steps in the link below to connect to the server through SFTP. How to upload files to the server How to enable HTTPS support with SSL certificates? NOTE: The steps below assume that you are using a custom domain name and that you have already configured the custom domain name to point to your cloud server. Bitnami images come with SSL support already pre-configured and with a dummy certificate in place. Although this dummy certificate is fine for testing and development purposes, you will usually want to use a valid SSL certificate for production use. You can either generate this on your own (explained here) or you can purchase one from a commercial certificate authority. Once you obtain the certificate and certificate key files, you will need to update your server to use them. Follow these steps to activate SSL support: Use the table below to identify the correct locations for your certificate and configuration files. Variable Current URL Apache file Certificate file Value application https://[custom-domain]/ Example: https://my-domain.com/ or https://my-domain.com/appname configuration /opt/bitnami/apache2/conf/bitnami/bitnami.conf /opt/bitnami/apache2/conf/server.crt

Variable Certificate key file Value /opt/bitnami/apache2/conf/server.key CA certificate bundle /opt/bitnami/apache2/conf/server-ca.crt file (if present) Copy your SSL certificate and certificate key file to the specified locations. NOTE: If you use different names for your certificate and key files, you should reconfigure the SSLCertificateFile and SSLCertificateKeyFile directives in the corresponding Apache configuration file to reflect the correct file names. If your certificate authority has also provided you with a PEM-encoded Certificate Authority (CA) bundle, you must copy it to the correct location in the previous table. Then, modify the Apache configuration file to include the following line below the SSLCertificateKeyFile directive. Choose the correct directive based on your scenario and Apache version: Variable Value Apache configuration file /opt/bitnami/apache2/conf/bitnami/bitnami.conf Directive to include SSLCACertificateFile (Apache v2.4.8+) "/opt/bitnami/apache2/conf/server-ca.crt" Directive to include SSLCertificateChainFile (Apache < v2.4.8) "/opt/bitnami/apache2/conf/server-ca.crt" NOTE: If you use a different name for your CA certificate bundle, you should reconfigure the SSLCertificateChainFile or SSLCACertificateFile directives in the corresponding Apache configuration file to reflect the correct file name. Once you have copied all the server certificate files, you may make them readable by the root user only with the following commands: sudo chown root:root /opt/bitnami/apache2/conf/server* sudo chmod 600 /opt/bitnami/apache2/conf/server* Open port 443 in the server firewall. Refer to the FAQ for more information. Restart the Apache server. You should now be able to access your application using an HTTPS URL. How to create an SSL certificate? You can create your own SSL certificate with the OpenSSL binary. A certificate request can then be sent to a certificate authority (CA) to get it signed into a certificate, or if you have your own certificate authority, you may sign it yourself,

or you can use a self-signed certificate (because you just want a test certificate or because you are setting up your own CA). Create your private key (if you haven't created it already): sudo openssl genrsa -out /opt/bitnami/apache2/conf/server.key 2048 Create a certificate: sudo openssl req -new -key /opt/bitnami/apache2/conf/server.key -o ut /opt/bitnami/apache2/conf/cert.csr IMPORTANT: Enter the server domain name when the above command asks for the "Common Name". Send cert.csr to the certificate authority. When the certificate authority completes their checks (and probably received payment from you), they will hand over your new certificate to you. Until the certificate is received, create a temporary self-signed certificate: sudo openssl x509 -in /opt/bitnami/apache2/conf/cert.csr -out /opt /bitnami/apache2/conf/server.crt -req -signkey /opt/bitnami/apach e2/conf/server.key -days 365 Back up your private key in a safe location after generating a password-protected version as follows: sudo openssl rsa -des3 -in /opt/bitnami/apache2/conf/server.key -o ut privkey.pem Note that if you use this encrypted key in the Apache configuration file, it will be necessary to enter the password manually every time Apache starts. Regenerate the key without password protection from this file as follows: sudo openssl rsa -in privkey.pem -out /opt/bitnami/apache2/conf/se rver.key Find more information about certificates at http://www.openssl.org. How to force HTTPS redirection? Add the following to the top of the /opt/bitnami/apps/osqa/conf/httpd-prefix.conf file:

RewriteEngine On RewriteCond %{HTTPS}!=on RewriteRule ^/(.*) https://%{server_name}/$1 [R,L] After modifying the Apache configuration files, restart Apache to apply the changes. How to debug Apache errors? Once Apache starts, it will create two log files at /opt/bitnami/apache2/logs/access_log and /opt/bitnami/apache2/logs/error_log respectively. The access_log file is used to track client requests. When a client requests a document from the server, Apache records several parameters associated with the request in this file, such as: the IP address of the client, the document requested, the HTTP status code, and the current time. The error_log file is used to record important events. This file includes error messages, startup messages, and any other significant events in the life cycle of the server. This is the first place to look when you run into a problem when using Apache. If no error is found, you will see a message similar to: Syntax OK How to change the language in OSQA? To change the language, edit the file at /opt/bitnami/apps/osqa/settings_local.py, change the LANGUAGE_CODE settings and restart the Apache server: Troubleshooting If you see an error like the one below, the language pack does not ship all the strings yet: packages/django/utils/translation/trans_real.py", line 67, in init gettext_module.gnutranslations. init (self, *args, **kw) File "/usr/lib/python2.6/gettext.py", line 180, in init self._parse(fp) File "/usr/lib/python2.6/gettext.py", line 273, in _parse magic = unpack('<i', buf[:4])[0]

struct.error: unpack requires a string argument of length 4 To translate it yourself, follow these steps: Run the following command: cd /opt/bitnami/apps/osqa sudo django-admin.py makemessages -l de This will generate a "/opt/bitnami/apps/osqa/locale/de/lc_messages/django.po" file. Translate the empty strings in that file. Once translated, execute the following command to compile them: sudo django-admin.py compilemessages Restart Apache: sudo /opt/bitnami/ctlscritp.sh restart apache Follow these steps: Browse to the OSQA administration panel. Configure SMTP settings as shown below. This example uses Gmail but any other email provider may also be used. Replace USERNAME and PASSWORD with your Gmail account username and password respectively. Email Server: smtp.gmail.com Email Port: 587 Email User: USERNAME@gmail.com Email Password: PASSWORD Use TLS: Enabled Site "from" Email Address: USERNAME@gmail.com

How to enable Facebook login in OSQA? NOTE: These steps assume that the application is running at a sub-path of the domain root, such as /osqa. If this is not the case, modify the URLs that appear below to reflect the correct path to the application. They also assume that you already have a Facebook account and are logged in. NOTE: Users of the Bitnami OSQA Stack v1.0rc5 and older must move the application to the domain root in order to be able to use the Facebook login feature. Follow these steps: Browse to http://developers.facebook.com/. Click the "Apps -> Create a New App" option. Enter the application name in the "Display Name" field and choose a category. Click the "Application Creation" button. Fill out the security check (CAPTCHA). Navigate to the "Settings" tab.

Click the "Add Platform" button, and select the "Website" option. Enter the details below, replacing the SERVER-IP placeholder with your domain name. o Site URL: http://server-ip/osqa o App Domains: http://server-ip/ Click "Save Changes". Make a note of the "App ID" and "Secret Key". Log in to the OSQA application. Click the administration link at the top of the page. Click "External Keys" in the right navigation menu. Enter the Facebook API key and Facebook application secret. Click the "Save" button. Click your user name at the top of the OSQA page to view the user profile page. Click the "User Tools -> Authentication Settings" menu item. Click the "Add new provider" option. Click the "Facebook" button. In the resulting pop-up window, click the "Connect" button. Click the "Allow" button, to allow the site to see your email address. You should now see a Facebook sign-in option in the user profile authentication settings. How to enable Google login in OSQA? NOTE: These steps require the application to be running at the domain root. They will not work if the application is located at any other path, such as /osqa. They also assume that you already have a Google Account and are logged in. Follow these steps: Browse to https://console.developers.google.com. Click "Create Project" and set a name for the project. In the right navigation menu, select "APIs & Auth -> Credentials" and click "Create New Client". You'll be prompted with this screen:

Check the "Web application" type. Fill "Authorized Javascript origins" with your domain name. Fill "Authorized redirect URIs" with the values http://server-ip/account/googleplus/done/ and http://server-ip/account/register/, replacing the SERVER-IP placeholder with your domain name. Click the "Create Client ID" button. Download the JSON file and rename it to client_secrets.json. Copy the file to your server (via scp, ftp or any other method). Place the file in the /opt/bitnami/apps/osqa/ directory. Change file permissions: chown daemon:daemon /opt/bitnami/apps/osqa/client_secrets.json

chown daemon:daemon /opt/bitnami/python/lib/python2.7/site-packag es/httplib2-0.9-py2.7.egg/httplib2/cacerts.txt Restart the server: /opt/bitnami/ctlscript.sh restart A Google sign-in button should now appear on the application login page. How to enable Twitter login in OSQA? NOTE: These steps assume that the application is running at a sub-path of the domain root, such as /osqa. If this is not the case, modify the URLs that appear below to reflect the correct path to the application. They also assume that you already have a Twitter account and are logged in. Follow these steps: Browse to http://twitter.com/apps/new. Click "Create New App". Enter the title or URL of your website in the "Name" field, and a brief description in the "Description" field. Enter the details below, replacing the SERVER-IP placeholder with your domain name. o Website: http://server-ip/osqa/account o Callback URL: http://server-ip/osqa/account/twitter/done/ Agree to the license terms. Click the "Save" button. Browse to the "API Keys" tab and make a note of the "API Key" and "API Secret" fields. Log in to the OSQA application. Click the administration link at the top of the page. Click "External Keys" in the right navigation menu. Enter the Twitter "API Key" in the "Twitter Consumer Key" field and the Twitter "API Secret" in the "Twitter Consumer Secret" fields. Click the "Save" button. Click your user name at the top of the OSQA page to view the user profile page.

Click the "User Tools -> Authentication Settings" menu item. Click the "Add new provider" option. Click the "Twitter" button. In the resulting Twitter authorization page, click the "Allow" button. You should now see a Twitter authentication option in the user profile authentication settings. How to make OSQA private? To force user authentication for the OSQA site, add the last two lines below to the file /opt/bitnami/apps/osqa/forum/views/decorators.py so that it looks like this: def render(template=none, tab=none, tab_title='', weight=500, tabbed=tru e): def decorator(func): def decorated(context, request, *args, **kwargs): if request.user.is_authenticated(): else: ONLINE_USERS[request.user] = datetime.now() return HttpResponseRedirect(reverse('auth_signin')) How to upgrade OSQA? It is strongly recommended to create a backup before starting the update process. If you have important data, create and try to restore a backup to ensure that everything works properly. You can upgrade the application only without modifying any other stack components. Follow these steps: Stop all servers. Backup the /opt/bitnami/apps/osqa directory in case something fails and the application needs to be restored. Download the the latest version from the OSQA project site. Overwrite all the files in /opt/bitnami/apps/osqa with the new ones except the settings.py file Start all servers. At the server console, execute these commands:

cd /opt/bitnami/apps/osqa python manage.py migrate forum How to run OSQA with memcached? NOTE: These steps assume that you already have memcached installed. To run OSQA with memcached, follow the steps below: Ensure that memcached is running: sudo /opt/bitnami/ctlscript.sh start memcached Install the python-memcached package: sudo pip install python-memcached Modify the /opt/bitnami/apps/osqa/settings_local.py file as below: CACHE_BACKEND = 'memcached://127.0.0.1:11211/' Restart the Apache server sudo /opt/bitnami/ctlscript.sh restart apache