X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=docs%2FINSTALL;h=ea164046596e9d92be83514dee762f4ef91a85cd;hb=be40f2b35c98cd5cec0fd7df25017201b6852ffd;hp=da8dd54f71314d6489c4667e5eabfa632c2b651c;hpb=c561ebe710d6e6a43aa4afc6c2036a215378ce87;p=patchwork diff --git a/docs/INSTALL b/docs/INSTALL index da8dd54..ea16404 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -9,7 +9,7 @@ You'll need the following (applications used for patchwork development are in brackets): * A python interpreter - * djano + * django * A webserver (apache) * mod_python or flup * A database server (postgresql) @@ -29,37 +29,100 @@ in brackets): user that your mail server runs as). On Ubuntu these are www-data and nobody, respectively. - PostgreSQL: - createdb patchwork - createuser www-data - createuser nobody + For PostgreSQL - MySQL: + $ createdb patchwork + $ createuser www-data + $ createuser nobody + + - postgres uses the standard UNIX authentication, so these users + will only be accessible for processes running as the same username. + This means that no passwords need to be set. + + For MySQL: $ mysql > CREATE DATABASE 'patchwork'; - > INSERT INTO user (Host, User) VALUES ('localhost', 'www-data'); - > INSERT INTO user (Host, User) VALUES ('localhost', 'nobody'); + > CREATE USER 'www-data'@'localhost' IDENTIFIED BY ''; + > CREATE USER 'nobody'@'localhost' IDENTIFIED BY ''; 2. Django setup - You'll need to customise apps/settings.py to suit your database, and - change the SECRET_KEY variable too. While you're there, change the - following to suit your installation: + Set up some initial directories in the patchwork base directory: + + mkdir -p lib/packages lib/python + + At the time of release, patchwork depends on django version 1.0. + However, most distros don't provide 1.0 yet. If yours does, then you + can skip this step. Otherwise, do a: + + cd lib/packages + svn checkout http://code.djangoproject.com/svn/django/tags/releases/1.0 + cd ../python + ln -s ../packages/django/django ./django + + We also use the django-registration infrastructure from + http://code.google.com/p/django-registration/ + + cd lib/packages/ + svn checkout \ + http://django-registration.googlecode.com/svn/trunk/registration/ \ + django-registration + cd ../../apps + ln -s ../lib/packages/django-registration ./registration + + We also use some Javascript libraries: + + cd lib/packages + mkdir jquery + cd jquery + wget http://jqueryjs.googlecode.com/files/jquery-1.3.min.js + wget http://www.isocra.com/articles/jquery.tablednd_0_5.js.zip + unzip jquery.tablednd_0_5.js.zip jquery.tablednd_0_5.js + cd ../../../htdocs/js/ + ln -s ../../lib/packages/jquery/jquery-1.3.min.js ./ + ln -s ../../lib/packages/jquery/jquery.tablednd_0_5.js ./ + + The settings.py file contains default settings for patchwork, you'll + need to configure settings for your own setup. + + Rather than edit settings.py, create a file 'local_settings.py', and + override or add settings as necessary. You'll need to define the + following: - ADMINS, + SECRET_KEY + ADMINS TIME_ZONE LANGUAGE_CODE + + You can generate the SECRET_KEY with the following python code: + + import string, random + chars = string.letters + string.digits + string.punctuation + print repr("".join([random.choice(chars) for i in range(0,50)])) + + If you have patchwork installed in somewhere other than /srv/patchwork, + you'll also need to define: + MEDIA_ROOT + TEMPLATE_DIRS + + If you wish to enable the XML-RPC interface, add the following to + your local_settings.py file: + + ENABLE_XMLRPC = True Then, get patchwork to create its tables in your configured database: cd apps/ - ./manage.py syncdb + PYTHONPATH=../lib/python ./manage.py syncdb And add privileges for your mail and web users: Postgresql: - psql -f lib/sql/grant-all.sql patchwork + psql -f lib/sql/grant-all.postgres.sql patchwork + + MySQL: + mysql patchwork < lib/sql/grant-all.mysql.sql 3. Apache setup @@ -102,7 +165,7 @@ fastcgi: You'll probably want to do the following: * Set up your projects - + * Configure your website address (in the Sites) section of the admin 5. Subscribe a local address to the mailing list @@ -141,3 +204,11 @@ Some errors: doesn't have access to the patchwork tables in the database. Check that your web-server user exists in the database, and that it has permissions to the tables. + +* pwclient fails for actions that require authentication, but a username + and password is given int ~/.pwclient rc. Server reports "No authentication + credentials given". + + - if you're using the FastCGI interface to apache, you'll need the + '-pass-header Authorization' option to the FastCGIExternalServer + configuration directive.