How To install Question2Answer V-1.8.0 on linuxmint-18.03

To install Question2Answer on linuxmint-18.03

Question2Answer is a popular open source Q& A solution. It is built on php and uses MySQL database, and runs safe and fast. A Q& A engine helps you to create an online community to share knowledge. People with questions quickly get the answers they need. It’ s used for voting, notifications, user points, and rankings.


Pre-requirements

Install LAMP (Apache, php7.0, mariadb-server)
In MariaDB (create database, user and give privileges to the user)

FOR PHP INSTALLATION

apt-get install python-software-properties
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.07.2-xmlrpc php7.0-gd php7.0-mbstring php7.0  php7.0-common  php7.0-xmlrpc php7.0-soap  php7.0-xml
php7.0-intl  php7.0-cli  php7.0-ldap php7.0-zip php7.0-readline php7.0-imap php7.0-tidy php7.0-recode php7.0-sq php7.0-intl

Installation

Download Question2answer package using wget command

linuxhelp ~ # wget http://www.question2answer.org/releases/question2answer-1.8.0.zip
--2018-05-18 10:37:43--  http://www.question2answer.org/releases/question2answer-1.8.0.zip
Resolving www.question2answer.org (www.question2answer.org)... 185.14.187.28
Connecting to www.question2answer.org (www.question2answer.org)|185.14.187.28|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2202833 (2.1M) [application/zip]
Saving to: ‘ question2answer-1.8.0.zip’ 

question2answer-1.8.0.zip  100%[======================================> ]   2.10M  11.2MB/s    in 0.2s    

2018-05-18 10:37:48 (11.2 MB/s) - ‘ question2answer-1.8.0.zip’  saved [2202833/2202833]

Extract the package using the following command

linuxhelp ~ # unzip question2answer-1.8.0.zip 
Archive:  question2answer-1.8.0.zip
   creating: question2answer-1.8.0/
  inflating: question2answer-1.8.0/.htaccess  
  inflating: question2answer-1.8.0/CHANGELOG.html  
  inflating: question2answer-1.8.0/CONTRIBUTING.md  
  inflating: question2answer-1.8.0/index.php  
  inflating: question2answer-1.8.0/LICENSE.html  
   creating: question2answer-1.8.0/qa-cache/
 extracting: question2answer-1.8.0/qa-cache/.htaccess  
.
.
.
   creating: question2answer-1.8.0/qa-theme/SnowFlat/js/
  inflating: question2answer-1.8.0/qa-theme/SnowFlat/js/snow-core.js  
  inflating: question2answer-1.8.0/qa-theme/SnowFlat/metadata.json  
  inflating: question2answer-1.8.0/qa-theme/SnowFlat/qa-data-styles-rtl.css  
  inflating: question2answer-1.8.0/qa-theme/SnowFlat/qa-data-styles.css  
  inflating: question2answer-1.8.0/qa-theme/SnowFlat/qa-theme.php  
  inflating: question2answer-1.8.0/README.html  
  inflating: question2answer-1.8.0/README.md  
 extracting: question2answer-1.8.0/VERSION.txt

Rename the extracted directory

linuxhelp ~ # ls
question2answer-1.8.0  question2answer-1.8.0.zip
linuxhelp ~ # mv question2answer-1.8.0 q2a

Move the file to the HTML location

linuxhelp ~ # mv q2a/ /var/www/html/

And then switch to the directory as follows

linuxhelp ~ # cd /var/www/html/
linuxhelp html # ls
index.html  q2a

Next, change ownership and permission of the q2a directory

linuxhelp html # chown -R www-data:www-data q2a/
linuxhelp html # chmod -R 775 q2a/

And then Rename qa-config-example.php to qa-config.php

linuxhelp html # cd q2a/
linuxhelp q2a # ls
CHANGELOG.html   LICENSE.html           qa-content           qa-lang    qa-tests     README.md
CONTRIBUTING.md  qa-cache               qa-external-example  qa-plugin  qa-theme     VERSION.txt
index.php        qa-config-example.php  qa-include           qa-src     README.html
linuxhelp q2a # mv qa-config-example.php qa-config.php
Open qa-config.php in your text editor of choice and insert the MySQL details:
linuxhelp q2a # vim qa-config.php
[&hellip ]
define(' QA_MYSQL_HOSTNAME' , ' 127.0.0.1' ) 
define(' QA_MYSQL_USERNAME' , ' q2auser' ) 
define(' QA_MYSQL_PASSWORD' , ' 123' ) 
define(' QA_MYSQL_DATABASE' , ' q2a' ) 
[&hellip ]

Next, create the virtual host for Question2answer

linuxhelp q2a # cd /etc/apache2/sites-available/
linuxhelp sites-available # vim q2a.conf
< VirtualHost *:80> 
ServerName www.linuxhelp1.com
DocumentRoot /var/www/html/q2a/
< Directory /var/www/html/q2a/> 
AllowOverride All
Order allow,deny
allow from all
< /Directory> 
< /VirtualHost> 

We have to enable the q2a.conf file

linuxhelp sites-available # a2ensite q2a.conf
Enabling site q2a.
To activate the new configuration, you need to run
service apache2 reload

Now, Make an entry to the host file

linuxhelp sites-available # vim /etc/hosts
< give your ip>    < give your localip> 

Restart the apache

linuxhelp sites-available # systemctl restart apache2.service

Now you can proceed the further installation and configuration from the browser by navigating to the following URL: http://< ipaddress or domain name

Next, proceed with the installation as follows. setup the database and also the user management configuration


After the configuration, you will see the following screen where you have to click on admin center to access the admin dashboard.


with this, the method to install Question2Answer on linuxmint-18.03 comes to an end.

Tag : Linux Mint
FAQ
Q
If I Cancel My Subscription, Will I Lose Access Immediately in Question2Answer?
A
You will lose the access after the end of the subscription term. That means if you have subscribed on the 1st January 2017 for one year and you cancel the subscription on 10th February, you will still have full access till 31st December.
Q
How Can I Cancel My Subscription in Question2Answer?
A
You can cancel your subscription from your PayPal account.
Q
What is a requirement for using the Question2Answer?
A
The following are the requirements for using the Question2Answer as,

PHP 5.2 or later, with the MySQLi extension.


MySQL 4.1 or later, MySQL 5.x for best performance.
Q
Do You Provide Lifetime Free Updates for Question2Answer?
A
You will be eligible to get free updates during the subscription period. After your subscription expires, you won’t be eligible to get any product upgrade on Question2Answer.
Q
What's the license used in Question2Answer?
A
The GPL v2+. a license has been used in the Question2Answer.