root/trunk/README

Revision 1271, 4.0 kB (checked in by gaspard, 1 hour ago)

commit fa89456ac5753e345173c1383f02bf750192de50
Author: Gaspard Bucher <gaspard@teti.ch>

Fixed a bug in zafu parser where html parameters were not properly escaped.

Line 
1 == Zena
2 CMS based on Ruby on Rails, (c) Gaspard Bucher, teti.ch 2007, licenced under MIT
3
4 == Creating the database
5 You need to set collation and charset to utf8 when creating the database. Example :
6 # create database zena DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
7
8 == Development/testing
9 1. Create the database using a mysql client
10    create database zena_dev DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
11
12 2. Rename 'config/database_example.yml' to 'config/database.yml' and update it's content
13
14 3. Migrate the database and add initialize db (from within zena directory)
15    rake zena:migrate
16
17 4. Create a first site or load fixtures
18    rake zena:mksite HOST=localhost PASSWORD=secret LANG=en
19
20 5. Start server
21    script/server
22
23 6. Connect to site 'http://localhost:3000'
24
25 7. Login with 'admin' and 'secret'
26
27 == Production
28 You should use capistrano to ease deployment. See 'config/delploy.rb'.
29
30 Manual deployment is done with the following commands:
31 1. Create the database with (using a mysql client)
32    create database zena DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
33    
34 2. Create log directory
35    mkdir log
36    
37 3. Rename 'config/database_example.yml' to 'config/database.yml' and update it's content
38    (change user, password if needed)
39    
40 4. Migrate the database
41    rake zena:migrate RAILS_ENV=production
42
43 4. Create a site
44    rake zena:mksite HOST=example.com PASSWORD=secret LANG=en RAILS_ENV=production
45    
46 5. Login user is 'admin', password is the one set on the line above.
47
48 == Create a new site
49 # rake zena:mksite HOST=example.com PASSWORD=secret RAILS_ENV=production
50
51 == Start
52 # ruby lib/upload_progress_server.rb start
53 # script/server -S config/mongrel_upload_progress.conf
54
55 == Stop
56 # ^C  (interrupt)
57 # ruby lib/upload_progress_server.rb stop
58
59
60 == Login
61 You can now login with 'admin' and the password you used to make the site.
62
63 == Dependencies
64
65 === 1. Original in debian etch (might need to replace jpeg by libjpeg62)
66   # aptitude install build-essential apache2 mysql-server libmagick9-dev gs-gpl libssl-dev gettext libgettext-ruby libreadline5 libreadline5-dev zlib1g-dev libncurses5 libncurses5-dev unzip liburi-perl libjpeg-dev subversion ssh sudo awstats
67
68 If you want to enable LateX (PDF generation)
69 tetex-bin tetex-extra latex-ucs
70
71 For math mode (inline formulas), you will need
72 latex dviutils gs-gpl imagemagick   # use 'dvips' if dviutils is not found. Use 'tetex' if 'latex' not found.
73
74 For xsl-fo pdf generation
75 xsltproc fop # (contrib sources needed on debian for 'fop')
76              # use 'libxslt' if the package 'xsltproc' does not exist for your platform.
77
78 # ocaml-base-nox can be replaced by 'ocaml'
79 === 2. To be installed by hand
80 ruby1.8.6
81     # wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz
82     # tar xzf ruby-1.8.6.tar.gz
83     # cd ruby-1.8.6
84     # ./configure --with-openssl
85     # make && make install
86 rubygems
87     # wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
88     # tar xzf rubygems-1.3.1.tgz
89     # cd rubygems-1.3.1
90     # ruby setup.rb (if ruby is not found, log out and log back in)
91
92 ImageMagick (on Linux)
93     # wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
94     # tar xzf ImageMagick.tar.gz
95     # cd ImageMagick-*
96     # ./configure
97     # make && make install
98  
99 ImageMagick (on mac os X using macports)
100     # sudo port install tiff -macosx imagemagick +q8 +gs +wmf
101
102 === 3. install Gems
103
104 You can remove "--no-ri --no-rdoc" if you want the documentation
105     # gem install rake hoe gettext mongrel mongrel_cluster rmagick tzinfo syntax mongrel_upload_progress uuidtools daemons json capistrano ruby-debug --no-ri --no-rdoc
106 From source
107
108 === Advised tools
109 monit (debian package to monitor your mongrel processes)
110
111
112 == Very experimental webDAV
113 Should not be used for production.
114
115 add this to nodes_controller macros:
116   act_as_railsdav
117   include Zena::WebDav
118
119 add this to 'config/environment.rb'
120   require File.join(File.dirname(__FILE__), '../lib/webdav_adapter')
121
122 install railsdav
123   # script/plugin install http://svn.liverail.net/svn/plugins/railsdav
124
125 install dependencies
126   # sudo gem install mime-types, unicode
Note: See TracBrowser for help on using the browser.