Pannous

Pannous Git Source Tree

Root/INSTALL

1# Install Dependencies #
2
3sudo apt-get install php-imap php-mysql php-gnupg
4
5
6# Create MySQL Database #
7
8mysql -u root -p
9> CREATE DATABASE pannous;
10> CREATE USER 'pannous'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
11> GRANT ALL PRIVILEGES ON pannous.* TO 'pannous'@'localhost';
12Ctrl+D
13mysql -u pannous -p pannous <./init.sql
14# For tests
15> CREATE DATABASE pannous_test;
16> CREATE USER 'pannous_test'@'localhost' IDENTIFIED BY 'pannous_test';
17> GRANT ALL PRIVILEGES ON pannous_test.* TO 'pannous_test'@'localhost';
18Ctrl+D
19mysql -u pannous_test -p pannous_test <./init.sql
20
21
22# Create postfix accounts & aliases #
23
24mysql -u postfix -p postfix
25> INSERT INTO virtual_users (user, password, mailbox) VALUES ('mailing@soutade.fr', ENCRYPT('PASSWORD'), 'soutade.fr/mailing/Maildir/');
26> INSERT INTO virtual_aliases (alias, destination) VALUES ('gpass-announce@soutade.fr', 'mailing@soutade.fr');
27Ctrl+D
28
29
30# Reload postfix configuration #
31
32service postfix reload
33
34
35# Configure pannous
36
37Add rights to config path
38
39 chown $USER:www-data fuel/app/config
40 chmod g+w fuel/app/config
41
42Edit fuel/app/config/pannous.php and update all
43
44Edit fuel/app/config/db.php and update all
45
46Edit fuel/app/config/config.php and update :
47
48 * base_url
49 * log_threshold
50 * token_salt
51
52Edit fuel/app/simpleauth.php and update :
53
54 * login_hash_salt
55
56
57# Configure apache server #
58
59 ln -s $ROOT/pannous/public /var/www/pannous
60
61Example of /etc/apache2/sites-available/pannous.conf
62
63<VirtualHost>
64ServerName pannous.soutade.fr
65
66DocumentRoot /var/www/pannous
67
68DirectoryIndex index.php
69
70CustomLog /var/log/apache2/pannous_access.log vhost_combined
71
72<Location /rest>
73 Header set Access-Control-Allow-Origin "*"
74 Header set Access-Control-Allow-Methods "POST, OPTIONS"
75</Location>
76
77<Directory />
78Options +FollowSymLinks +ExecCGI
79Require all granted
80</Directory>
81
82RewriteEngine On
83RewriteCond %{REQUEST_FILENAME} !-f
84RewriteCond %{REQUEST_FILENAME} !-d
85RewriteCond %{REQUEST_URI} !^[/]?index.php
86RewriteCond %{REQUEST_URI} !^/assets/.*
87RewriteRule ^(.*) /index.php/$1
88</VirtualHost>
89
90> a2enmod headers
91> a2ensite pannous
92
93
94# Setup cron task *
95
96edit /etc/crontab or /etc/cron.daily or /etc/cron.hourly
97
98Add the rule :
99
100'cd $PANNOUS_ROOT && php oil refine pannous:run'

Archive Download this file

Branches