unix:linux:debian:devuan_sury
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
unix:linux:debian:devuan_sury [2020/04/15 17:31] – rodolico | unix:linux:debian:devuan_sury [2023/01/29 01:51] – rodolico | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Summary ===== | ===== Summary ===== | ||
- | In February 2020, the "go to" place to do multiple PHP installations on Debian based servers decided to create a dependency for system-d to the package. Installing or upgrading a Devuan system that used this site would result in an unusable web server. The package maintainer, who has been doing this work faithfully for almost a decade and whom the community owes a debt of gratitude to for his hard work, determined that the package for Debian based systems would not be changed; | + | In February 2020, the "go to" place to do multiple PHP installations on Debian based servers decided to create a dependency for system-d to the package. Installing or upgrading a Devuan system that used this site would result in an unusable web server. The package maintainer, who has been doing this work faithfully for almost a decade and whom the community owes a debt of gratitude to for his hard work, determined that the package for Debian based systems would not be changed; |
- | One of the users at Devuan has taken the original packages, modified them so they do not need system-d, and created a secondary location where the packages can be installed from. If you are using a non-system-d | + | One of the users at Devuan has taken the original packages, modified them so they do not need systemd, and created a secondary location where the packages can be installed from. If you are using a non-systemd |
- | ===== Code ===== | + | These instructions were written for devuan ascii and php 7.4, but are applicable for more recent versions of Devuan and PHP. **NOTE**: you can also downgrade if you want; you can install versions as far back as PHP 5.6. |
+ | |||
+ | ===== Set up tdnetworks.com PHP repository | ||
To verify sury is being used for PHP, execute the following. If it returns any values, you have it set up and need to fix it. If not, you may be using it but not have used the default setup. | To verify sury is being used for PHP, execute the following. If it returns any values, you have it set up and need to fix it. If not, you may be using it but not have used the default setup. | ||
Line 15: | Line 17: | ||
</ | </ | ||
- | If the above returns any lines, you can use the following to set up using tdnetworks.com | + | If the above returns any lines, you are currently |
<code bash> | <code bash> | ||
+ | # get apt-transport-https if it is not installed | ||
+ | apt install apt-transport-https gnupg | ||
# download key using wget and sending to stdout, then add using apt-key | # download key using wget and sending to stdout, then add using apt-key | ||
wget -qO - http:// | wget -qO - http:// | ||
- | # save old file as .disabled | + | # If php.list exists, move it to php.list.disabled |
- | mv / | + | if [ -e / |
- | # create new list file | + | # create new list file. Change lsb_release -sc gets the code name to whatever your release is |
- | echo 'deb https:// | + | echo deb https:// |
- | echo 'deb-src https:// | + | echo deb-src https:// |
# update | # update | ||
apt update | apt update | ||
</ | </ | ||
- | < | + | |
- | apt-get install php7.2 php7.2-cli php7.2-cgi php7.2-fpm php7.2-gd php7.2-mysql php7.2-imap php7.2-curl php7.2-intl php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl php7.2-zip php7.2-mbstring php7.2-soap php7.2-opcache php7.2-common php7.2-json php7.2-readline php7.2-xml | + | The following will install various versions of PHP. This is taken from the excellent article at [[https:// |
+ | |||
+ | ===== Install ===== | ||
+ | |||
+ | ==== PHP 7.4 ==== | ||
+ | < | ||
+ | apt -y install php7.4 php7.4-cli php7.4-cgi php7.4-fpm php7.4-gd php7.4-mysql php7.4-imap php7.4-curl php7.4-intl php7.4-pspell php7.4-sqlite3 php7.4-tidy php7.4-xmlrpc php7.4-xsl php7.4-zip php7.4-mbstring php7.4-soap php7.4-opcache | ||
</ | </ | ||
+ | ==== PHP 8.0 ==== | ||
+ | <code bash> | ||
+ | apt -y install php8.0 php8.0-cli php8.0-cgi php8.0-fpm php8.0-gd php8.0-mysql php8.0-imap php8.0-curl php8.0-intl php8.0-pspell php8.0-sqlite3 php8.0-tidy php8.0-xsl php8.0-zip php8.0-mbstring php8.0-soap php8.0-opcache libonig5 php8.0-common php8.0-readline php8.0-xml | ||
+ | </ | ||
+ | ==== PHP 8.1 ==== | ||
+ | <code bash> | ||
+ | apt -y install php8.1 php8.1-cli php8.1-cgi php8.1-fpm php8.1-gd php8.1-mysql php8.1-imap php8.1-curl php8.1-intl php8.1-pspell php8.1-sqlite3 php8.1-tidy php8.1-xsl php8.1-zip php8.1-mbstring php8.1-soap php8.1-opcache libonig5 php8.1-common php8.1-readline php8.1-xml | ||
+ | </ | ||
+ | |||
+ | ===== Clean Up ===== | ||
+ | |||
+ | After installing, the newest version of PHP will be set as default for many things. This will break some applications, | ||
+ | |||
+ | To allow you to reset the defaults, issue the following commands and choose the appropriate version of PHP. | ||
+ | |||
+ | <code bash> | ||
+ | update-alternatives --config php | ||
+ | update-alternatives --config php-cgi | ||
+ | </ | ||
+ | |||
+ | Finally, restart all of the fpm packages you installed. | ||
+ | |||
+ | <code bash> | ||
+ | service php7.4-fpm restart | ||
+ | service php8.0-fpm restart | ||
+ | service php8.1-fpm restart | ||
+ | </ | ||
===== References ===== | ===== References ===== | ||
unix/linux/debian/devuan_sury.txt · Last modified: 2023/03/14 21:13 by rodolico