First time here? Check out the FAQ!
2

Need step by step installation procedure in WebFaction

Hi All,

I'd be grateful to have any step by step procedure for installing AskBot in WebFaction. Can't find any.

str's avatar
91
str
asked 2011-10-22 06:41:35 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

7 Answers

6

This answers the same question as in http://askbot.org/en/question/445/how-to-install-askbot-on-webfaction

Here's what I did on WebFaction:

In webfaction control panel installed app "Python 2.7/Django 1.3" as askbot_webapp
In webfaction control panel created postgres database and remembered password
cd ~/webapps/askbot_webapp
git clone git://github.com/ASKBOT/askbot-devel.git myaskbot 
cd myaskbot/
ls
python-2.7 setup.py develop
askbot-setup 
Where deploy the forum (directory)? askbot2
Edit myproject.wsgi to point to 'myaskbot2.settings'
Create a second webapp for the static files
Attach this to /m within your domain.
Soft link askbot/skins/common and askbot/skins/default into the static files directory
Login: the first user to create and account becomes superuser.

Please edit this answer if you have more to add, or find something I missed.

brycenesbitt's avatar
131
brycenesbitt
answered 2012-01-17 00:13:33 -0600, updated 2012-01-30 14:00:39 -0600
edit flag offensive 0 remove flag delete link

Comments

when to run python manage.py syncdb ?

Hanan Natan's avatar Hanan Natan (2012-01-19 12:28:44 -0600) edit
1

I think askbot-setup does that. It's all pretty dang confusing: i wish the askbot setup script did less, it would make setup less confusing. The paths end up all wacky.

brycenesbitt's avatar brycenesbitt (2012-01-27 16:02:20 -0600) edit

Please upvote the answer if it has been useful to you.

brycenesbitt's avatar brycenesbitt (2012-01-27 16:03:28 -0600) edit

This answer is good. There also need to be some webfaction specific things, like how to configure your app and database in the webfaction control panel.

Joseph's avatar Joseph (2012-01-29 15:38:47 -0600) edit

Second webapp here should be of what type ?

Prafulla T's avatar Prafulla T (2012-03-08 21:07:57 -0600) edit
add a comment see more comments
1

Apologies, this is not exactly what you are looking for - hopefully someone else offers better help, but this should help you get started.

Askbot is just another django application - so a webfaction's document must be able to help you. http://docs.webfaction.com/software/django/getting-started.html

A few things that are specific to askbot: directories log and askbot/upfiles must be server-writable.

Evgeny's avatar
13.2k
Evgeny
answered 2011-10-22 21:41:47 -0600
edit flag offensive 0 remove flag delete link

Comments

I think that the main problem with this guide in relation to Askbot (at least IMO) is the static files concept. Where to configure that in Askbot? What they are? use the default settings.py file or user the on at the setup_templates directory ?

Hanan Natan's avatar Hanan Natan (2012-01-19 12:27:49 -0600) edit
add a comment see more comments
1

Here is how to install Askbot from GitHub with Django 1.3.4 (Django 1.3.1 is labeled as INSECURE).
I'm using example names like myapp, myproject..., change them with your names and data.

1.Create an App (Control Panel > Domains/websites > Applications > Add new application)
Name: myapp
App Category: Django
App Type: Django 1.3.4 (mod_wsgi 3.3/Python 2.7)

2.Create Database (Databases > Create new database)
Type: Postgresql or MySql
Name: username_myapp (This name will also be your database username in settings.py)

3.Connect to your server via ssh

$ ssh username@server_name.webfaction.com

4.Clone Askbot form GitHub

$ cd ~/webapps/myapp
$ git clone git://github.com/ASKBOT/askbot-devel.git myask

5.Change Django version dependency

$ cd myask
$ nano askbot_requirements.txt (change django==1.3.1 to django==1.3.4)
$ nano askbot_requirements_dev.txt (change django==1.3.1 to django==1.3.4)
$ cd askbot
$ nano __init__.py (in REQUIREMENTS change django==1.3.1 to django==1.3.4)
$ cd ..

6.Install Askbot (force to install packages into your app python and bin folder, if it fails to download some package just run command again)

$ PYTHONPATH=$HOME/webapps/myapp/lib/python2.7 python2.7 setup.py install 
  --install-lib=$HOME/webapps/myapp/lib/python2.7/ 
  --install-scripts=$HOME/webapps/myapp/bin/
$ cd ..

7.Run askbot-setup

