Wiki source code of UnaWebRizzoma

Last modified by Pavel Tuhari on 2012/03/04 17:12

Show last authors
1
2
3 http:~/~/rizzoma.com/wave/167e72ac1595378cfc44f4dabca8dfc2/0_b_456_29fd/
4
5
6 (% style="margin-top: 0px; margin-bottom: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
7 Каждый пункт и команды для установки указанных компонентов более подробно описаны ниже в этой волне.
8
9
10 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
11 установить Node.js и NPM, необходимые системные библиотеки, настроить переменную окружения PATH
12
13 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
14 установить coffeescript (npm install -g coffee-script). Установится глобально, если не хотите можно без -g, тогда coffee будет доступен только в директории проекта. Это ничего не ломает, но мне кажется, лучше глобально.
15
16 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
17 установить CouchDB (sudo apt-get install couchdb).
18
19 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
20 создать папку и зачекаутить в нее код из SVN
21
22 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
23 при необходимости (обычно не требуется) создать src/server/settings_local.coffee с локальными настройками приложения (скопировать файл из находящегося рядом шаблона; подробнее см. ниже в "Конфигурация")
24
25 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
26 установить и настроить поисковый сервер (установку см. [[ниже)>>http://rizzoma.com/r/gw/googlewave.com/w+8ldsyuCUA/conv+root/b+-p54T9amA||style="color: rgb(49, 132, 214); text-decoration: underline; "]]
27
28 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
29 создать БД и залить в нее дизайн документы, (пере-)создать поисковый индекс, собрать проект: для этого надо выполнить в корне проекта команду "cake init"
30
31 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
32 настроить хранение данных сессий в Redis, если при разработке необходимо будет часто перезапускать сервер проекта и не хочется каждый раз заново залогиниваться (см. [[ниже)>>http://rizzoma.com/r/gw/googlewave.com/w+8ldsyuCUA/conv+root/b+QmMMAa-WB||style="color: rgb(49, 132, 214); text-decoration: underline; "]]
33
34 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
35 прочитать документацию по Node.js, CoffeeScript, Express/Connect и разрабатываемой платформе (в этой и других волнах)
36
37 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
38 проект запускается командой "cake run" из корня проекта, заходить [[http:~~/~~/localhost:8000/>>http://localhost:8000/||style="color: rgb(49, 132, 214); text-decoration: underline; "]]
39
40
41 (% style="margin-top: 0px; margin-bottom: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
42 Всё готово, участвуй в создании технологий будущего!
43
44 (% style="margin-top: 0px; margin-bottom: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
45 :-)
46
47
48
49 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
50 создать пользователя www-data-volna
51
52 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
53 сделать чекаут проекта в папку /server/httpd/[[odessa.>>http://odessa.projectvolna.com/||style="color: rgb(49, 132, 214); text-decoration: underline; "]][[projectvolna.>>http://odessa.projectvolna.com/||style="color: rgb(49, 132, 214); text-decoration: underline; "]][[com/,>>http://odessa.projectvolna.com/||style="color: rgb(49, 132, 214); text-decoration: underline; "]] владелец папок и файлов - root
54
55 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
56 выполнить шаги "Для разработчика"
57
58 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
59 создать папку /var/log/volna, владелец www-data-volna:adm
60
61 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
62 установить Supervisord (apt-get install supervisor), скопировать его конфиги (из папки etc/supervisor/conf.d), запустить (sudo service supervisor restart)
63
64 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
65 скопировать конфиг для ротации логов (/etc/logrotate.d/volna)
66
67 (% class="bulleted bulleted-type0" style="margin-top: 0px; margin-bottom: 0px; position: relative; padding-left: 10px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
68 настроить параметры в конфиге settings_local.conf (baseUrl, auth, notification, siteAnalytics, ...)
69
70
71 (% style="margin-top: 0px; margin-bottom: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
72 Управление сервером:
73
74 (% style="margin-top: 0px; margin-bottom: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
75 sudo supervisorctl start|stop|restart rizzoma:*
76
77 (% style="margin-top: 0px; margin-bottom: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; line-height: 17px; text-align: left; white-space: pre-wrap; " %)
78 sudo service sphinxsearch start|stop|restart
79
80 (((
81
82 )))