manGNU Herds - Free Software Association - Cookbook: recipe #155, How to install a development...

 
 

recipe #155: How to install a development environment?

Introduction

Debian GNU/Linux 5.0 (codename lenny) is used at production, http://gnuherds.org/ . However any other GNU/Linux distribution could be enough to develop.

The webapp requires php5-imagick 2.1.1.

Steps:

1. Get the source code:

mkdir -p /var/www/gnuherds-app/
cd /var/www/gnuherds-app/

Anonymous checkout:

git clone git://git.savannah.nongnu.org/gnuherds-app.git

Savannah user checkout: (configure your ~/.ssh/*)

git clone ssh://git.sv.gnu.org/srv/git/gnuherds-app.git

You may need to specify your user

git clone ssh://YOURUSER@git.sv.gnu.org/srv/git/gnuherds-app.git

2. Install and configure PostgreSQL.

3. Install and configure Apache HTTP server.

For standard Apache installation, you can save the above file under /etc/apache2/vhosts.d as gnuherds.conf
You'll need to modify it accordingly to your environment configuration, and you'll need to create the ssl certificates.

4. Install and configure PHP >= 5.2. Make sure the path is correct with regard to your directory structure.

5. Install the php5-pgsql package.

6. Install the php-http package (PHP PEAR module for HTTP related stuff).

7. Install Smarty

8. Installing Smarty-Gettext

9. Ask at the gnuherds-app-dev mailing list for the patched Smarty and Smarty-Gettext versions.

10. Create compiled templates directory for Smarty:

cd Layer-0__Site_entry_point
mkdir templates_c
chown user templates_c, where the user is from your httpd.conf
chgrp group templates_c, where the group is from your httpd.conf
chmod 700 templates_c

11. Make an index.php link for the site:

ln -s FS_Notice.php index.php

12. Create translations (run in gnuherds-app sandbox):

cd locale/de_DE/LC_MESSAGES
msgfmt -c messages.po
msgfmt -c database.po -o database.mo
msgfmt -c nationalities.po -o nationalities.mo
msgfmt -c iso_639.po -o iso_639.mo
msgfmt -c iso_3166.po -o iso_3166.mo
msgfmt -c iso_4217.po -o iso_4217.mo

cd ../../es_ES/LC_MESSAGES
msgfmt -c messages.po
msgfmt -c database.po -o database.mo
msgfmt -c nationalities.po -o nationalities.mo
msgfmt -c iso_639.po -o iso_639.mo
msgfmt -c iso_3166.po -o iso_3166.mo
msgfmt -c iso_4217.po -o iso_4217.mo

cd ../../fr_FR/LC_MESSAGES
msgfmt -c messages.po
msgfmt -c database.po -o database.mo
msgfmt -c nationalities.po -o nationalities.mo
msgfmt -c iso_639.po -o iso_639.mo
msgfmt -c iso_3166.po -o iso_3166.mo
msgfmt -c iso_4217.po -o iso_4217.mo

cd ../../it_IT/LC_MESSAGES
msgfmt -c messages.po
msgfmt -c database.po -o database.mo
msgfmt -c nationalities.po -o nationalities.mo
msgfmt -c iso_639.po -o iso_639.mo
msgfmt -c iso_3166.po -o iso_3166.mo
msgfmt -c iso_4217.po -o iso_4217.mo

cd ../../pl_PL/LC_MESSAGES
msgfmt -c messages.po
msgfmt -c database.po -o database.mo
msgfmt -c nationalities.po -o nationalities.mo
msgfmt -c iso_639.po -o iso_639.mo
msgfmt -c iso_3166.po -o iso_3166.mo
msgfmt -c iso_4217.po -o iso_4217.mo

cd ../../pt_PT/LC_MESSAGES
msgfmt -c messages.po
msgfmt -c database.po -o database.mo
msgfmt -c nationalities.po -o nationalities.mo
msgfmt -c iso_639.po -o iso_639.mo
msgfmt -c iso_3166.po -o iso_3166.mo
msgfmt -c iso_4217.po -o iso_4217.mo

cd ../../ru_RU/LC_MESSAGES
msgfmt -c messages.po
msgfmt -c database.po -o database.mo
msgfmt -c nationalities.po -o nationalities.mo
msgfmt -c iso_639.po -o iso_639.mo
msgfmt -c iso_3166.po -o iso_3166.mo
msgfmt -c iso_4217.po -o iso_4217.mo

13. Start / reload Apache.

14. Add the crontab entries

- Update the tar ball offered, following the AGPLv3 license:
As root user:
30 * * * * cd /var/www/gnuherds-app/ ; rm Layer-0__Site_entry_point/gnuherds-online.tar.gz ; tar -c -f gnuherds-online.tar --exclude '/entity_photos/' --exclude '.git' --exclude 'templates_c' --exclude '*.mo' /usr/share/php/smarty . > /dev/null 2> /dev/null ; gzip gnuherds-online.tar ; mv gnuherds-online.tar.gz Layer-0__Site_entry_point/

- Encrypted remove complete data base backup. For example:
As postgres user:
0 * * * * /bin/rm /path/gherds-PostgreSQL-server.BackUp.gpg ; /usr/bin/pg_dumpall -o | /usr/bin/gpg2 -e --recipient "Administrator <admin@domain.org>" --output /path/gherds-PostgreSQL-server.BackUp.gpg
As www-data user:
0 * * * * PENDING: Backup of Members' photo-logo directory

- Alerts
As www-data user:
0 19 * * * cd /var/www/gnuherds.org/crontabs/ ; php -f raise_Alerts.php > /dev/null 2> /dev/null

- Clean up of data base garbage, non-confirmed data, etc.
As www-data user:
0 0 1 * * cd /var/www/gnuherds.org/crontabs/ ; php -f delete_non-used_Pending-to-classify_skills.php > /dev/null 2> /dev/null
0 1 * * * cd /var/www/gnuherds.org/crontabs/ ; php -f delete_non-confirmed_donations.php > /dev/null 2> /dev/null

- Voting member expiration
Not yet.

15. Check that it works

Open with your web browser the URL where you have installed it.

Last update: Thu 11 Jun 2009 03:03:34 AM UTC

 

 

 

 

 

Audience and Context

Audience:
   Anonymous Users, Logged-in Users, All Project Members, Project Members who are technicians, Project Members who are managers

(As there is at least one of the Audience/Feature/Action context information not set, this recipe will not show up in related recipes links)

Back to the top


Powered by Savane 3.1-cleanup