Askbot is a question and answer web forum and it looks like StackOverflow Q&A web forums. It is based on Django web framework and written in Python programming language. It is an open source Q&A web forum project maintained and developed by Evgeny Fadeev.Some most popular open source projects like Ask-Fedora and Ask-LibreOffice uses the AskBot to provide support for their users and clients. This project is funded by open source community like Document Foundation to support the development of Askbot.
AskBot has a responsive layout works with all of the devices and Professional Design. The Source code of AskBot is available at Github known as askbot-devel. It is scalable and works with all large projects with ease.This guide includes setup of AskBot using NGINX Web Server with Gunicorn module, PostgreSQL Database Server, required library packages and Python modules that is required. In order to accomplish the task you need to follow all the steps carefully.


To follow this tutorial, you will need:

  1. A VPS with minimum 1GB RAM.
  2. A normal user account with sudo privileges.

Step-1 (Install the required packages )

For CentOS / RHEL

Install EPEL Repository

[centos@techbrown ~]$ sudo yum install epel-release

Install Required packages

[centos@techbrown ~]$ sudo yum install python-pip python-devel postgresql-server postgresql-devel postgresql-contrib gcc nginx
For Ubuntu / Debian

Update the repositories

[ubuntu@techbrown ~]$ sudo apt-get update

Install Required packages

[ubuntu@techbrown ~]$ sudo apt-get install python-pip python-dev python-flup libpq-dev postgresql postgresql-contrib nginx zlib1g-dev libpng-dev libjpeg-dev gunicorn supervisor python-setuptools

Step-2 (PostgreSQL Database Configuration)

For CentOS / RHEL

Start the PostgreSQL services

[centos@techbrown ~]$ sudo systemctl start postgresql

Switch to postgres prompt

[centos@techbrown ~]$ sudo su - postgres

Enter to the PostgreSQL prompt

[centos@techbrown ~]$ psql
For Ubuntu / Debian

Enter to the PostgreSQL prompt

[ubuntu@techbrown ~]$ sudo -u postgres psql

Step-3 (Create PostgreSQL Database)

First of all we will create a database techbrown for AskBot project.

postgres=# CREATE DATABASE techbrown;

We will create a database user techbrownuser which we will use to to interact with the PostgreSQL database. Ensure that Password is strong.

postgres=# CREATE USER techbrownuser WITH PASSWORD 'techbrownpassword';

We’ll set UTF-8 for the database this is required by Askbot.

postgres=# ALTER ROLE techbrownuser SET client_encoding TO 'utf8';

Now, grant all privileges to DB user techbrownuser to techbrown database

postgres=# GRANT ALL PRIVILEGES ON DATABASE techbrown TO techbrownuser;

Exit from PostgreSQL prompt

postgres=# \q

Step-4 (AskBot Installation)

Change the Directory where Askbot is to be installed

[user@techbrown ~]$ cd /home/techbrown

Now, Install the Python setup tools

[user@techbrown ~]$ sudo easy_install -U setuptools

Now, upgrade the Python PIP packages

[user@techbrown ~]$ sudo pip install --upgrade pip

Install Askbot using PIP Installation methods

[user@techbrown ~]$ sudo pip install askbot psycopg2 gunicorn

After that install the Askbot on current directory

[user@techbrown ~]$ sudo askbot-setup

Step-5 (AskBot Configuration)

Now collect all files into base directory location.

[user@techbrown ~]$ sudo python manage.py collectstatic

Now we can synchronize the data structures to PostgreSQL database.

[user@techbrown ~]$ sudo python manage.py syncdb

Allow the port 9999 to firewall

[user@techbrown ~]$ sudo ufw allow 9999

Finally it’s time to run the AskBot development server on port 9999. which checks and ensures that everything works fine:

[user@techbrown ~]$ sudo python manage.py runserver

Now Askbot appears in your browser.
Finally hit on Please sign in button
Create a new account at the site this will be your administrator account
Now bind the Askbot site to successfully run with gunicorn

[user@techbrown ~]$ sudo gunicorn --bind wsgi:application

After that the Askbot site is successfully works with browser

That’s all for now.

How to Install Sphinx-Doc on Ubuntu / CentOS

Previous article

How to Use SSH Key Based Login with PuTTY on Windows 10

Next article

You may also like


Leave a reply

Your email address will not be published. Required fields are marked *

More in Linux