Advertisement
enieto87

Script for Upgrade GCC to Version 7.3, Install Composer, and Upgrade PHP to Version 8.2

May 2nd, 2024 (edited)
590
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.24 KB | Source Code | 0 0
  1. #!/bin/sh
  2. # Script for Upgrade GCC to Version 7.3, Install Composer, and Upgrade PHP to Version 8.2
  3. # For CentOS 7.9
  4. # ENL and ESJ for ever and ever...
  5. yum install -y wget bzip2 gcc gcc-c++
  6. cd /tmp
  7. wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-7.3.0/gcc-7.3.0.tar.gz
  8. tar zxf gcc-7.3.0.tar.gz
  9. cd gcc-7.3.0
  10. ./contrib/download_prerequisites
  11. ./configure --disable-multilib --enable-languages=c,c++
  12. make -j 4
  13. make install
  14. gcc --version
  15. cd /tmp
  16. rm -rf gcc-7.3.0.tar.gz
  17. cd ~
  18. sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
  19. yum install yum-utils
  20. sudo yum-config-manager --enable remi-php82
  21. sudo yum -y install httpd mod_ssl postfix dovecot dovecot-mysql php php-fpm php-mysql php-opcache php-xml php-xmlrpc php-imap php-mbstring php-common php-gd php-json php-cli php-pdo php-zip wget unzip 7zip -y
  22. php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  23. HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
  24. php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
  25. sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement