Line 1: |
Line 1: |
− | ==php== | + | == Hostnames == |
− | hostname: aslo-phpl.sugarlabs.org
| |
− | ip address: 140.186.70.144
| |
| | | |
| + | * http://aslo-web.sugarlabs.org (host not found --[[User:Quozl|Quozl]] ([[User talk:Quozl|talk]]) 03:11, 9 August 2018 (EDT)) |
| | | |
− | ===Install needed packages=== | + | == Hardware == |
− | sudo apt-get install apache2 php5 php5-dev php5-gd php5-cli php-pear php5-mysql
| + | |
− | sudo apt-get install git subversion
| + | * KVM VM |
| + | |
| + | == Location == |
| + | |
| + | [[Machine/housetree|Housetree]] |
| + | |
| + | == Admins == |
| + | |
| + | * [[User:alsroot|Aleksey Lim]] |
| + | |
| + | == Backups == |
| + | |
| + | <!--* Daily system-full-backup to [[Machine/backup]]. Ask admins for encryption password. |
| + | * Daily system-remote-backup to [[Machine/backup]]. Encrypted with keys of bernie and dfarning.--> |
| + | |
| + | == Setup == |
| | | |
| ===Install required php modules=== | | ===Install required php modules=== |
Line 12: |
Line 26: |
| pear install Archive_Zip | | pear install Archive_Zip |
| | | |
− | ===Checkout our fork=== | + | ===Create user to run scripts=== |
− | git-clone git://git.sugarlabs.org/slo-activities/mainline.git /var/www
| + | 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=== |
| | | |
− | ===Create user to run scripts=== | + | sudo -i -u activities |
− | 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 |
| + | |
| + | ===Clone ASLO repository=== |
| + | |
| + | git clone git://git.sugarlabs.org/slo-activities/mainline.git -b production . |
| + | |
| + | ===Checkout dependencies=== |
| | | |
− | ===Fetch one external dependency===
| + | cd ~/site/vendors/ |
− | cd /var/www/site/vendors/ | + | svn co http://svn.mozilla.org/libs/product-details |
− | svn co http://svn.mozilla.org/libs/product-details 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 |
| | | |
− | ===Create vhost=== | + | ==ASLO configuration== |
− | <pre>
| |
− | <VirtualHost *:80 *:443>
| |
− | ServerName activities.sugarlabs.org
| |
− | ServerAlias activities.sugarlabs.*
| |
− | ServerAdmin webmaster@sugarlabs.org
| |
| | | |
− | DocumentRoot /srv/www-sugarlabs/activities/site/app/webroot
| + | 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''. |
− | CacheEnable mem /
| |
| | | |
− | LogFormat "%h %V %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" \"%{HTTP_COOKIE}i\"" addons
| + | Setup other env defines in file ''~/site/app/config/config-local.php'' |
− | CustomLog /srv/www-sugarlabs/activities/data/access addons
| + | define('DEBUG', 0); |
− | CustomLog /var/log/apache2/all-access.log vhost_combined
| + | define('DEV', false); |
− | #CustomLog /var/log/apache2/performance.log performance
| + | define('QUERY_CACHE', true); |
− | </VirtualHost>
| |
− | </pre>
| |
| | | |
| + | All local configuration should happen in files |
| + | ~/site/app/config/config.php |
| + | ~/site/app/config/config-local.php |
| | | |
− | ===Log rotate=== | + | ==Update ASLO repository== |
| | | |
− | ===Parse logs===
| + | git pull origin production |