Mercurial > hg > savane-forge
view INSTALL @ 316:e80f63d8ddc3
Migrate FieldValue + other docs on trackers
author | Sylvain Beucler <beuc@beuc.net> |
---|---|
date | Tue, 17 Aug 2010 23:17:08 +0200 |
parents | c087b8f3a3fb |
children |
line wrap: on
line source
* Define your settings.py: - Base it on 'settings_default.py': (already done if you're downloading an official release) echo 'from settings_default import *' > settings.py - Modify if necessary, e.g.: DATABASES = {...} * Dependencies - Django >= 1.2 (+ YAML support) - Django annoying (programming helpers) - Django registration (users can create an account) - MySQLdb (python-mysql) - MySQL (database server) - PyME (GPG Made Easy for Python) - ssh-keygen (optional, to check submitted SSH public keys) - gpg (compute group keyrings) - gettext (compile translations) As Debian packages: apt-get install python-django python-mysqldb python-yaml mysql-server python-pyme mercurial apt-get install openssh-client gnupg gettext hg clone http://bitbucket.org/offline/django-annoying/ hg clone http://bitbucket.org/ubernostrum/django-registration/ * Install process MySQL commands: if you defined a password, you can either add '-p' to each 'mysql' command below (and type your password when prompted), or you can create a '.my.cnf' file in your home directory, containing the following: [client] user = root password = YOURPASS Then set its permissions tightly: chmod 600 ~/.my.cnf Create the mysql user: mysql -e "CREATE DATABASE savane DEFAULT CHARACTER SET utf8;" mysql -e "GRANT ALL PRIVILEGES ON savane.* TO 'savane' IDENTIFIED BY 'yourpass';" Edit the the file savane/settings.py and edit the DATABASES block with the proper credentials for your MySQL database. Initialize the database:: ./manage.py syncdb ./manage.py loaddata savane/*/fixtures/*.yaml Compile the translations:: ./manage.py compilemessages * Run for testing: You can test your install using: $ ./manage.py loaddata savane/svmain/fixtures/demo/*.yaml $ ./manage.py runserver * Run with Apache: ** Dedicated server: apt-get install libapache2-mod-python <Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings #PythonOption django.root /savane PythonDebug On PythonPath "['/var/www/framework/src'] + sys.path" </Location> <Location "/media"> SetHandler None </Location> <Location "/static-media"> SetHandler None </Location> Alias /media /usr/share/python-support/python-django/django/contrib/admin/media #Alias /media /usr/share/pyshared/django/contrib/admin/media Alias /static-media /var/www/framework/static-media ** FCGI + suExec (shared hosting): http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/ apt-get install libapache2-mod-fcgid # _not_ mod-fastcgi which is non-free apt-get install python-flup a2enmod rewrite httpd.conf: DocumentRoot /var/www/framework/public SuexecUserGroup myuser mygroup Alias /media /usr/share/python-support/python-django/django/contrib/admin/media #Alias /media /usr/share/pyshared/django/contrib/admin/media # Cf. public/.htaccess for the rest of the configuration