{"id":13154,"date":"2019-04-01T03:38:50","date_gmt":"2019-04-01T03:38:50","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13154"},"modified":"2019-04-01T03:38:50","modified_gmt":"2019-04-01T03:38:50","slug":"askbot-create-your-own-qa-forum-like-stack-overflow","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/01\/askbot-create-your-own-qa-forum-like-stack-overflow\/","title":{"rendered":"Askbot \u2013 Create Your Own Q&#038;A Forum Like Stack Overflow"},"content":{"rendered":"<p><strong>Askbot<\/strong>\u00a0is an open source, simple yet powerful, fast and highly-customizable software for creating a question and answer (Q&amp;A) forum. It is inspired by\u00a0<strong>StackOverflow<\/strong>\u00a0and\u00a0<strong>YahooAnswers<\/strong>, and written in\u00a0<strong>Python<\/strong>\u00a0on top of the\u00a0<strong>Django<\/strong>\u00a0web framework.<\/p>\n<p>It allows for efficient question and answer knowledge management, thus organizations such as\u00a0<a href=\"https:\/\/ask.fedoraproject.org\/en\/questions\/\" target=\"_blank\" rel=\"nofollow noopener\">Fedora\u2019s Q&amp;A forums<\/a>\u00a0and\u00a0<a href=\"https:\/\/ask.libreoffice.org\/en\/questions\/\" target=\"_blank\" rel=\"nofollow noopener\">LibreOffice\u2019s Q&amp;A Forums<\/a>\u00a0are making good use of it. Askbot can work as a standalone application or can be integrated with your existing Django apps or other web platforms.<\/p>\n<div id=\"attachment_31094\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Askbot-Question-and-Answers-Forum.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31094\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Askbot-Question-and-Answers-Forum.png\" sizes=\"auto, (max-width: 989px) 100vw, 989px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Askbot-Question-and-Answers-Forum.png 989w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Askbot-Question-and-Answers-Forum-768x560.png 768w\" alt=\"Askbot Question and Answers Forum\" width=\"989\" height=\"721\" aria-describedby=\"caption-attachment-31094\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-31094\" class=\"wp-caption-text\">Askbot Question and Answers Forum<\/p>\n<\/div>\n<p>In this tutorial you will learn how to install\u00a0<strong>AskBot<\/strong>\u00a0on\u00a0<strong>CentOS 7<\/strong>. In order to complete the tutorial, you will need to have a\u00a0<a href=\"https:\/\/www.tecmint.com\/centos-7-3-installation-guide\/\" target=\"_blank\" rel=\"noopener\">CentOS 7 server minimal installation<\/a>\u00a0with root access.<\/p>\n<h3>Step 1: Install Required Dependencies<\/h3>\n<p>We will start by installing the required dependencies such as\u00a0<strong>development tools<\/strong>\u00a0by using the following command in a terminal.<\/p>\n<pre># yum group install 'Development Tools'<\/pre>\n<p>After that we will install\u00a0<strong>Epel repository<\/strong>, if it hasn\u2019t already been installed on your system.<\/p>\n<pre># yum install epel-release\r\n<\/pre>\n<p>Lastly, we will install some of the python dependencies required to later run\u00a0<strong>AskBot<\/strong>.<\/p>\n<pre># yum install python-pip python-devel python-six\r\n<\/pre>\n<p>In case\u00a0<a href=\"https:\/\/www.tecmint.com\/install-pip-in-linux\/\" target=\"_blank\" rel=\"noopener\">python-pip<\/a>\u00a0is not installed with the above command, you can install it with by using the following command.<\/p>\n<pre># curl \"https:\/\/bootstrap.pypa.io\/get-pip.py\" -o \"get-pip.py\" &amp;&amp; python get-pip.py\r\n<\/pre>\n<h3>Step 2: Install PostgreSQL Database<\/h3>\n<p><strong>AskBot<\/strong>\u00a0requires a database where it will store its data. It uses\u00a0<strong>PostgreSQL<\/strong>, so we will need to install it and configure it on our system.<\/p>\n<p>You can use the following command to complete the installation.<\/p>\n<pre># yum -y install postgresql-server postgresql-devel postgresql-contrib\r\n<\/pre>\n<p>When the installation is complete, initialize\u00a0<strong>PostgreSQL<\/strong>\u00a0with.<\/p>\n<pre># postgresql-setup initdb\r\n<\/pre>\n<p>If everything goes normally, you should see the following:<\/p>\n<pre>Initializing database ... OK\r\n<\/pre>\n<p>Our next step is to start PostgreSQL and enable it to start on boot:<\/p>\n<pre># systemctl start postgresql\r\n# systemctl enable postgresql\r\n<\/pre>\n<p>Now that our database server is up and running, we will login as\u00a0<strong>postgres<\/strong>\u00a0user to create a database for our\u00a0<strong>AskBot<\/strong>\u00a0installation.<\/p>\n<pre># su - postgres\r\n<\/pre>\n<p>Then use to:<\/p>\n<pre>$ psql\r\n<\/pre>\n<p>Now you are the\u00a0<strong>PostgreSQL<\/strong>\u00a0prompt, ready to create our database, database user and grant the user privileges on the new database. Create the database by using the command below, feel free to change the database name per your preferences:<\/p>\n<pre>postgres=# <strong>create database askbot_db;<\/strong>\r\n<\/pre>\n<p>Next create the database user. Replace\u00a0<strong>\u201cpassword_here\u201d<\/strong>\u00a0with a strong password:<\/p>\n<pre>postgres=# <strong>create user askbot_user with password 'password_here';<\/strong>\r\n<\/pre>\n<p>Grant the user privileges on the\u00a0<strong>askbot_db<\/strong>:<\/p>\n<pre>postgres=# <strong>grant all privileges on database askbot_db to askbot_user;<\/strong>\r\n<\/pre>\n<p>Next we will need to edit the PostgreSQL configuration to change our authentication method to\u00a0<strong>md5<\/strong>. To do this, use your favorite text editor and edit\u00a0<strong>\/var\/lib\/pgsql\/data\/pg_hba.conf<\/strong>\u00a0file:<\/p>\n<pre># vim \/var\/lib\/pgsql\/data\/pg_hba.conf\r\n<\/pre>\n<p>The configurations should look like this:<\/p>\n<div id=\"attachment_31092\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/PostgreSQL-Configuration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31092\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/PostgreSQL-Configuration.png\" alt=\"PostgreSQL Configuration\" width=\"734\" height=\"207\" aria-describedby=\"caption-attachment-31092\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-31092\" class=\"wp-caption-text\">PostgreSQL Configuration<\/p>\n<\/div>\n<p>Next save the changes and restart PostgreSQL:<\/p>\n<pre># systemctl restart postgresql\r\n<\/pre>\n<h3>Step 3: Install AskBot Forum<\/h3>\n<p>Finally we can proceed with the installation of\u00a0<strong>AskBot<\/strong>. Start by creating new user on your system. We will call it\u00a0<strong>askbot<\/strong>:<\/p>\n<pre># useradd -m -s \/bin\/bash askbot\r\n<\/pre>\n<p>Setup password for the new user:<\/p>\n<pre># passwd askbot\r\n<\/pre>\n<p>Next we will need to add the user to the wheel group on the system:<\/p>\n<pre># usermod -a -G wheel askbot\r\n<\/pre>\n<p>Now we will use pip to install\u00a0<strong>virtualenv<\/strong>\u00a0package:<\/p>\n<pre># pip install virtualenv six\r\n<\/pre>\n<p>Now we will log as the\u00a0<strong>askbot<\/strong>\u00a0user and create new virtual environment:<\/p>\n<pre># su - askbot\r\n$ virtualenv tecmint\/\r\n<\/pre>\n<h5>Sample Output<\/h5>\n<pre>New python executable in \/home\/askbot\/tecmint\/python\r\nInstalling setuptools, pip, wheel...\r\ndone.\r\n<\/pre>\n<p>Next step is to activate the virtual environment with the following command:<\/p>\n<pre># source tecmint\/bin\/activate\r\n<\/pre>\n<p>Now we are ready to install\u00a0<strong>AskBot<\/strong>\u00a0via pip.<\/p>\n<pre># pip install six askbot psycopg2\r\n<\/pre>\n<p>The installation may take a couple of minutes. Once it is complete, we can test our installation in a temporary directory. Make sure NOT to name that directory\u00a0<strong>askbot<\/strong>.<\/p>\n<pre># mkdir forum_test &amp;&amp; cd forum_test\r\n<\/pre>\n<p>Next we will initialize a new AskBot project with:<\/p>\n<pre># askbot-setup\r\n<\/pre>\n<p>You will be asked a few question where you will have to select the installation directory \u2013 use\u00a0<code>\u201c.\u201d<\/code>\u00a0(without quotes) to choose the current directory. Next you will need to enter the earlier prepared database name, database user and its password.<\/p>\n<p>Next we will generate the static files for Django with:<\/p>\n<pre># python manage.py collectstatic\r\n<\/pre>\n<p>Next we generate the database:<\/p>\n<pre># python manage.py syncdb\r\n<\/pre>\n<p>And finally start the server with:<\/p>\n<pre># python manage.py runserver 127.0.0.1:8080\r\n<\/pre>\n<p>When you go to your browser to\u00a0<code>http:\/\/127.0.0.1:8080<\/code>\u00a0\u2013 you should see the askbot interface.<\/p>\n<p>That\u2019s all!\u00a0<strong>Askbot<\/strong>\u00a0is an open source, simple, fast and highly-customizable question and answer (Q&amp;A) forum software. It supports efficient question and answer knowledge management. If you encountered any errors during the installation or have any other related queries, use the feedback form below to reach us.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/askbot-qa-forum-like-stack-overflow\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Askbot\u00a0is an open source, simple yet powerful, fast and highly-customizable software for creating a question and answer (Q&amp;A) forum. It is inspired by\u00a0StackOverflow\u00a0and\u00a0YahooAnswers, and written in\u00a0Python\u00a0on top of the\u00a0Django\u00a0web framework. It allows for efficient question and answer knowledge management, thus organizations such as\u00a0Fedora\u2019s Q&amp;A forums\u00a0and\u00a0LibreOffice\u2019s Q&amp;A Forums\u00a0are making good use of it. Askbot can work &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/01\/askbot-create-your-own-qa-forum-like-stack-overflow\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Askbot \u2013 Create Your Own Q&#038;A Forum Like Stack Overflow&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13154","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13154"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13154\/revisions"}],"predecessor-version":[{"id":13155,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13154\/revisions\/13155"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}