Askbot: How To Install and Configure the Questions and Answers Framework on CentOS 7




Askbot is an open source Question and Answer (Q&A) forum project. It is inspired by StackOverflow and Yahoo Answers.
Askbot is written in Python on top of the Django framework.

  • Efficient question and answer knowledge management
  • Focused on-topic discussions
  • Best answers are shown first
  • Tag and categorize
  • Follow-up in the comments
  • Organize comments and answers by re-posting
  • Everything is editable
  • Users are rewarded with karma for posting useful information
  • Upvotes grow users karma and the downvotes decrease it
  • Votes identify best content, while karma spotlights and rewards experts
  • User privileges grow along with their reputation.
  • Choose either public, private or hidden karma.
  • When new posts are made users can receive notifications

Askbot is being used by Fedora and Shazam Community, among the others.

In this tutorial we will see how to install and configure Askbot on a CentOS 7 Server.

Dependencies Installation

First of all, install packages required by Askbot. On CentOS, these are the “Development Tool” group, EPEL and Python packages.

Install the “Development Tool” group by executing the following yum command:

Next, install EPEL repository:

Last dependencies are those related to Python. In particular, we will use pip to install Askbot:

Install PostgreSQL

Askbot uses PostgreSQL as database system to store its data. PostgreSQL is available in CentOS 7 repositories, so install it executing the following command:

Once the installation is complete, initialize the database with the following command:

Next, start PostgreSQL and enable it to start at boot time:

Login as postgres user and access the psql command line tool:

Create a Database For Askbot

Create a new database and user for Askbot, with the following PostgreSQL queries:

Configure PostgreSQL

Edit PostgreSQL configuration file for authentication setup, which is /var/lib/pgsql/data/pg_hba.conf:

Change all authentication to mIn this tutorial we will see how to install and configure Askbot on a CentOS 7 Server.d5:

Save, close the file and restart PostgreSQL:

Install and Configure Askbot

At this point, it is possible to install Askbot. First of all, create a new user, named askbot:

Next, add this new user to the wheel group:

Upgrade pip to the latest version:

Next, install the virtualenv package:

Log in as the askbot user previously created, and create a new virtual environment with virtualenv:

Activate this new virtual environment, by executing the following command:

Next, install Askbot and other required packages with pip:

Testing Askbot

Last step is to test the Askbot installation. Create a new directory, being sure to not use “askbot” as its name.:

Initialize a new Askbot project by executing the following commands:

During this process, Askbot will ask for some information required to create the project, for example those related to the database created with PostgreSQL.

At the end, generate the Django static files with the following python command:

Generate the database:

So, Askbot has been installed and the testing project configured. Test it with runserver:

With a web browser, go to the server IP address, and you should see a forum page.


In this tutorial we have seen how to install and configure Askbot on a server powered by CentOS 7. Of course, this is just the first step in the realization of a full Q&A website.


Facebook Comments

Show More

Related Articles

Leave a Reply

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

Back to top button