Conjunto de mudanças 7669 no repositório publico


Ignorar:
Timestamp:
22/08/2014 12:36:36 (6 anos atrás)
Autor:
gustavolepri
Mensagem:

instalador atualizado

Localização:
ILSAPL/install/3.0
Arquivos:
2 editados

Legenda:

Não Modificado
Adicionado
Removido
  • ILSAPL/install/3.0/LEIAME.txt

    r7179 r7669  
    3737- SAPL 3.0 instalado em /var/interlegis/SAPL-3.0
    3838- Python instalado em /var/interlegis/SAPL-3.0/Python-2.4
    39 - Diretório de produtos do Zope em /var/interlegis/SAPL-3.0/instances/sapl23/Products
    40 - Data.fs (ZODB) em /var/interlegis/SAPL-3.0/instances/sapl24/var
     39- Diretório de produtos do Zope em /var/interlegis/SAPL-3.0/instances/sapl30/Products
     40- Data.fs (ZODB) em /var/interlegis/SAPL-3.0/instances/sapl30/var
    4141
    4242
    4343Customização do local de instalação
    4444===================================
    45 - Modifique $INSTALL_HOME em install.sh para alterar a localização padrão (/var/interlegis/SAPL-2.4-beta)
     45- Modifique $INSTALL_HOME em install.sh para alterar a localização padrão (/var/interlegis/SAPL-3.0)
    4646- Modifique $PY e $PY_HOME para usar uma máquina virtual Python diferente (ex: o Python do sistema)
    4747- Modifique $PRODUCTS_HOME para customizar a localização do diretório de produtos (Products/)
     
    5959===========================================
    6060Para inicializar o SAPL,
    61    $ sudo /var/interlegis/SAPL-3.0/instances/sapl23/bin/startsapl.sh
     61   $ sudo /var/interlegis/SAPL-3.0/instances/sapl30/bin/startsapl.sh
    6262
    6363Para parar o SAPL,
    64    $ sudo /var/interlegis/SAPL-3.0/instances/sapl23/bin/shutdownsapl.sh
     64   $ sudo /var/interlegis/SAPL-3.0/instances/sapl30/bin/shutdownsapl.sh
    6565
    6666Para reiniciar o SAPL,
    67    $ sudo /var/interlegis/SAPL-3.0/instances/sapl23/bin/restartsapl.sh
     67   $ sudo /var/interlegis/SAPL-3.0/instances/sapl30/bin/restartsapl.sh
    6868
    6969
  • ILSAPL/install/3.0/install.sh

    r7178 r7669  
    1818SITECUSTOMIZE_FILE=$PY_HOME/lib/python2.4/sitecustomize.py
    1919PY=$PY_HOME/bin/python2.4
     20EASY_INSTALL=$PY_HOME/bin/easy_install
     21PIP=$PY_HOME/bin/pip
    2022ZOPE_HOME=$INSTALL_HOME/Zope-2.9
    21 #MYSQL_HOME=$INSTALL_HOME/mysql
    2223SITE_PACKAGES=$PY_HOME/lib/python2.4/site-packages
    2324INSTANCE_HOME=$INSTALL_HOME/instances
    2425SAPL_HOME=$INSTANCE_HOME/sapl30
    25 #PYTHON_EGG_CACHE=$SAPL_HOME/var/.python-eggs
    2626PRODUCTS_HOME=$SAPL_HOME/Products
    2727PWFILE=$INSTALL_HOME/adminPassword.txt
     
    3030SAPL_RESTART_SCRIPT=$SAPL_HOME/bin/restartsapl.sh
    3131RECEIPTS_HOME=$INSTALL_HOME/receipts
    32 
    33 #export PYTHON_EGG_CACHE
    3432
    3533# Include the following tarballs in the packages/ directory in the bundle
     
    4442ZLIB_TB=zlib-1.2.3.tar.bz2
    4543ZLIB_DIR=zlib-1.2.3
    46 PIL_TB=Imaging-1.1.6.tar.bz2
    47 PIL_DIR=Imaging-1.1.6
     44PIL_TB=Imaging-1.1.7.tar.bz2
     45PIL_DIR=Imaging-1.1.7
    4846ZOPE_TB=Zope-2.9.12-final.tar.bz2
    4947ZOPE_DIR=Zope-2.9.12-final
     
    5654HSCRIPTS_TB=HelperScripts.tar.bz2
    5755HSCRIPTS_DIR=HelperScripts
    58 ETREE_TB=elementtree-1.2.6-20050316.tar.bz2
    59 ETREE_DIR=elementtree-1.2.6-20050316
    60 SETUP_TB=setuptools-0.6c7-py2.4.tar.bz2
    61 LIBXML2_TB=libxml2-2.7.8.tar.bz2
    62 LIBXML2_DIR=libxml2-2.7.8
    63 LIBXSLT_TB=libxslt-1.1.26.tar.bz2
    64 LIBXSLT_DIR=libxslt-1.1.26
    65 PYLIBXML2_TB=libxml2-python-2.6.21.tar.bz2
    66 PYLIBXML2_DIR=libxml2-python-2.6.21
    67 MYSQLPYTHON_TB=MySQL-python-1.2.1.tar.bz2
    68 MYSQLPYTHON_DIR=MySQL-python-1.2.1
     56ETREE_TB=elementtree-1.2.7-20070827-preview.tar.bz2
     57ETREE_DIR=elementtree-1.2.7-20070827-preview
     58DISTRIBUTE_TB=distribute-0.6.49.tar.bz2
     59DISTRIBUTE_DIR=distribute-0.6.49
     60ADVANCEDQUERY_TB=AdvancedQuery-2.2.tar.bz2
     61ADVANCEDQUERY_DIR=AdvancedQuery
     62MYSQLPYTHON_TB=MySQL-python-1.2.4.tar.bz2
     63MYSQLPYTHON_DIR=MySQL-python-1.2.4
    6964TRML2PDF_TB=trml2pdf-1.2.tar.bz2
    7065TRML2PDF_DIR=trml2pdf
    7166SDE_TB=StructuredDoc.tar.bz2
    7267SDE_DIR=StructuredDoc
    73 ZMYSQLDA_TB=ZMySQLDA-2.0.8.tar.bz2
     68EXTEDIT_TB=ExternalEditor-0.9.3-src.bz2
     69EXTEDIT_DIR=ExternalEditor
     70MAILDHOST_TB=MaildropHost.tar.bz2
     71MAILDHOST_DIR=MaildropHost
     72ZMYSQLDA_TB=ZMySQLDA-3.1.1.tar.bz2
    7473ZMYSQLDA_DIR=ZMySQLDA
    75 LXML2_TB=lxml-2.3.1.tar.bz2
    76 LXML2_DIR=lxml-2.3.1
    7774PYOAI_TB=pyoai-2.4.3.tar.bz2
    7875PYOAI_DIR=pyoai-2.4.3
     
    534531    --with-readline \
    535532    --with-zlib \
     533    --with-ssl \
    536534    --disable-tk \
    537535    --with-gcc="$GCC"
     
    541539touch $SITECUSTOMIZE_FILE
    542540echo "import sys" >> "$SITECUSTOMIZE_FILE"
    543 echo "sys.setdefaultencoding('iso-8859-1')" >> "$SITECUSTOMIZE_FILE"
     541echo "sys.setdefaultencoding('utf-8')" >> "$SITECUSTOMIZE_FILE"
    544542
    545543cd $PKG
     
    588586fi
    589587
    590 #########################
    591 # install setuptools
    592 echo -e "\033[32mInstalando setuptools via ez_setup...\033[m"
    593 cd $PKG
    594 $GNU_TAR -jxf $SETUP_TB
    595 $PY ./ez_setup.py -l
    596 if [ -e setup*.egg ]
    597 then
    598     rm -rf setup*.egg
    599 fi
    600 rm ez_setup.py
     588###################
     589# build distribute 0.6.49
     590echo -e "\033[32mCompilando e instalando distribute ...\033[m"
     591cd $PKG
     592$GNU_TAR -jxf $DISTRIBUTE_TB
     593chmod -R 775 $DISTRIBUTE_DIR
     594cd $DISTRIBUTE_DIR
     595$PY ./setup.py build
     596$PY ./setup.py install
     597cd $PKG
     598if [ -d $DISTRIBUTE_DIR ]
     599then
     600    rm -rf $DISTRIBUTE_DIR
     601fi
     602
     603###################
     604# install pip
     605echo -e "\033[32mInstalando pip via distribute ...\033[m"
     606$PY $EASY_INSTALL pip==1.1
    601607
    602608#################
    603 # build PIL 1.1.6
     609# build PIL 1.1.7
    604610echo -e "\033[32mCompilando e instalando PIL ...\033[m"
    605611cd $PKG
     
    632638
    633639#################
    634 # install libxml2
    635 echo -e "\033[32mInstalando libxml2 ...\033[m"
    636 cd $PKG
    637 $GNU_TAR -jxf $LIBXML2_TB
    638 chmod -R 775 $LIBXML2_DIR
    639 cd $LIBXML2_DIR
    640 ./configure --with-python=$PY
    641 make
    642 make install
    643 cd $PKG
    644 if [ -d $LIBXML2_DIR ]
    645 then
    646     rm -rf $LIBXML2_DIR
    647 fi
     640# install lxml
     641echo -e "\033[32mBaixando e instalando lxml e suas dependências ...\033[m"
     642$PIP install lxml==2.3.1
    648643
    649644#################
    650 # install libxslt
    651 echo -e "\033[32mInstalando libxslt ...\033[m"
    652 cd $PKG
    653 $GNU_TAR -jxf $LIBXSLT_TB
    654 chmod -R 775 $LIBXSLT_DIR
    655 cd $LIBXSLT_DIR
    656 ./configure --with-python=$PY --prefix=/usr/local --with-libxml-prefix=/usr/local --with-libxml-include-prefix=/usr/local/include --with-libxml-libs-prefix=/usr/local/lib
    657 make
    658 make install
    659 cd $PKG
    660 if [ -d $LIBXSLT_DIR ]
    661 then
    662     rm -rf $LIBXSLT_DIR
    663 fi
    664 
    665 ########################
    666 # Install libxml2-python
    667 # Properly configure libxml2-python to use our libxml2/libxslt
    668 echo -e "\033[32mConfigurando libxml2-python ...\033[m"
    669 cd $PKG
    670 $GNU_TAR -jxf $PYLIBXML2_TB
    671 chmod -R 775 $PYLIBXML2_DIR
    672 cd $PYLIBXML2_DIR
    673 # Point libxml2-python to /usr/local/lib and /usr/local/include for libxml2/libxslt headers
    674 # escape string for sed-compatible string replacement (warning: insane hack ahead)
    675 # replace ROOT with /usr/local (to bypass OSX's libxml2/libxslt)
    676 FIND="ROOT = r'/usr'"
    677 REPLACE="ROOT = r'/usr/local'"
    678 ESCAPED_REPLACE=`echo $REPLACE | sed 's/\//\\\@/g' | tr @ /`
    679 # replace /usr/include with /usr/local/include (to bypass OSX's libxml2/libxslt)
    680 FIND2="/usr/include"
    681 REPLACE2="/usr/local/include"
    682 ESCAPED_REPLACE2=`echo $REPLACE2 | sed 's/\//\\\@/g' | tr @ /`
    683 ESCAPED_REPLACE3=`echo $FIND2 | sed 's/\//\\\@/g' | tr @ /`
    684 FILE=setup.py
    685 mv $FILE $FILE.tmp
    686 cat $FILE.tmp | sed "s/^.*ROOT = r\'\/usr\'.*$/$ESCAPED_REPLACE/g" | \
    687 sed "s/^.*\/usr\/include.*$/\"$ESCAPED_REPLACE2\", \"$ESCAPED_REPLACE3\",/g" > $FILE
    688 rm $FILE.tmp
    689 # With the proper libraries in setup.py, now install libxml2-python
    690 $PY ./setup.py install
    691 cd $PKG
    692 if [ -d $PYLIBXML2_DIR ]
    693 then
    694     rm -rf $PYLIBXML2_DIR
    695 fi
    696 $PY_HOME/bin/python -c "import libxml2"
    697 if [ $? -gt 0 ]
    698 then
    699     echo "Python libxml2 support is missing; something went wrong in the libxml2 build;"
    700     echo "probably missing development headers."
    701     echo "This is an optional component. It's absence will result in a log warning."
    702 fi
    703 
    704 #################
    705 # install lxml
    706 echo -e "\033[32mCompilando e Instalando lxml-2.3.1 ...\033[m"
    707 cd $PKG
    708 $GNU_TAR -jxf $LXML2_TB
    709 chmod -R 775 $LXML2_DIR
    710 cd $LXML2_DIR
    711 $PY ./setup.py build --with-xslt-config=/usr/local/include/libxslt
    712 $PY ./setup.py install
    713 cd $PKG
    714 if [ -d $LXML2_DIR ]
    715 then
    716     rm -rf $LXML2_DIR
    717 fi
    718 
     645# install libxml2-python
     646echo -e "\033[32mInstalando libxml2-python ...\033[m"
     647$PIP install ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.21.tar.gz
    719648
    720649##########################
     
    732661    rm -rf $PYOAI_DIR
    733662fi
     663
     664#################
     665# install appy.pod
     666echo -e "\033[32mBaixando e instalando appy.pod e suas dependências ...\033[m"
     667$PIP install appy
     668
     669#################
     670# install uuid
     671echo -e "\033[32mBaixando e instalando uuid ...\033[m"
     672$PIP install uuid
    734673
    735674###################
     
    809748#    </filestorage>
    810749#    mount-point /sapl_old
    811 #</zodb_db>" >> $SAPL_HOME/etc/zope.conf
     750#</zodb_db>
     751
     752locale pt_BR.UTF-8
     753
     754default-zpublisher-encoding utf-8
     755
     756rest-input-encoding utf-8
     757
     758rest-output-encoding utf-8" >> $SAPL_HOME/etc/zope.conf
    812759
    813760########################################
     
    825772cat $SAPL_HOME/etc/zope.conf.tmp | sed 's/^.*#.*effective-user.*chrism.*$/effective-user zope/g'> $SAPL_HOME/etc/zope.conf
    826773rm $SAPL_HOME/etc/zope.conf.tmp
     774
     775###############################################################
     776# Extract and move ExternalEditor tarball to Products folder of Instance
     777echo -e "\033[32mExtraindo ExternalEditor tarball ...\033[m"
     778cp $PKG/$EXTEDIT_TB $INSTALL_HOME/$EXTEDIT_TB
     779cd $INSTALL_HOME
     780$GNU_TAR -jxf ./$EXTEDIT_TB
     781rm $INSTALL_HOME/$EXTEDIT_TB
     782mv $INSTALL_HOME/$EXTEDIT_DIR $PRODUCTS_HOME
     783chmod -R 775 $PRODUCTS_HOME
     784cd $PKG
    827785
    828786###############################################################
     
    873831cd $PRODUCTS_HOME/$TXNG2_DIR
    874832$PY ./setup.py install
     833cd $PKG
     834
     835###############################################################
     836# Extract and move AdvancedQuery tarball to Products folder of Instance
     837echo -e "\033[32mInstalando o AdvancedQuery ...\033[m"
     838$GNU_TAR -jxf ./$ADVANCEDQUERY_TB
     839mv $ADVANCEDQUERY_DIR $PRODUCTS_HOME
     840chmod -R 775 $PRODUCTS_HOME
     841cd $PKG
     842
     843###############################################################
     844# Extract and move MailDropHost tarball to Products folder of Instance
     845echo -e "\033[32mInstalando o MailDropHost ...\033[m"
     846$GNU_TAR -jxf ./$MAILDHOST_TB
     847mv $MAILDHOST_DIR $PRODUCTS_HOME
     848chmod -R 775 $PRODUCTS_HOME
    875849cd $PKG
    876850
     
    922896echo "#!/bin/sh" >> "$SAPL_STARTUP_SCRIPT"
    923897echo "#" >> "$SAPL_STARTUP_SCRIPT"
    924 #echo "PYTHON_EGG_CACHE=$SAPL_HOME/var/.python-eggs" >> "$SAPL_STARTUP_SCRIPT"
    925 #echo "export PYTHON_EGG_CACHE" >> "$SAPL_STARTUP_SCRIPT"
    926898echo "# SAPL startup script" >> "$SAPL_STARTUP_SCRIPT"
    927899echo "#" >> "$SAPL_STARTUP_SCRIPT"
    928 #echo "echo 'Starting MySQL server...'" >> "$SAPL_STARTUP_SCRIPT"
    929 #echo "$MYSQL_HOME/bin/mysqld_safe --user=mysql &" >> "$SAPL_STARTUP_SCRIPT"
    930 #echo "sleep 1" >> "$SAPL_STARTUP_SCRIPT"
    931900echo "echo 'Starting SAPL server...'" >> "$SAPL_STARTUP_SCRIPT"
    932901echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" >> "$SAPL_STARTUP_SCRIPT"
     
    942911echo "echo 'Stopping SAPL server...'" >> "$SAPL_SHUTDOWN_SCRIPT"
    943912echo "$SAPL_HOME/bin/zopectl stop" >> "$SAPL_SHUTDOWN_SCRIPT"
    944 #echo "sleep 1" >> "$SAPL_SHUTDOWN_SCRIPT"
    945 #echo "echo 'Stopping MySQL server...'" >> "$SAPL_SHUTDOWN_SCRIPT"
    946 #echo "$MYSQL_HOME/bin/mysqladmin -u root shutdown" >> "$SAPL_SHUTDOWN_SCRIPT"
    947913
    948914# Write restart script
     
    953919echo "# SAPL restart script" >> "$SAPL_RESTART_SCRIPT"
    954920echo "#" >> "$SAPL_RESTART_SCRIPT"
    955 #echo "echo 'Restarting MySQL server...'" >> "$SAPL_RESTART_SCRIPT"
    956 #echo "$MYSQL_HOME/bin/mysqladmin -u root shutdown" >> "$SAPL_RESTART_SCRIPT"
    957 #echo "$MYSQL_HOME/bin/mysqld_safe --user=mysql &" >> "$SAPL_RESTART_SCRIPT"
    958921echo "echo 'Restarting SAPL server...'" >> "$SAPL_RESTART_SCRIPT"
    959922echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" >> "$SAPL_RESTART_SCRIPT"
     
    10991062fi
    11001063
    1101 # Set appropriate ownership and permissions to MySQL
    1102 #echo "Colocando a propriedade e a permissão para o MySQL..."
    1103 #chmod -R 755 $MYSQL_HOME
    1104 #chown -R root $MYSQL_HOME
    1105 #chgrp -R mysql $MYSQL_HOME
    1106 #chown -R mysql $MYSQL_HOME/var
    1107 
    11081064######################
    11091065# Import sql script to database
     
    11301086$SAPL_SHUTDOWN_SCRIPT
    11311087sleep 1
    1132 #echo "cp $PRODUCTS_HOME/$SAPL_DIR/import/* $SAPL_HOME/import/"
    1133 #echo "$SAPL_HOME/bin/zopectl run $PRODUCTS_HOME/$SAPL_DIR/instalacao/sapl_configurador.py"
    11341088export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    1135 cp $PRODUCTS_HOME/$SAPL_DIR/import/* $SAPL_HOME/import/
     1089ln -s $PRODUCTS_HOME/$SAPL_DIR/import/* $SAPL_HOME/import/
     1090ln -s $PRODUCTS_HOME/$SAPL_DIR/Extensions/* $SAPL_HOME/Extensions/
     1091cp $PRODUCTS_HOME/$SAPL_DIR/instalacao/libreoffice-server /etc/init.d/
     1092chmod 0755 /etc/init.d/libreoffice-server
     1093update-rc.d libreoffice-server defaults
     1094service libreoffice-server start
    11361095$SAPL_HOME/bin/zopectl run $PRODUCTS_HOME/$SAPL_DIR/instalacao/sapl_configurador.py
    11371096$SAPL_STARTUP_SCRIPT
Note: Veja TracChangeset para ajuda no uso do visualizador de conjunto de mudanças.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.