Difference between revisions of "Machine/aslo-web"
< Machine
Jump to navigation
Jump to search
m |
m (move configureation to puppet) |
||
Line 1: | Line 1: | ||
==Set up== | ==Set up== | ||
− | Below is the recipe that we used to set up the php server. Please see | + | Below is the recipe that we used to set up the php server. Please see puppet for up to date configuration details. |
− | |||
===Install required php modules=== | ===Install required php modules=== | ||
Line 17: | Line 16: | ||
sudo -i -u activities | sudo -i -u activities | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 50: | Line 36: | ||
define('DEV', false); | define('DEV', false); | ||
define('QUERY_CACHE', true); | define('QUERY_CACHE', true); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Minify css/js stuff | Minify css/js stuff | ||
Line 70: | Line 48: | ||
# do not use @daily to make sure that we start job after aslo-proxy | # do not use @daily to make sure that we start job after aslo-proxy | ||
01 08 * * * $HOME/aslo/cron/daily | 01 08 * * * $HOME/aslo/cron/daily | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 11:23, 1 March 2010
Set up
Below is the recipe that we used to set up the php server. Please see puppet for up to date configuration details.
Install required php modules
pear config-set preferred_state beta pear install Archive_Zip
Create user to run scripts
Make sure that all files in /srv/activities
- has apache(web-data) user
- activities group
- group write access
- umask is 002
Switch to activities user
sudo -i -u activities
Set up NFS mount points
Create directories
mkdir -p ~/files mkdir -p ~/staging
Add the following lines to the end of `/etc/fstab'
sunjammer.sugarlabs.org:/srv/nfs/activities/files /srv/activities/files nfs rsize=8192,wsize=8192,timeo=14,intr sunjammer.sugarlabs.org:/srv/nfs/activities/staging /srv/activities/staging nfs rsize=8192,wsize=8192,timeo=14,intr
First-time ASLO setup
Using ~/aslo/config.php as template, setup ASLO settings in file ~/site/app/config/config.php. Template file was configured for dev environment, switch it to production by setting SITE_STATE variable to production.
Setup other env defines in file ~/site/app/config/config-local.php
define('DEBUG', 0); define('DEV', false); define('QUERY_CACHE', true);
Minify css/js stuff
~/aslo/minify.py
Merge ASLO gettext strings
~/aslo/po-compile.sh
Crontab for activities user
@hourly $HOME/aslo/cron/hourly # do not use @daily to make sure that we start job after aslo-proxy 01 08 * * * $HOME/aslo/cron/daily