http://www.question2answer.org/install.php
————英文安装方法参考——
Question2Answer takes 5 minutes (or less!) to install.
In most cases, installing Question2Answer for your website should be dead easy. Please follow the steps below.
Before you install Question2Answer
Make sure you have:
- A web server which you can access via FTP, SFTP or shell.
- A text editor.
- A web browser.
And make sure your web server is running:
- Web serving software such as Apache.
- PHP 4.3 or later (PHP 5.x is fine too).
- MySQL 4.1 or later (or MySQL 5.x).
If you are not sure about this, please check with your web hosting provider.
Installing Question2Answer for the first time (without single sign-on)
The instructions below are for installing Question2Answer where it manages user accounts and logins for you. If you would like Question2Answer to integrate with your existing user database and account system, see the instructions for single sign-on installation.
- Download the latest version of Question2Answer to your computer or web server.
- Unzip the download using a tool such as WinZip (or
unzipin the Unix shell). - If you want to run a non-English site, check if the appropriate language file is available. If so, download and install it in the
qa-langfolder. If not, it's simple to translate Question2Answer for yourself. - Create a MySQL database, and a MySQL user with full permissions for that database.
If you're interested, the privileges actually needed are: CREATE, ALTER, DELETE, INSERT, SELECT, UPDATE, LOCK TABLES - Note down the MySQL details: username, password, database name and server host name. If MySQL is running on the same server as your website, the server host name is likely to be
127.0.0.1orlocalhost. - Find
qa-config-example.phpin the unzippedquestion2answerfolder, and rename it toqa-config.php. - Open
qa-config.phpin your text editor, insert the MySQL details at the top, and save the file. Do not use a word processor such as Microsoft Word for this, but rather Notepad or another appropriate text editing program. - Place all the Question2Answer files (including .htaccess) in the appropriate location on your web server:
- To serve Question2Answer at the root of a domain (e.g.
http://www.mysite.com/), move or upload all the contents of the unzippedquestion2answerfolder into the root directory for that domain on your web server. - To serve Question2Answer in a subdirectory of a site (e.g.
http://www.mysite.com/qa/), create the subdirectory inside the root directory for the site, then move or upload all the contents of the unzippedquestion2answerfolder into this subdirectory.
- To serve Question2Answer at the root of a domain (e.g.
- Open the appropriate web page for Question2Answer in your web browser, for example:
- If you installed Question2Answer at the root of a domain,
http://www.mysite.com/ - If you installed Question2Answer in a subdirectory,
http://www.mysite.com/qa/
- If you installed Question2Answer at the root of a domain,
- Follow the on-screen instructions to set up your database and administrator account. That's it!
Upgrading to the latest version of Question2Answer
The instructions below are for upgrading from a previous version of Question2Answer. Click for a full version history.
- Before upgrading, it is recommended to make a backup of your MySQL database using mysqldump or a similar tool.
- If you have modified any core Q2A files, or installed any extra themes, languages or plugins in the
qa-theme,qa-langorqa-plugindirectories, make a copy of your whole Q2A directory, to help reapply your changes after upgrading. - Download the latest version of Question2Answer to your computer or web server.
- Unzip the download using a tool such as WinZip (or
unzipin the Unix shell). - Replace all the Question2Answer files and directories (including .htaccess) on your web server with the new ones.
- Your custom
qa-config.phpfile will not be affected, nor will yourqa-externaldirectory. - You will need to reapply any other changes and reinstall any themes, languages or plugins as appropriate.
- Your custom
- Open the page for Question2Answer in your browser, and look around the admin center. If appropriate, you will be prompted to upgrade the database, so follow the on-screen instructions. You've now successfully upgraded - congratulations!
Add-Ons
See the add-ons page for language files, themes and plugins created by Question2Answer users.
Advanced Installation
See the advanced section for many ways in which Q2A can be integrated, optimized and extended.
——————中文简洁攻略——————
cd /home/wwwroot/域名
wget http://www.question2answer.org/question2answer-latest.zip
unzip question2answer-latest.zip
cp -a /home/wwwroot/域名/question2answer/. /home/wwwroot/域名
下载中文语言文件:
wget http://www.baikebaike.com/public/q2a_1.4_zh.zip
unzip q2a_1.4_zh.zip
mv zh ./qa-lang
rm -rf question2answer question2answer-latest.zip q2a_1.4_zh.zip
————创建数据库 记录相关信息 诸如数据库名 密码——————
找到 qa-config-example.php 重命名为qa-config.php
编辑qa-config.php文件,添加数据库等信息
打开网站 按提示操作即可