Last active
April 19, 2021 18:35
-
-
Save unique1984/fac1614435f4f3e04e1237fc9c112fb2 to your computer and use it in GitHub Desktop.
PHP 7.x için deb.sury.org paket yöneticisi yapılandırma.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| sudo bash -c 'echo "deb https://packages.sury.org/php/ bullseye main" >> /etc/apt/sources.list.d/debsury.list' | |
| sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | |
| sudo apt update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # add php 7.3 repository | |
| bash -c 'echo "deb https://packages.sury.org/php/ stretch main" >> /etc/apt/sources.list.d/php.list' | |
| wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | |
| apt-get update | |
| # php7.3 install | |
| # apt-get install php7.3 | |
| sudo apt install php7.4 php7.4-bcmath-dbgsym php7.4-bz2-dbgsym php7.4-cgi-dbgsym php7.4-cli-dbgsym php7.4-common-dbgsym php7.4-curl-dbgsym php7.4-dba-dbgsym php7.4-dev php7.4-enchant-dbgsym php7.4-fpm-dbgsym php7.4-gd-dbgsym php7.4-gmp-dbgsym php7.4-imap-dbgsym php7.4-interbase-dbgsym php7.4-intl-dbgsym php7.4-json-dbgsym php7.4-ldap-dbgsym php7.4-mbstring-dbgsym php7.4-mysql-dbgsym php7.4-odbc-dbgsym php7.4-opcache-dbgsym php7.4-pgsql-dbgsym php7.4-phpdbg-dbgsym php7.4-pspell-dbgsym php7.4-readline-dbgsym php7.4-snmp-dbgsym php7.4-soap-dbgsym php7.4-sqlite3-dbgsym php7.4-sybase-dbgsym php7.4-tidy-dbgsym php7.4-xml-dbgsym php7.4-xmlrpc-dbgsym php7.4-xsl php7.4-zip-dbgsym | |
| sudo apt install php7.3 php7.3-bcmath-dbgsym php7.3-bz2-dbgsym php7.3-cgi-dbgsym php7.3-cli-dbgsym php7.3-common-dbgsym php7.3-curl-dbgsym php7.3-dba-dbgsym php7.3-dev php7.3-enchant-dbgsym php7.3-fpm-dbgsym php7.3-gd-dbgsym php7.3-gmp-dbgsym php7.3-imap-dbgsym php7.3-interbase-dbgsym php7.3-intl-dbgsym php7.3-json-dbgsym php7.3-ldap-dbgsym php7.3-mbstring-dbgsym php7.3-mysql-dbgsym php7.3-odbc-dbgsym php7.3-opcache-dbgsym php7.3-pgsql-dbgsym php7.3-phpdbg-dbgsym php7.3-pspell-dbgsym php7.3-readline-dbgsym php7.3-recode-dbgsym php7.3-snmp-dbgsym php7.3-soap-dbgsym php7.3-sqlite3-dbgsym php7.3-sybase-dbgsym php7.3-tidy-dbgsym php7.3-xml-dbgsym php7.3-xmlrpc-dbgsym php7.3-xsl php7.3-zip-dbgsym | |
| sudo apt install php5.6 php5.6-bcmath-dbgsym php5.6-bz2-dbgsym php5.6-cgi-dbgsym php5.6-cli-dbgsym php5.6-common-dbgsym php5.6-curl-dbgsym php5.6-dba-dbgsym php5.6-dev php5.6-enchant-dbgsym php5.6-fpm-dbgsym php5.6-gd-dbgsym php5.6-gmp-dbgsym php5.6-imap-dbgsym php5.6-interbase-dbgsym php5.6-intl-dbgsym php5.6-json-dbgsym php5.6-ldap-dbgsym php5.6-mbstring-dbgsym php5.6-mcrypt-dbgsym php5.6-mysql-dbgsym php5.6-odbc-dbgsym php5.6-opcache-dbgsym php5.6-pgsql-dbgsym php5.6-phpdbg-dbgsym php5.6-pspell-dbgsym php5.6-readline-dbgsym php5.6-recode-dbgsym php5.6-snmp-dbgsym php5.6-soap-dbgsym php5.6-sqlite3-dbgsym php5.6-sybase-dbgsym php5.6-tidy-dbgsym php5.6-xml-dbgsym php5.6-xmlrpc-dbgsym php5.6-xsl php5.6-zip-dbgsym | |
| apt install libmcrypt-dev mcrypt dh-php | |
| php8.0 php8.0-cli-dbgsym php8.0-enchant php8.0-imap php8.0-mbstring php8.0-pgsql php8.0-snmp php8.0-tidy php8.0-bcmath php8.0-common php8.0-enchant-dbgsym php8.0-imap-dbgsym php8.0-mbstring-dbgsym php8.0-pgsql-dbgsym php8.0-snmp-dbgsym php8.0-tidy-dbgsym php8.0-bcmath-dbgsym php8.0-common-dbgsym php8.0-fpm php8.0-interbase php8.0-mysql php8.0-phpdbg php8.0-soap php8.0-xdebug php8.0-bz2 php8.0-curl php8.0-fpm-dbgsym php8.0-interbase-dbgsym php8.0-mysql-dbgsym php8.0-phpdbg-dbgsym php8.0-soap-dbgsym php8.0-xml php8.0-bz2-dbgsym php8.0-curl-dbgsym php8.0-gd php8.0-intl php8.0-odbc php8.0-pspell php8.0-sqlite3 php8.0-xml-dbgsym php8.0-cgi php8.0-dba php8.0-gd-dbgsym php8.0-intl-dbgsym php8.0-odbc-dbgsym php8.0-pspell-dbgsym php8.0-sqlite3-dbgsym php8.0-xsl php8.0-cgi-dbgsym php8.0-dba-dbgsym php8.0-gmp php8.0-ldap php8.0-opcache php8.0-readline php8.0-sybase php8.0-zip php8.0-cli php8.0-dev php8.0-gmp-dbgsym php8.0-ldap-dbgsym php8.0-opcache-dbgsym php8.0-readline-dbgsym php8.0-sybase-dbgsym php8.0-zip-dbgsym | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| function getPhpVersion { | |
| PHPVERSION=$(php -r 'echo substr(phpversion(),0,3);') | |
| } | |
| getPhpVersion | |
| #~ echo $PHPVERSION | |
| #~ exit | |
| if [ -z $1 ]; then | |
| echo -e "PHP Versiyonunu girmediniz! <phpVersionChange.sh [7.0 | 7.1 | 7.2 | 7.3 | 7.4]>" | |
| echo -e "Güncel versiyon -> $PHPVERSION" | |
| exit | |
| fi | |
| sudo a2dismod php$PHPVERSION | |
| sudo systemctl restart apache2 | |
| sudo update-alternatives --set php /usr/bin/php$1 | |
| sudo update-alternatives --set phar /usr/bin/phar$1 | |
| sudo update-alternatives --set phar.phar /usr/bin/phar.phar$1 | |
| sudo update-alternatives --set phpize /usr/bin/phpize$1 | |
| sudo update-alternatives --set php-config /usr/bin/php-config$1 | |
| # sudo update-alternatives --config php | |
| getPhpVersion | |
| #~ echo -e $1 | |
| #~ echo -e $PHPVERSION | |
| #~ if [ $1 = $PHPVERSION ]; then | |
| #~ fi | |
| sudo a2enmod php$PHPVERSION | |
| sudo systemctl restart apache2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment