vp-03-add-gnucobol-3-2.sh 949 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. if (( $EUID != 0 )); then
  3. echo "Eseguire lo script come amministratore"
  4. exit
  5. fi
  6. # installo dipendenze
  7. apt install --yes build-essential lzip libgmp-dev libdb-dev
  8. # installo unixodbc
  9. apt install --yes iodbc unixodbc unixodbc-dev
  10. # installo drivers
  11. apt install --yes odbc-mariadb odbc-postgresql
  12. # scarico gnucobol
  13. wget https://sourceforge.net/projects/gnucobol/files/gnucobol/3.2/gnucobol-3.2.tar.lz
  14. # decomprimo
  15. tar --lzip -xvf gnucobol-3.2.tar.lz
  16. # configuro, genero, installo
  17. cd gnucobol-3.2
  18. ./configure
  19. make
  20. make install
  21. ldconfig
  22. cd ..
  23. # scarico esqlOC
  24. wget https://sourceforge.net/projects/gnucobol/files/contrib/esql/gnucobol-sql-3.0.tar.gz
  25. tar xvfz gnucobol-sql-3.0.tar.gz
  26. # configuro, genero, installo
  27. cd gnucobol-sql-3.0
  28. ./configure
  29. make
  30. make install
  31. ldconfig
  32. cd ..
  33. # aggiungo variabili di ambiente
  34. echo 'export COB_LIBRARY_PATH=/usr/local/lib' >> /etc/profile
  35. echo 'export COB_PRE_LOAD=libocsql' >> /etc/profile