@@ -4,7 +4,7 @@ A. PREREQUISITES
4
4
B. INSTALLATION
5
5
1. Settings file
6
6
2. Database
7
- 3. Running OSQA in the development server
7
+ 3. Running Askbot in the development server
8
8
4. Installation under Apache/WSGI
9
9
5. Full text search
10
10
6. Email subscriptions
@@ -56,22 +56,28 @@ Notice that you will need to register with recaptcha.net and receive
56
56
recaptcha public and private keys that need to be saved in your
57
57
settings_local.py file
58
58
59
- NOTES: django_authopenid is included into OSQA code
59
+ NOTES: django_authopenid is included into Askbot code
60
60
and is significantly modified. http://code.google.com/p/django-authopenid/
61
61
no need to install this library
62
62
63
63
B. INSTALLATION
64
64
-----------------------------------------------
65
65
0. Make sure you have all above python libraries installed.
66
66
67
- make osqa installation server-readable on Linux command might be:
68
- chown -R yourlogin:apache /path/to/OSQA
67
+ DO NOT name the main directory 'askbot' - this name is reserved
68
+ for the future name of the app file itself.
69
69
70
- directories templates/upfiles and log must be server writable
70
+ make askbot installation server-readable on Linux command might be:
71
+ chown -R yourlogin:apache /path/to/askbot-site
72
+
73
+ directories:
74
+ /path/to/askbot-site/forum/upfiles
75
+ /path/to/askbot-site/log
76
+ must be server writable
71
77
72
78
on Linux type chmod
73
- chmod -R g+w /path/to/OSQA /upfiles
74
- chmod -R g+w /path/to/log
79
+ chmod -R g+w /path/to/askbot-site/forum /upfiles
80
+ chmod -R g+w /path/to/askbot-site/ log
75
81
76
82
above it is assumed that webserver runs under group named "apache"
77
83
@@ -82,16 +88,32 @@ update all your settings. Check settings.py and update
82
88
it as well if necessory.
83
89
Section C explains configuration paramaters.
84
90
91
+ Minimally required modification of settings_local.py are
92
+ DATABASE_NAME
93
+ DATABASE_USER
94
+ DATABASE_PASSWORD
95
+ DATABASE_ENGINE
96
+
97
+ If you set these up, and your database is ready (see section 2),
98
+ run:
99
+
100
+ python manage.py syncdb
101
+ python manage.py runserver `hostname -i`:8000
102
+ (choose another port number if you wish)
103
+
104
+ and askbot should be running - if you have any issues at this point (or later:)
105
+ please post them at http://askbot.org/meta
106
+
85
107
2. Database
86
108
87
109
Prepare your database by using the same database/account
88
110
configuration from above.
89
111
e.g,
90
- create database osqa DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;
91
- grant all on osqa .* to 'osqa '@'localhost';
112
+ create database askbot DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;
113
+ grant all on askbot .* to 'askbot '@'localhost';
92
114
And then run "python manage.py syncdb" to synchronize your database.
93
115
94
- 3. Running OSQA on the development server
116
+ 3. Running Askbot on the development server
95
117
96
118
Run "python manage.py runserver" to startup django
97
119
development environment.
@@ -112,8 +134,8 @@ import os
112
134
import sys
113
135
114
136
sys.path.insert(0,'/one/level/above') #insert to make sure that forum will be found
115
- sys.path.append('/one/level/above/OSQA ') #maybe this is not necessary
116
- os.environ['DJANGO_SETTINGS_MODULE'] = 'OSQA .settings'
137
+ sys.path.append('/one/level/above/askbot-site ') #maybe this is not necessary
138
+ os.environ['DJANGO_SETTINGS_MODULE'] = 'askbot-site .settings'
117
139
import django.core.handlers.wsgi
118
140
application = django.core.handlers.wsgi.WSGIHandler()
119
141
-----------
@@ -138,26 +160,26 @@ WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
138
160
#this allows "rooting" forum at http://example.com/forum, if you like
139
161
<VirtualHost ...your ip...:80>
140
162
141
- DocumentRoot /path/to/osqa -site
163
+ DocumentRoot /path/to/askbot -site
142
164
ServerName example.com
143
165
144
166
#run mod_wsgi process for django in daemon mode
145
167
#this allows avoiding confused timezone settings when
146
168
#another application runs in the same virtual host
147
- WSGIDaemonProcess OSQA
148
- WSGIProcessGroup OSQA
169
+ WSGIDaemonProcess askbot
170
+ WSGIProcessGroup askbot
149
171
150
172
#force all content to be served as static files
151
173
#otherwise django will be crunching images through itself wasting time
152
- Alias /m/ /path/to/osqa -site/forum/skins/
153
- Alias /upfiles/ /path/to/osqa -site/forum/upfiles/
154
- <Directory /path/to/osqa -site/forum/skins>
174
+ Alias /m/ /path/to/askbot -site/forum/skins/
175
+ Alias /upfiles/ /path/to/askbot -site/forum/upfiles/
176
+ <Directory /path/to/askbot -site/forum/skins>
155
177
Order deny,allow
156
178
Allow from all
157
179
</Directory>
158
180
159
181
#this is your wsgi script described in the prev section
160
- WSGIScriptAlias / /path/to/osqa -site/osqa .wsgi
182
+ WSGIScriptAlias / /path/to/askbot -site/askbot .wsgi
161
183
162
184
#this will force admin interface to work only
163
185
#through https (optional)
@@ -166,20 +188,20 @@ WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
166
188
RewriteEngine on
167
189
RewriteRule /nimda(.*)$ https://example.com/nimda$1 [L,R=301]
168
190
</Location>
169
- CustomLog /var/log/httpd/OSQA /access_log common
170
- ErrorLog /var/log/httpd/OSQA /error_log
191
+ CustomLog /var/log/httpd/askbot /access_log common
192
+ ErrorLog /var/log/httpd/askbot /error_log
171
193
</VirtualHost>
172
194
#(optional) run admin interface under https
173
195
<VirtualHost ..your ip..:443>
174
196
175
- DocumentRoot /path/to/osqa -site
197
+ DocumentRoot /path/to/askbot -site
176
198
ServerName example.com
177
199
SSLEngine on
178
200
SSLCertificateFile /path/to/ssl-certificate/server.crt
179
201
SSLCertificateKeyFile /path/to/ssl-certificate/server.key
180
- WSGIScriptAlias / /path/to/osqa -site/osqa .wsgi
181
- CustomLog /var/log/httpd/OSQA /access_log common
182
- ErrorLog /var/log/httpd/OSQA /error_log
202
+ WSGIScriptAlias / /path/to/askbot -site/askbot .wsgi
203
+ CustomLog /var/log/httpd/askbot /access_log common
204
+ ErrorLog /var/log/httpd/askbot /error_log
183
205
DirectoryIndex index.html
184
206
</VirtualHost>
185
207
-------------
@@ -196,9 +218,9 @@ WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
196
218
configure sphinx, sample configuration can be found in
197
219
sphinx/sphinx.conf file usually goes somewhere in /etc tree
198
220
199
- build osqa index first time manually
221
+ build askbot index first time manually
200
222
201
- % indexer --config /path/to/sphinx.conf --index osqa
223
+ % indexer --config /path/to/sphinx.conf --index askbot
202
224
203
225
setup cron job to rebuild index periodically with command
204
226
your crontab entry may be something like
@@ -246,69 +268,10 @@ There are some demo scripts under sql_scripts folder,
246
268
including badges and test accounts for CNProg.com. You
247
269
don't need them to run your sample.
248
270
249
- C. CONFIGURATION PARAMETERS
250
-
251
- #the only parameter that needs to be touched in settings.py is
252
- DEBUG=False #set to True to enable debug mode
253
-
254
- #all forum parameters are set in file settings_local.py
255
-
256
- LOG_FILENAME = 'osqa.log' #where logging messages should go
257
- DATABASE_NAME = 'osqa' # Or path to database file if using sqlite3.
258
- DATABASE_USER = '' # Not used with sqlite3.
259
- DATABASE_PASSWORD = '' # Not used with sqlite3.
260
- DATABASE_ENGINE = 'mysql' #mysql, etc
261
- SERVER_EMAIL = ''
262
- DEFAULT_FROM_EMAIL = ''
263
- EMAIL_HOST_USER = ''
264
- EMAIL_HOST_PASSWORD = '' #not necessary if mailserver is run on local machine
265
- EMAIL_SUBJECT_PREFIX = '[OSQA] '
266
- EMAIL_HOST='osqa.com'
267
- EMAIL_PORT='25'
268
- EMAIL_USE_TLS=False
269
- TIME_ZONE = 'America/Tijuana'
270
- APP_TITLE = u'OSQA Q&A Forum' #title of your forum
271
- APP_KEYWORDS = u'OSQA,forum,community' #keywords for search engines
272
- APP_DESCRIPTION = u'Ask and answer questions.' #site description for searche engines
273
- APP_INTRO = u'<p>Ask and answer questions, make the world better!</p>' #slogan that goes to front page in logged out mode
274
- APP_COPYRIGHT = '' #copyright message
275
-
276
- #if you set FORUM_SCRIPT_ALIAS= 'forum/'
277
- #then OSQA will run at url http://example.com/forum
278
- #FORUM_SCRIPT_ALIAS cannot have leading slash, otherwise it can be set to anything
279
- FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty string
280
-
281
- LANGUAGE_CODE = 'en' #forum language (see language instructions on the wiki)
282
- EMAIL_VALIDATION = 'off' #string - on|off
283
- MIN_USERNAME_LENGTH = 1
284
- EMAIL_UNIQUE = False #if True, email addresses must be unique in all accounts
285
- APP_URL = 'http://osqa.com' #used by email notif system and RSS
286
- GOOGLE_SITEMAP_CODE = '' #code for google site crawler (look up google webmaster tools)
287
- GOOGLE_ANALYTICS_KEY = '' #key to enable google analytics on this site
288
- BOOKS_ON = False #if True - books tab will be on
289
- WIKI_ON = True #if False - community wiki feature is disabled
290
-
291
- #experimental - allow password login through external site
292
- #must implement django_authopenid/external_login.py
293
- #included prototype external_login works with Mediawiki
294
- USE_EXTERNAL_LEGACY_LOGIN = True #if false OSQA uses it's own login/password
295
- EXTERNAL_LEGACY_LOGIN_HOST = 'login.osqa.com'
296
- EXTERNAL_LEGACY_LOGIN_PORT = 80
297
- EXTERNAL_LEGACY_LOGIN_PROVIDER_NAME = '<span class="orange">OSQA</span>'
298
-
299
- FEEDBACK_SITE_URL = None #None or url
300
- LOGIN_URL = '/%s%s%s' % (FORUM_SCRIPT_ALIAS,'account/','signin/')
301
-
302
- DJANGO_VERSION = 1.1 #must be either 1.0 or 1.1
303
- RESOURCE_REVISION=4 #increment when you update media files - clients will be forced to load new version
304
-
305
- D. Customization
271
+ C. Customization
306
272
307
273
Other than settings_local.py the following will most likely need customization:
308
274
* locale/*/django.po - language files that may also contain your site-specific messages
309
275
if you want to start with english messages file - look for words like "forum" and
310
- "OSQA" in the msgstr lines
311
- * templates/header.html and templates/footer.html may contain extra links
312
- * templates/about.html - a place to explain for is your forum for
313
- * templates/faq.html - put answers to users frequent questions
314
- * templates/content/style/style.css - modify style sheet to add disctinctive look to your forum
276
+ "Askbot" in the msgstr lines
277
+ * skins
0 commit comments