Guest User

RT Upgrade

a guest
Oct 25th, 2019
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.19 KB | None | 0 0
  1. # Install dependencies #
  2. apt install perl gzip zip libcpanel-json-xs-perl dbconfig-common debconf fonts-droid-fallback exim4 fonts-noto-hinted libapache-session-perl libbusiness-hours-perl libcgi-emulate-psgi-perl libcgi-pm-perl libcgi-psgi-perl libclass-accessor-perl libconvert-color-perl libcrypt-eksblowfish-perl libcrypt-ssleay-perl libcrypt-x509-perl libcss-minifier-xs-perl libcss-squish-perl libdata-guid-perl libdata-ical-perl libdata-page-pageset-perl libdate-extract-perl libdate-manip-perl libdatetime-format-natural-perl libdatetime-locale-perl libdatetime-perl libdbi-perl libdbix-searchbuilder-perl libdevel-globaldestruction-perl libemail-address-list-perl libemail-address-perl libfile-sharedir-perl libfile-which-perl libgd-graph-perl libgd-text-perl libgnupg-interface-perl libgraphviz-perl libhtml-formattext-withlinks-andtables-perl libhtml-formattext-withlinks-perl libhtml-mason-perl libhtml-mason-psgihandler-perl libhtml-quoted-perl libhtml-rewriteattributes-perl libhtml-scrubber-perl libhttp-message-perl libipc-run-perl libipc-run3-perl libjavascript-minifier-xs-perl liblist-moreutils-perl liblocale-maketext-fuzzy-perl liblocale-maketext-lexicon-perl liblog-dispatch-perl libmailtools-perl libmime-tools-perl libmime-types-perl libmodule-refresh-perl libmodule-versions-report-perl libnet-cidr-perl libnet-ip-perl libnet-ldap-perl libnet-ssleay-perl libperlio-eol-perl libplack-perl libregexp-common-net-cidr-perl libregexp-common-perl libregexp-ipv6-perl librole-basic-perl libscope-upper-perl libstring-shellquote-perl libsymbol-global-name-perl libtext-autoformat-perl libtext-password-pronounceable-perl libtext-quoted-perl libtext-template-perl libtext-wikiformat-perl libtext-wrapper-perl libtime-parsedate-perl libtimedate-perl libtree-simple-perl libuniversal-require-perl liburi-perl libwww-perl libxml-rss-perl libxml-simple-perl libdbd-mysql-perl lsb-base rsyslog ucf libhtml-formatexternal-perl w3m build-essential gcc time tree -y
  3.  
  4. #sudo apt-get remove libjson-xs-perl
  5. #sudo apt-get install libcpanel-json-xs-perl
  6.  
  7. # Configure system #
  8. /usr/sbin/adduser --system --group rt
  9.  
  10. # Configure CPAN #
  11. cpan
  12. > o conf prerequisites_policy follow
  13. > o conf build_requires_install_policy yes
  14. > o conf commit
  15. > q
  16.  
  17. # Download RT #
  18. rt_version="4.0.7"
  19. wget https://download.bestpractical.com/pub/rt/release/rt-${rt_version}.tar.gz
  20. tar xzpvf rt-${rt_version}.tar.gz -C /tmp/ && rm rt-${rt_version}.tar.gz && cd /tmp/rt-${rt_version}
  21.  
  22. # Configure setup #
  23. ./configure --with-web-user=www-data --with-web-group=www-data --enable-graphviz --enable-gd
  24. make testdeps
  25. make fixdeps
  26. make install
  27.  
  28. chmod -R  u+rwX,go-w,go+rX /opt/rt4/share/html /opt/rt4/local/html /opt/rt4/share/po /opt/rt4/local/po
  29. chown -R root /opt/rt4/share/html /opt/rt4/local/html /opt/rt4/share/po /opt/rt4/local/po
  30. chgrp -R bin /opt/rt4/share/html /opt/rt4/local/html /opt/rt4/share/po /opt/rt4/local/po
  31. chmod 0770 /opt/rt4/var/mason_data /opt/rt4/var/session_data
  32. chown -R www-data /opt/rt4/var/mason_data /opt/rt4/var/session_data
  33. chgrp -R www-data /opt/rt4/var/mason_data /opt/rt4/var/session_data
  34.  
  35. # Install SQL server #
  36. apt install mariadb-server -y
  37. service mysql restart
  38.  
  39. make initialize-database
  40.  
  41. # Download update version #
  42. rt_version="4.4.3"
  43. wget https://download.bestpractical.com/pub/rt/release/rt-${rt_version}.tar.gz
  44. tar xzpvf rt-${rt_version}.tar.gz -C /tmp/ && rm rt-${rt_version}.tar.gz && cd /tmp/rt-${rt_version}
  45. make testdeps
  46. make fixdeps
  47.  
  48. # Setup upgrade #
  49. export PERL_USE_UNSAFE_INC=1
  50. ./configure --with-web-user=www-data --with-web-group=www-data --enable-graphviz --enable-gd
  51. make upgrade
  52.  
  53. chmod -R u+rwX,go-w,go+rX /opt/rt4/share/html /opt/rt4/local/html /opt/rt4/share/po /opt/rt4/local/po /opt/rt4/share/static /opt/rt4/local/static
  54. chown -R root /opt/rt4/share/html /opt/rt4/local/html /opt/rt4/share/po /opt/rt4/local/po /opt/rt4/share/static/opt/rt4/local/static
  55. chgrp -R bin /opt/rt4/share/html /opt/rt4/local/html /opt/rt4/share/po /opt/rt4/local/po /opt/rt4/share/static /opt/rt4/local/static
  56. chmod 0770 /opt/rt4/var/mason_data /opt/rt4/var/session_data
  57. chown -R www-data /opt/rt4/var/mason_data /opt/rt4/var/session_data
  58. chgrp -R www-data /opt/rt4/var/mason_data /opt/rt4/var/session_data
  59.  
  60. make upgrade-database
Advertisement
Add Comment
Please, Sign In to add comment