Diskuse:155PIN2 Projekt - Informatika 2: Porovnání verzí
Řádek 6: | Řádek 6: | ||
* http://trac.edgewall.org/wiki/TracInstall#CreatingaProjectEnvironment | * http://trac.edgewall.org/wiki/TracInstall#CreatingaProjectEnvironment | ||
cat /etc/apache2/sites-enabled/003-trac | |||
<pre> | |||
<Location /trac/qgama> | |||
SetHandler mod_python | |||
PythonInterpreter main_interpreter | |||
PythonHandler trac.web.modpython_frontend | |||
PythonOption TracEnv /opt/trac/qgama | |||
PythonOption TracUriRoot /trac/qgama | |||
</Location> | |||
<Location /trac/qgama/login> | |||
SetHandler mod_python | |||
PythonInterpreter main_interpreter | |||
PythonHandler trac.web.modpython_frontend | |||
PythonOption TracEnv /opt/trac/qgama | |||
PythonOption TracUriRoot /trac/qgama | |||
AuthType Basic | |||
AuthName "QGama Trac" | |||
AuthUserFile /opt/trac/qgama/.htpasswd | |||
Require valid-user | |||
</Location> | |||
</pre> | |||
=== Přidání uživatele === | === Přidání uživatele === |
Verze z 18. 9. 2011, 10:21
Trac
Založení instance
trac-admin /opt/trac/<nazev> initenv
cat /etc/apache2/sites-enabled/003-trac
<Location /trac/qgama> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnv /opt/trac/qgama PythonOption TracUriRoot /trac/qgama </Location> <Location /trac/qgama/login> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnv /opt/trac/qgama PythonOption TracUriRoot /trac/qgama AuthType Basic AuthName "QGama Trac" AuthUserFile /opt/trac/qgama/.htpasswd Require valid-user </Location>
Přidání uživatele
htpasswd /opt/trac/pin2/.htpasswd user
trac-admin /opt/trac/pin2 permission add user student
Git
Soubor conf/gitolite.conf:
repo pin2/2011 RW+ = @landa
PostGIS
createuser -D -R -S -P <user>
CREATE SCHEMA <user>; ALTER SCHEMA b11 OWNER TO <user>; GRANT ALL ON geometry_columns TO <user>; GRANT SELECT ON spatial_ref_sys TO <user>;
#!/bin/sh
if [ -z $1 ] ; then
echo "usage: $0 <user>"
exit 1
fi
USER="$1"
SCHEMA=`echo $USER | cut -d'_' -f2`
DB=pgis_pin2
createuser -D -R -S -P $1
psql $DB -c "CREATE SCHEMA $SCHEMA;"
psql $DB -c "ALTER SCHEMA $SCHEMA OWNER TO $USER;"
psql $DB -c "GRANT ALL ON geometry_columns TO $USER;"
psql $DB -c "GRANT SELECT ON spatial_ref_sys TO $USER;"
exit 0