Diskuse:153PIN2 Projekt - Informatika 2
Z GeoWikiCZ
Obsah |
Trac
Založení instance
export TRAC=pin2
trac-admin /opt/trac/$TRAC initenv chgrp www-data /opt/trac/$TRAC -R chmod g+rw /opt/trac/$TRAC -R
cat /etc/apache2/sites-enabled/003-trac
<Location /trac/pin2> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnv /opt/trac/pin2 PythonOption TracUriRoot /trac/pin2 </Location> <Location /trac/pin2/login> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnv /opt/trac/pin2 PythonOption TracUriRoot /trac/pin2 AuthType Basic AuthName "PIN2 Trac" AuthUserFile /opt/trac/pin2/.htpasswd Require valid-user </Location>
/etc/init.d/apache2 restart
Přidání uživatele
export TRAC=pin2 export USER=landa
htpasswd /opt/trac/$TRAC/.htpasswd $USER
trac-admin /opt/trac/$TRAC permission add $USER student
Pro admina:
trac-admin /opt/trac/$TRAC permission add $USER TRAC_ADMIN
#!/bin/sh TRAC=pin2 USER=$1 htpasswd /opt/trac/$TRAC/.htpasswd $USER trac-admin /opt/trac/$TRAC permission add $USER student exit 0
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