我打算使用osqa問題答案腳本啓動問題答案網站。我想在Apache服務器上安裝osqa。請告訴我簡單但詳細的步驟在Apache服務器上安裝osqa。如何在簡單步驟中安裝osqa
回答
首先,你需要得到的Django會
再檢查其他要求
http://meta.osqa.net/questions/11025/server-requirements-to-run-osqa
我會告訴你在那個論壇上問這個問題,但它看起來非常已死
如果你想要簡單的東西,你可以使用比目魚棧http://bitnami.com/stack/osqa
謝謝。你爲這家公司工作嗎?你有任何鏈接分享這個程序在使用? – theyuv
對不起,我不爲這家公司工作。但你可以問他們在網站上的鏈接,我確定 –
H我我已經使用指南:http://wiki.osqa.net/display/docs/Ubuntu+with+Apache+and+MySQL但修改它新的Apache 2.4.7並降級Django和降價的適當版本做到了這一點在新機器上
的Ubuntu 14.04 的Apache 2.4.7
清潔機AWS:
sudo易於得到更新
sudo易於得到安裝的Apache2中的libapache2-MOD-WSGI
命令和apt-get安裝顛覆
APACHE 2.4表現不同 - 最好insatll在/ var/WWW
須藤SVN共同http://svn.osqa.net/svnroot/osqa/trunk/ /無功/網絡/ osqa
須藤VI /var/www/osqa/osqa.wsgi
import os
import sys
sys.path.append('/var/www')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name
# of the OSQA source. For instance, if the full path to OSQA is
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
須藤RM /etc/apache2/sites-enabled/000-default.conf
須藤六/etc/apache2/sites-available/osqa.conf
# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR}
#NOTE: all urs below will need to be adjusted if
#settings.FORUM_SCRIPT_ALIAS !='' (e.g. = 'forum/')
#this allows "rooting" forum at [http://example.com/forum], if you like
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/osqa
ServerName example.com
#run mod_wsgi process for django in daemon mode
#this allows avoiding confused timezone settings when
#another application runs in the same virtual host
WSGIDaemonProcess OSQA
WSGIProcessGroup OSQA
#force all content to be served as static files
#otherwise django will be crunching images through itself wasting time
Alias /m/ "/var/www/osqa/forum/skins/"
<Directory "/var/www/osqa/forum/skins">
Require all granted
</Directory>
Alias /upfiles/ "/var/www/osqa/forum/upfiles/"
<Directory "/var/www/osqa/forum/upfiles">
Require all granted
</Directory>
#this is your wsgi script described in the prev section
WSGIScriptAlias//var/www/osqa/osqa.wsgi
CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
</VirtualHost>
須藤LN -s /etc/apache2/sites-available/osqa.conf /etc/apache2/sites-enabled/osqa.conf
sudo易於得到安裝mysql客戶端
須藤APT-得到安裝python-setuptools的
sudo易於得到安裝python-PIP
須藤的easy_install南Django的調試工具欄裏降價\ html5lib中的python-openid的
須藤PIP安裝Django == 1.3
須藤PIP安裝降價== 2.4.1
須藤CP /var/www/osqa/settings_local.py.dist /var/www/osqa/settings_local.py
sudo的VI的/ var/WWW/osqa/settings_local.py
做你的數據庫的東西 - 我已經有一個RDS,但你可以自己做。
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'osqa',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '3306',
}
}
我沒有做到這一步,但你可能需要在構建新的DB sudo的蟒蛇manage.py執行syncdb --all
sudo的蟒蛇manage.py遷移論壇--fake
須藤useradd的osqa
須藤CHOWN -R osqa:WWW的數據/無功/網絡/ osqa
須藤搭配chmod -R G + W /無功/網絡/ osqa /論壇/ upfiles
須藤搭配chmod -R G + W /無功/網絡/ osqa /日誌
須藤服務的apache2重啓
你如何配置「電子郵件設置」? – SparkAndShine
步驟1:安裝相關python模塊
sudo apt-get install python-setuptools #which contains easy_install
sudo apt-get install python-pip
sudo apt-get install python-django
sudo apt-get install python-mysqldb
sudo apt-get install libapache2-mod-wsgi #mod-wsgi, sudo a2enmod mod-wsgi
sudo easy_install ElementTree html5lib python-openid
sudo pip install Markdown==2.4.1 #NOTE: the higher version is incompatible with osqa
sudo pip install south
步驟2:爲OSQA創建數據庫
# (i).download the source code of OSQA
git clone https://github.com/OSQA/osqa.git
# (ii).create a database, named osqa
mysql -u root -p #you are required to type password
create database osqa DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
# (iii).create tables for OSQA
/var/www/osqa$ python manage.py syncdb
......
You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): no
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
步驟3:配置OSQA
(i)中。創建osqa.wsgi
使用cp osqa.wsgi.dist osqa.wsgi
進行復制並修改sys.path.append
。的osqa.wsgi
最終內容將是
import os
import sys
sys.path.append('/var/www')
sys.path.append('/var/www/osqa')
# The first part of this module name should be identical to the directory name
# of the OSQA source. For instance, if the full path to OSQA is
# /home/osqa/osqa-server, then the DJANGO_SETTINGS_MODULE should have a value
# of 'osqa-server.settings'.
os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
(ii)中。創建settings_local.py
使用cp settings_local.py.dist settings_local.py
進行復制並進行一些更改。以下代碼顯示應該更改哪些代碼。
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'osqa',
'USER': 'root',
'PASSWORD': '**********',
'HOST': '',
'PORT': '',
'CONN_MAX_AGE': 600,
}
}
APP_URL = 'http://www.example.com
ALLOWED_HOSTS = ('example.com',)
第4步:配置Apache
爲OSQA創建一個配置文件(比如osqa.conf
)。以下是內容:
# Must be readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR}
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/osqa
ServerName example.com
#run mod_wsgi process for django in daemon mode
#this allows avoiding confused timezone settings when
#another application runs in the same virtual host
WSGIDaemonProcess OSQA
WSGIProcessGroup OSQA
#force all content to be served as static files
#otherwise django will be crunching images through itself wasting time
Alias /m/ "/var/www/osqa/forum/skins/"
<Directory "/var/www/osqa/forum/skins">
Require all granted
</Directory>
Alias /upfiles/ "/var/www/osqa/forum/upfiles/"
<Directory "/var/www/osqa/forum/upfiles">
Require all granted
</Directory>
#this is your wsgi script described in the prev section
WSGIScriptAlias//var/www/osqa/osqa.wsgi
CustomLog ${APACHE_LOG_DIR}/osqa.access.log common
ErrorLog ${APACHE_LOG_DIR}/osqa.error.log
</VirtualHost>
使配置生效:
sudo a2ensite osqa.conf
sudo service apache2 restart
第5步:修改hosts
追加下面以/etc/hosts
xx.xx.xx.xx example.com
個參考文獻:
http://sparkandshine.net/install-osqa-on-aws-ec2-ubuntu-apache-mysql/
PS:爲什麼不highligter語法的工作?
- 1. 如何安裝谷歌通過步驟
- 2. 安裝配置單元的步驟
- 3. 在windows中安裝tesseract ocr的步驟
- 4. Bower安裝不運行「安裝」步驟
- 5. ponydocs安裝步驟5
- 6. 安裝py2cairo的步驟?
- 7. 安裝Orbfit 4.2的步驟
- 8. Qbs:安裝步驟規則
- 9. Doctrine 2安裝步驟
- 10. 簡單多個步驟
- 11. 如何在一個步驟中安裝多個python擴展
- 12. Python包裝分發後安裝步驟
- 13. Prestashop在模塊安裝失敗步驟
- 14. 如何在簡單的步驟中用SOAP連接到TFS EventService
- 15. 在Windows 7上使用xampp安裝OSQA
- 16. 關於如何在Windows上安裝PySide的步驟
- 17. 如何在基於linux的虛擬主機上安裝osqa
- 18. 窗口開發和安裝步驟
- 19. PHP腳本安裝進度步驟?
- 20. python protobufs - 避免安裝步驟?
- 21. Elasticsearch遷移插件安裝步驟
- 22. 社交引擎4.2安裝步驟
- 23. npm install的其他安裝步驟
- 24. Django Sentry安裝步驟錯誤
- 25. TeamCity NuGet安裝程序步驟問題
- 26. Cocos2D for MAC的安裝步驟?
- 27. drupal跳過「安裝站點」步驟
- 28. jQuery - 簡單的步驟形式
- 29. 簡單的步驟使用CMU sphinx4
- 30. 在單一步驟
請記住,OSQA的版本django需要很老(1.3)。 – inoks