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.

Also Read  Linux File Permissions and Disc Partition on CentOS 7 / RHEL 8

Prerequisites

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

Firs of all Install EPEL Repository

$ sudo yum install epel-release

Secondly Install Required packages

$ sudo yum install python-pip python-devel postgresql-server postgresql-devel postgresql-contrib gcc nginx

For Ubuntu / Debian

Then Update the repositories

$ sudo apt-get update

After that Install Required packages

$ 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

Firstly Start the PostgreSQL services

$ sudo systemctl start postgresql

Secondly Switch to postgres prompt

$ sudo su - postgres

Enter to the PostgreSQL prompt

$ psql

For Ubuntu / Debian

Enter to the PostgreSQL prompt

$ sudo -u postgres psql

Step-3 (Create PostgreSQL Database)

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

# 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.

Also Read  How to Fix Installation Failed at Boot /dev/root Does Not Exist on CentOS 7 / RHEL 8
# CREATE USER techbrownuser WITH PASSWORD 'techbrownpassword';

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

# ALTER ROLE techbrownuser SET client_encoding TO 'utf8';

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

# GRANT ALL PRIVILEGES ON DATABASE techbrown TO techbrownuser;

Exit from PostgreSQL prompt

# \q

Step-4 (AskBot Installation)

Change the Directory

$ cd /home/techbrown

Now, Install the Python setup tools

$ sudo easy_install -U setuptools

Now, upgrade the Python PIP packages

$ sudo pip install --upgrade pip

Install Askbot using PIP Installation methods

$ sudo pip install askbot psycopg2 gunicorn

After that install the Askbot on current directory

$ sudo askbot-setup

Step-5 (AskBot Configuration)

Now collect all files into base directory location.

$ sudo python manage.py collectstatic

Now we can synchronize the data structures to PostgreSQL database.

$ sudo python manage.py syncdb

Allow the port 9999 to firewall

$ 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:

Also Read  How to Mount NTFS File System on CentOS 7 / RHEL 8
$ sudo python manage.py runserver 198.59.10.11:9999

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

$ sudo gunicorn --bind 198.59.10.11:9999 wsgi:application

After that the Askbot site is successfully works with browser
5

Congratulations now you have installed and configured the Askbot on CentOS and Ubuntu.