-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
117 lines (88 loc) · 4.24 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
***************************
READ THE LICENSE.TXT FIRST
***************************
REQUIREMENTS
Apache
MySQL
PHP
memcached
JRE
php-gd
php-pecl-memcache
php-eaccelerator
STEPS
1. Install the latest stable versions of Apache, MySQL and PHP and Memcache
(XAMP or WAMP are good options for Windows that come with all of them).
Apache needs mod-rewrite enabled and PHP needs php5-mysql.
On Ubuntu, you can do this:
sudo tasksel install lamp-server
sudo apt-get install php5-mysql
To enable mod-rewrite:
sudo a2enmod rewrite
(Then you need to restart apache: /etc/init.d/apache2 restart)
2. Install an SVN client on your computer
(for Windows I recommend TortoiseSVN)
Ubuntu: apt-get install svn
3. Do an "svn checkout" of our code:
svn co http://svn.assembla.com/svn/scratchr
4. Create a MySQL database based on sql/db-structure.sql:
First create a database, then replace name_of_database with the name your database.
mysql -u root -p name_of_database < app/config/sql/db-structure.sql
Also import all the data and storedprocedures from sql/db-data.sql and sql/db-sp.sql
mysql -u root -p name_of_database < app/config/sql/db-data.sql
mysql -u root -p name_of_database < app/config/sql/db-sp.sql
Using commands like those used above, execute all SQL files you find under app/config/sql/updates one by one from oldest to newest. You can sort all the sql files by filename to maintain the right order.
5. Based on app/config/database.php.default create
configuration file called app/config/database.php with the
appropriate access info for your database.
6. Install memcached:
apt-get install memcached memcache(for Ubuntu)
Enable the memcached extension for PHP
sudo apt-get install php5-memcached php5-memcache
Start memcached daemon:
memcached -d
Set your memcache configuration in app/config/bootstrap.php:
define("MEMCACHE_SERVER", 'localhost'); //memcache server
define("MEMCACHE_PORT", 11211); //memcache port
7. Configure Apache to point to app/webroot
You can do this by editing:
/etc/apache2/sites-available/default
8. Make app/tmp/ directory writable
Ubuntu: sudo chmod -r 777 app/tmp
9. Make app/webroot/static directory writable
Ubuntu: sudo chmod -r 777 app/tmp
10. Set AllowOverride All in your apache vhost configuration. (/etc/apache2/sites-available/default)
If you are setting it up for your localhost, then it should look something like this:
<VirtualHost 127.0.0.1>
ServerName scratch.local
ServerAlias www.scratch.local
DocumentRoot [PATH TO SCRATCHR FILES]scratchr/app/webroot/
<Directory />
Options FollowSymLinks
AllowOverride All
RewriteEngine On
Options -Multiviews FollowSymLinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^static/projects/.+/([0-9]+)_(sm|med).png$ static/icons/project/default_$2.jpg [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^static/projects/.+/([0-9]+).sb$ static/misc/default.sb [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^static/icons/gallery/(.*)$ static/icons/gallery/default.jpg [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^static/icons/buddy/([0-9]*)_(sm|med).jpg$ static/icons/buddy/default_$2.jpg [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^static/icons/buddy/([0-9]*)_(sm|med).png$ static/icons/buddy/default_$2.jpg [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
RewriteRule .*\.svn/.* - [F]
</Directory>
</VirtualHost>
11. It is recommended that you increase your maximum memory limit for php to 32MB.
You can do it by changing the memory_limit parameter in your php.ini file. (As of Lucid, the default value is 128 MB, so you may not need to change it.)
12. You can configure email addresses and other constants from app/config/bootstrap.php
13. Send an email to [email protected] letting us know that you have
succeded and how you're planning to use the site, we'll be very happy to hear from you.
Don't forget to read the LICENSE.TXT!!!
If you make any improvements to the source code let us know so we
can all benefit from your improvements.