{"id":279,"date":"2018-10-17T06:57:41","date_gmt":"2018-10-17T06:57:41","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/askbot-how-to-install-and-configure-the-questions-and-answers-framework-on-centos-7\/"},"modified":"2018-10-17T06:57:41","modified_gmt":"2018-10-17T06:57:41","slug":"askbot-how-to-install-and-configure-the-questions-and-answers-framework-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/askbot-how-to-install-and-configure-the-questions-and-answers-framework-on-centos-7\/","title":{"rendered":"Askbot: How To Install and Configure the Questions and Answers Framework on CentOS 7"},"content":{"rendered":"<p>&#xD;<br \/>\n&#xD;<br \/>\n <a href=\"https:\/\/s24255.pcdn.co\/wp-content\/uploads\/2017\/09\/q-and-a.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"askbot\" height=\"257\" src=\"https:\/\/s24255.pcdn.co\/wp-content\/uploads\/2017\/09\/q-and-a-696x257.jpg\" width=\"696\" \/><\/a>&#xD;<\/p>\n<h3>Introduction<\/h3>\n<p>Askbot is an open source Question and Answer (Q&amp;A) forum project. It is inspired by StackOverflow and Yahoo Answers.<br \/>\nAskbot is written in Python on top of the Django framework.<\/p>\n<ul>\n<li>Efficient question and answer knowledge management<\/li>\n<li>Focused on-topic discussions<\/li>\n<li>Best answers are shown first<\/li>\n<li>Tag and categorize<\/li>\n<li>Follow-up in the comments<\/li>\n<li>Organize comments and answers by re-posting<\/li>\n<li>Everything is editable<\/li>\n<li>Users are rewarded with karma for posting useful information<\/li>\n<li>Upvotes grow users karma and the downvotes decrease it<\/li>\n<li>Votes identify best content, while karma spotlights and rewards experts<\/li>\n<li>User privileges grow along with their reputation.<\/li>\n<li>Choose either public, private or hidden karma.<\/li>\n<li>When new posts are made users can receive notifications<\/li>\n<\/ul>\n<p>Askbot is being used by Fedora and Shazam Community, among the others.<\/p>\n<p>In this tutorial we will see how to install and configure Askbot on a CentOS 7 Server.<\/p>\n<h3>Dependencies Installation<\/h3>\n<p>First of all, install packages required by Askbot. On CentOS, these are the <em>\u201cDevelopment Tool\u201d <\/em>group, EPEL and Python packages.<\/p>\n<p>Install the <em>\u201cDevelopment Tool\u201d<\/em> group by executing the following yum command:<\/p>\n<p># yum group install &#8216;Development Tools&#8217;<\/p>\n<p>Next, install EPEL repository:<\/p>\n<p># yum install epel-release<\/p>\n<p>Last dependencies are those related to Python. In particular, we will use pip to install Askbot:<\/p>\n<p># yum install python-pip python-devel python-six<\/p>\n<h3>Install PostgreSQL<\/h3>\n<p>Askbot uses PostgreSQL as database system to store its data. PostgreSQL is available in CentOS 7 repositories, so install it executing the following command:<\/p>\n<p># yum -y install postgresql-server postgresql-devel postgresql-contrib<\/p>\n<p>Once the installation is complete, initialize the database with the following command:<\/p>\n<p>$ postgresql-setup initdb<\/p>\n<p>Next, start PostgreSQL and enable it to start at boot time:<\/p>\n<p>#systemctl start postgresql&#xD;<br \/>\n#systemctl start postgresql<\/p>\n<p>Login as postgres user and access the psql command line tool:<\/p>\n<p>$ su &#8211; postgres&#xD;<br \/>\n$ psql<\/p>\n<h4>Create a Database For Askbot<\/h4>\n<p>Create a new database and user for Askbot, with the following PostgreSQL queries:<\/p>\n<p>postgres=# create database askbotdb;&#xD;<br \/>\npostgres=# create user askbotusr with password &#8216;usr_strong_pwd&#8217;;&#xD;<br \/>\npostgres=# grant all privileges on database askbotdb to askbotusr;<\/p>\n<h4>Configure PostgreSQL<\/h4>\n<p>Edit PostgreSQL configuration file for authentication setup, which is \/var\/lib\/pgsql\/data\/pg_hba.conf:<\/p>\n<p># $EDITOR \/var\/lib\/pgsql\/data\/pg_hba.conf<\/p>\n<p>Change all authentication to mIn this tutorial we will see how to install and configure Askbot on a CentOS 7 Server.d5:<\/p>\n<p>local all all md5&#xD;<br \/>\n # IPv4 local connections:&#xD;<br \/>\n host all all 127.0.0.1\/32 md5&#xD;<br \/>\n # IPv6 local connections:&#xD;<br \/>\n host all all ::1\/128 md5<\/p>\n<p>Save, close the file and restart PostgreSQL:<\/p>\n<p># systemctl restart postgresql<\/p>\n<h3>Install and Configure Askbot<\/h3>\n<p>At this point, it is possible to install Askbot. First of all, create a new user, named askbot:<\/p>\n<p># useradd -m -s \/bin\/bash askbot&#xD;<br \/>\n# passwd askbot<\/p>\n<p>Next, add this new user to the wheel group:<\/p>\n<p># usermod -a -G wheel askbot<\/p>\n<p>Upgrade pip to the latest version:<\/p>\n<p># pip install &#8211;upgrade pip<\/p>\n<p>Next, install the virtualenv package:<\/p>\n<p># pip install virtualenv six<\/p>\n<p>Log in as the askbot user previously created, and create a new virtual environment with virtualenv:<\/p>\n<p>$ su &#8211; askbot&#xD;<br \/>\n$ virtualenv unixmen\/<\/p>\n<p>Activate this new virtual environment, by executing the following command:<\/p>\n<p>$ source unixmen\/bin\/activate<\/p>\n<p>Next, install Askbot and other required packages with pip:<\/p>\n<p>$ pip install six askbot psycopg2<\/p>\n<h3>Testing Askbot<\/h3>\n<p>Last step is to test the Askbot installation. Create a new directory, being sure to not use \u201caskbot\u201d as its name.:<\/p>\n<p>$ mkdir testing<\/p>\n<p>Initialize a new Askbot project by executing the following commands:<\/p>\n<p>$ cd testing&#xD;<br \/>\n$ askbot-setup<\/p>\n<p>During this process, Askbot will ask for some information required to create the project, for example those related to the database created with PostgreSQL.<\/p>\n<p>At the end, generate the Django static files with the following python command:<\/p>\n<p>$ python manage.py collectstatic<\/p>\n<p>Generate the database:<\/p>\n<p>$ python manage.py syncdb<\/p>\n<p>So, Askbot has been installed and the testing project configured. Test it with runserver:<\/p>\n<p>$ python manage.py runserver 0.0.0.0:8080<\/p>\n<p>With a web browser, go to the server IP address, and you should see a forum page.<\/p>\n<h3>Conclusion<\/h3>\n<p>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&amp;A website.<\/p>\n<p> <a href=\"https:\/\/www.unixmen.com\/askbot-install-configure-questions-answers-framework-centos-7\/\" target=\"_blank\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#xD; &#xD; &#xD; Introduction Askbot is an open source Question and Answer (Q&amp;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 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/askbot-how-to-install-and-configure-the-questions-and-answers-framework-on-centos-7\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Askbot: How To Install and Configure the Questions and Answers Framework on CentOS 7&#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-279","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\/279","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=279"}],"version-history":[{"count":0,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/279\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}