Difference between revisions of "Machine/aslo-web"
< Machine
Jump to navigation
Jump to search
Line 49: | Line 49: | ||
/srv/activities/aslo/po-compile.sh | /srv/activities/aslo/po-compile.sh | ||
− | ===Crontab=== | + | ===Crontab for activities user=== |
@daily /srv/activities/aslo/cron/daily | @daily /srv/activities/aslo/cron/daily |
Revision as of 15:53, 15 November 2009
php
hostname: aslo-web.sugarlabs.org ip address: 140.186.70.123
Set up
Below is the recipe that we used to set up the php server. Please see machine for up to date configuration details.
Install needed packages
sudo apt-get install apache2 php5 php5-gd php5-cli php-pear php5-mysql sudo apt-get install git subversion
Install required php modules
pear config-set preferred_state beta pear install Archive_Zip
Create user to run scripts
sudo useradd -d /srv/activities activities
Checkout ASLO sources
sudo -i -u activities git clone git://git.sugarlabs.org/slo-activities/mainline.git /srv/activities git checkout production -b production
Fetch external dependencies
sudo -i -u activities cd /srv/activities/site/vendors/ svn co http://svn.mozilla.org/libs/product-details svn co http://svn.mozilla.org/libs/fizzypop.mozdev fizzypop svn co http://svn.mozilla.org/libs/phorms svn co http://svn.mozilla.org/libs/zxtm-api
First-time ASLO setup
Using /srv/activities/aslo/config.php as template, setup ASLO settings in file /srv/activities/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 /srv/activities/site/app/config/config-local.php
define('DEBUG', 0); define('DEV', false); define('QUERY_CACHE', true);
Minify css/js stuff
sudo -i -u activities /srv/activities/aslo/minify.py
Merge ASLO gettext strings
sudo -i -u activities /srv/activities/aslo/po-compile.sh
Crontab for activities user
@daily /srv/activities/aslo/cron/daily @hourly /srv/activities/aslo/cron/hourly
Create vhost
vim /etc/apache2/sites-available/activities.sl.org
<VirtualHost *:80 *:443> ServerName activities.sugarlabs.org ServerAlias activities2.sugarlabs.org # for test/install ServerAdmin webmaster@sugarlabs.org DocumentRoot /srv/activities/site/app/webroot LogFormat "%h %V %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" \"%{HTTP_COOKIE}i\"" addons CustomLog /srv/activities/data/access addons CustomLog /var/log/apache2/all-access.log vhost_combined #CustomLog /var/log/apache2/performance.log performance </VirtualHost>