$ ./bin/askbot-setup -n myproject -d datatbase_name -u database_username 
  -p database_password --domain=mydomain.com
$ cd myproject
$ python2.7 manage.py syncdb --all (say no to create superuser)
$ mkdir static
$ python2.7 manage.py collectstatic

8.Create app for serving static content (Control Panel > Domains/websites > Applications > Add new application)
Name: static_app
App Category: Symbolic link
App Type: Symbolic link to static-only app
Extra info: /home/username/webapps/myapp/myproject/static

9.Create Website (Control Panel > Domains/websites > Websites > Add new website)
Name: mysite
Domains: mydomain.com
www.mydomain.com
Contents:
Add first app (Add a web app > Reuse an existing Web App)
Select myapp

Add second app (Add a web app > Reuse an existing Web App)
Select static_app
In URL add letter 'm' (without quotes)

10.Edit httpd.conf

$ nano ~/webapps/myapp/apache2/conf/httpd.conf

Change WSGIScriptAlias to:

WSGIScriptAlias / /home/username/webapps/myapp/myproject/django.wsgi

11.Edit settings.py

$ nano ~/webapps/myapp/myproject/settings.py

Set DEBUG = False
Insert your name and email in ADMINS

12.Enable Full Text Search (Postgresql)

$ python manage.py init_postgresql_full_text_search

13.Restart Apache

$ ~/webapps/myapp/apache2/bin/restart
updated 2012-11-02 19:22:06 -0600
This post is a wiki. Anyone with karma >100 is welcome to improve it.
edit flag offensive 0 remove flag delete link

Comments

1

This step by step procedure worked for me. I skipped step 5 and still worked.

apg's avatar apg (2013-09-16 06:35:21 -0600) edit
add a comment see more comments
1

Here is the version I used to get askbot working on webfaction. It is slightly different than the instructions from Bryce:

In webfaction control panel installed app "Python 2.7/Django 1.3.1" as askbot_webapp

In webfaction control panel created postgres database and remembered password

cd ~/webapps/askbot_webapp
git clone git://github.com/ASKBOT/askbot-devel.git myaskbot 
cd myaskbot/
python2.7 setup.py develop
askbot-setup

Where deploy the forum (directory)? .

Add to settings.py: ASKBOT_CSS_DEVEL = True

python2.7 manage.py collectstatic
python2.7 manage.py syncdb  # Answer 'no' to superuser
python2.7 manage.py migrate # Ignore the errors

# Test out that migrations work and the app runs
python2.7 manage.py runserver

Edit ../myproject.wsgi:

import os
import sys
import os.path

current_directory = os.path.dirname(__file__)
sys.path.append(os.path.join(current_directory, "myaskbot"))

from django.core.handlers.wsgi import WSGIHandler

os.environ['DJANGO_SETTINGS_MODULE'] = 'myaskbot.settings'
application = WSGIHandler()

Create a second webapp called askbot_static for the static files. This should be purely static (no .htaccess)

Attach this to /m within your domain.

cd ~/webapps/askbot_static/
ln -s ~/webapps/askbot_webapp/myaskbot/static/common/
ln -s ~/webapps/askbot_webapp/myaskbot/static/default/
ln -s ~/webapps/askbot_webapp/myaskbot/static/admin/

Login: the first user to create and account becomes superuser.

Joseph's avatar
353
Joseph
answered 2012-07-19 23:05:46 -0600, updated 2012-07-19 23:29:30 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

I tried to follow this steps for installing on webfactional. But I get folloiwng error when I do python-2.7 setup.py develop

Am I missing anything ?

Traceback (most recent call last): File "setup.py", line 13, in <module> version = askbot.get_version(),#remember to manually set this correctly AttributeError: 'module' object has no attribute 'get_version'

Prafulla T's avatar
21
Prafulla T
answered 2012-03-03 10:58:17 -0600
edit flag offensive 0 remove flag delete link

Comments

Solved it! For some reason __init__.py in askbot directory was empty! Did "git checkout __init__.py" and it got fixed.

Prafulla T's avatar Prafulla T (2012-03-03 11:09:34 -0600) edit
add a comment see more comments
0

Hi,

While installing on WebFaction : MySql 5.0/.5.1 was configured in above given steps ?

Thanks

Chetan Patil's avatar
41
Chetan Patil
answered 2012-04-04 00:55:02 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

Can anyone write step wise document

codeguru's avatar
1
codeguru
answered 2012-04-04 14:03:05 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments