Ignore:
Timestamp:
03/27/12 17:13:13 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2557 - Adcionado o suporte para Ubuntu Server 11.10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/INSTALL/arquivos/scripts/bd.sh

    r5818 r5836  
    1919        rm -rf $DIR_PG* 
    2020        su - postgres -c "export LANG=pt_BR.ISO-8859-1; initdb -E latin1 -D $DIR_PG" 
    21         #su - postgres -c 'env LANG=LATIN1 /usr/bin/initdb --locale=pt_BR.iso88591 --encoding=LATIN1 -D /var/lib/pgsql/data/' 
     21        #su - postgres -c "env LANG=LATIN1 initdb --locale=pt_BR.iso88591 --encoding=LATIN1 -D $DIR_PG" 
    2222        sed -e "s/LDAP_DN/$LDAP_DN/g" -e "s/LDAP_PWD/$LDAP_PWD/g" -e "s/ORG/$ORG/g" -e "s/DOMAIN/$DOMAIN/g" $ARQS/expresso.dump > /tmp/expresso.dump 
    2323         
    2424 
     25<<<<<<< .mine 
     26 
     27        cp -f $PG_CONF $DIR_CONF/ 
     28        cp -f $PG_HBA $DIR_CONF/ 
     29#       service postgresql start 
     30======= 
    2531 
    2632        cp -f $PG_CONF $DIR_CONF/ 
    2733        cp -f $PG_HBA $DIR_CONF/ 
    2834 
     35>>>>>>> .r5824 
    2936} 
    3037 
     38<<<<<<< .mine 
     39bd_ubuntu1110 () { 
     40        DIR_PG=$1 
     41        PG_CONF=$2 
     42        PG_HBA=$3 
     43        DIR_CONF=$4 
     44        get_org 
     45        get_pass 
     46 
     47        rm -rf $DIR_PG* 
     48        su - postgres -c "env LANG=LATIN1 initdb --locale=pt_BR.iso88591 --encoding=LATIN1 -D $DIR_PG" 
     49        sed -e "s/LDAP_DN/$LDAP_DN/g" -e "s/LDAP_PWD/$LDAP_PWD/g" -e "s/ORG/$ORG/g" -e "s/DOMAIN/$DOMAIN/g" $ARQS/expresso.dump > /tmp/expresso.dump 
     50 
     51 
     52 
     53        cp -f $PG_CONF $DIR_CONF/ 
     54        cp -f $PG_HBA $DIR_CONF/ 
     55} 
     56 
     57 
     58 
    3159# Cria a base de dados e importa os SQLs padroes 
     60======= 
     61# Cria a base de dados e importa os SQLs padroes 
     62>>>>>>> .r5824 
    3263create_db () 
    3364{ 
     
    3566        su - postgres -c 'createdb -E LATIN1 expresso'  || { echo "Falha na criação do banco expresso."; exit 1; } 
    3667        su - postgres -c 'psql -f /tmp/expresso.dump expresso' 
    37         #su - postgres -c 'psql < /tmp/workflow.dump -U postgres' 
    3868} 
    3969 
     
    5686        chmod -R 770 $DIR_PG 
    5787 
     88<<<<<<< .mine 
     89        bd $DIR_PG $PG_CONF $PG_HBA $DIR_CONF 
     90        rm -f $DIR_PG/postgresql.conf 
     91        rm -f $DIR_PG/pg_hba.conf 
     92======= 
    5893        bd $DIR_PG $PG_CONF $PG_HBA $DIR_CONF 
    5994        rm -f $DIR_PG/postgresql.conf 
    6095        rm -f $DIR_PG/pg_hba.conf 
    6196 
     97>>>>>>> .r5824 
    6298        /etc/init.d/postgresql start 
    6399 
     
    72108        SQUEEZE=debian/squeeze/$DIR_CONF 
    73109        bd_debian $DIR_PG $SQUEEZE/postgresql.conf $SQUEEZE/pg_hba.conf $DIR_CONF 
     110} 
     111 
     112bd_ubuntu () 
     113{ 
     114        DIR_PG="$1" 
     115        PG_CONF="$2" 
     116        PG_HBA="$3" 
     117        DIR_CONF="$4" 
     118        # Instala os pacotes do servico 
     119        apt-get install -y postgresql postgresql-common postgresql-client postgresql-client-common 
     120        /etc/init.d/postgresql stop 
     121        # Gera um link do initdb, para padronizar com o Centos 
     122        ln -sf /usr/lib/postgresql/9.1/bin/initdb /usr/bin/ 
     123        # Faz backup da base do Postgres 
     124        mv $DIR_PG $DIR_PG.`date +"%s"` 
     125 
     126        mkdir -p $DIR_PG/main 
     127        chown -R postgres:postgres $DIR_PG 
     128        chmod -R 770 $DIR_PG 
     129 
     130        bd_ubuntu1110 $DIR_PG $PG_CONF $PG_HBA $DIR_CONF 
     131        #rm -f $DIR_PG/postgresql.conf 
     132        #rm -f $DIR_PG/pg_hba.conf 
     133        /etc/init.d/postgresql start 
     134 
     135        # Inicializa a base de dados do Expresso 
     136        create_db 
     137} 
     138 
     139 
     140bd_ubuntu-11.10 () 
     141{ 
     142        DIR_PG="/var/lib/postgresql/9.1/main" 
     143        DIR_CONF="/etc/postgresql/9.1/main" 
     144        UBUNTU=ubuntu/11.10/$DIR_CONF 
     145        bd_ubuntu $DIR_PG $UBUNTU/postgresql.conf $UBUNTU/pg_hba.conf $DIR_CONF 
    74146} 
    75147 
Note: See TracChangeset for help on using the changeset viewer.