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.
Hi All,
I'd be grateful to have any step by step procedure for installing AskBot in WebFaction. Can't find any.
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.
when to run python manage.py syncdb
?
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.
Please upvote the answer if it has been useful to you.
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.
Second webapp here should be of what type ?
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.
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 ?
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
This step by step procedure worked for me. I skipped step 5 and still worked.
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.
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'
Solved it! For some reason __init__.py in askbot directory was empty! Did "git checkout __init__.py" and it got fixed.
Hi,
While installing on WebFaction : MySql 5.0/.5.1 was configured in above given steps ?
Thanks
Can anyone write step wise document
To enter a block of code:
Comments